ra-conflict.c (partial_bitnum, max_bitnum): Change type of variables to HOST_WIDE_INT.

* ra-conflict.c (partial_bitnum, max_bitnum): Change type of variables
	to HOST_WIDE_INT.
	(conflict_p, set_conflict, set_conflicts): Likewise.
	* global.c (global_alloc): Likewise.
	* ra.h: Update prototypes.

From-SVN: r129211
This commit is contained in:
Peter Bergner 2007-10-10 10:46:12 -05:00 committed by Peter Bergner
parent c456e6f17c
commit abc8b4d90e
4 changed files with 32 additions and 20 deletions

View File

@ -1,3 +1,11 @@
2007-10-10 Peter Bergner <bergner@vnet.ibm.com>
* ra-conflict.c (partial_bitnum, max_bitnum): Change type of variables
to HOST_WIDE_INT.
(conflict_p, set_conflict, set_conflicts): Likewise.
* global.c (global_alloc): Likewise.
* ra.h: Update prototypes.
2007-10-10 Wolfgang Gellerich <gellerich@de.ibm.com>
* opth-gen.awk: Fixed generation of comment stating the origin

View File

@ -389,7 +389,7 @@ global_alloc (void)
}
allocno = XCNEWVEC (struct allocno, max_allocno);
partial_bitnum = XNEWVEC (int, max_allocno);
partial_bitnum = XNEWVEC (HOST_WIDE_INT, max_allocno);
num_allocnos_per_blk = XCNEWVEC (int, max_blk + 1);
/* ...so we can sort them in the order we want them to receive
@ -432,12 +432,14 @@ global_alloc (void)
}
#ifdef ENABLE_CHECKING
gcc_assert (max_bitnum <= ((max_allocno * (max_allocno - 1)) / 2));
gcc_assert (max_bitnum <=
(((HOST_WIDE_INT) max_allocno *
((HOST_WIDE_INT) max_allocno - 1)) / 2));
#endif
if (dump_file)
{
int num_bits, num_bytes, actual_bytes;
HOST_WIDE_INT num_bits, num_bytes, actual_bytes;
fprintf (dump_file, "## max_blk: %d\n", max_blk);
fprintf (dump_file, "## max_regno: %d\n", max_regno);
@ -447,21 +449,23 @@ global_alloc (void)
num_bytes = CEIL (num_bits, 8);
actual_bytes = num_bytes;
fprintf (dump_file, "## Compressed triangular bitmatrix size: ");
fprintf (dump_file, "%d bits, %d bytes\n", num_bits, num_bytes);
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bits, ", num_bits);
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bytes\n", num_bytes);
num_bits = (max_allocno * (max_allocno - 1)) / 2;
num_bits = ((HOST_WIDE_INT) max_allocno *
((HOST_WIDE_INT) max_allocno - 1)) / 2;
num_bytes = CEIL (num_bits, 8);
fprintf (dump_file, "## Standard triangular bitmatrix size: ");
fprintf (dump_file, "%d bits, %d bytes [%.2f%%]\n",
num_bits, num_bytes,
100.0 * ((double) actual_bytes / (double) num_bytes));
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bits, ", num_bits);
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bytes [%.2f%%]\n",
num_bytes, 100.0 * ((double) actual_bytes / (double) num_bytes));
num_bits = max_allocno * max_allocno;
num_bits = (HOST_WIDE_INT) max_allocno * (HOST_WIDE_INT) max_allocno;
num_bytes = CEIL (num_bits, 8);
fprintf (dump_file, "## Square bitmatrix size: ");
fprintf (dump_file, "%d bits, %d bytes [%.2f%%]\n",
num_bits, num_bytes,
100.0 * ((double) actual_bytes / (double) num_bytes));
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bits, ", num_bits);
fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC " bytes [%.2f%%]\n",
num_bytes, 100.0 * ((double) actual_bytes / (double) num_bytes));
}
/* Calculate amount of usage of each hard reg by pseudos

View File

@ -49,8 +49,8 @@ int max_allocno;
struct allocno *allocno;
HOST_WIDEST_FAST_INT *conflicts;
int *reg_allocno;
int *partial_bitnum;
int max_bitnum;
HOST_WIDE_INT *partial_bitnum;
HOST_WIDE_INT max_bitnum;
alloc_pool adjacency_pool;
adjacency_t **adjacency;
@ -70,7 +70,7 @@ DEF_VEC_ALLOC_P(df_ref_t,heap);
bool
conflict_p (int allocno1, int allocno2)
{
int bitnum;
HOST_WIDE_INT bitnum;
HOST_WIDEST_FAST_INT word, mask;
#ifdef ENABLE_CHECKING
@ -104,7 +104,7 @@ conflict_p (int allocno1, int allocno2)
static void
set_conflict (int allocno1, int allocno2)
{
int bitnum, index;
HOST_WIDE_INT bitnum, index;
HOST_WIDEST_FAST_INT word, mask;
#ifdef ENABLE_CHECKING
@ -146,9 +146,9 @@ static void
set_conflicts (int allocno1, sparseset live)
{
int i;
int bitnum, index;
HOST_WIDE_INT bitnum, index;
HOST_WIDEST_FAST_INT word, mask;
int partial_bitnum_allocno1;
HOST_WIDE_INT partial_bitnum_allocno1;
#ifdef ENABLE_CHECKING
gcc_assert (allocno1 >= 0 && allocno1 < max_allocno);

View File

@ -99,11 +99,11 @@ extern int *reg_allocno;
/* Precalculated partial bit number in the compressed triangular bit matrix.
For two allocnos, the final bit number is: partial_bitnum[LOW] + HIGH. */
extern int *partial_bitnum;
extern HOST_WIDE_INT *partial_bitnum;
/* Size in bits of the compressed triangular bit matrix. */
extern int max_bitnum;
extern HOST_WIDE_INT max_bitnum;
/* The pool to allocate the adjacency list elements from. */