haifa tweek
Richard Henderson
rth@cygnus.com
Sun Mar 7 11:53:00 GMT 1999
The ENCODE_BLOCKAGE change makes the INSN_BLOCKAGE cache actually work.
Before we were ignoring the stored value because the extracted unit
didn't match, since we'd put it in the wrong place.
The printing changes address a point that has long irritated me --
$4=[$6+0xffffffffffffffff]
instead of
$4=[$6-0x1]
r~
* haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far.
(print_exp): Special case addition of a constant.
(print_value) [CONST_INT]: Use HOST_WIDE_INT_PRINT_HEX.
Index: haifa-sched.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/haifa-sched.c,v
retrieving revision 1.82
diff -c -p -d -r1.82 haifa-sched.c
*** haifa-sched.c 1999/03/07 11:22:10 1.82
--- haifa-sched.c 1999/03/07 19:48:43
*************** static unsigned int *insn_blockage;
*** 296,304 ****
#define UNIT_BITS 5
#define BLOCKAGE_MASK ((1 << BLOCKAGE_BITS) - 1)
#define ENCODE_BLOCKAGE(U, R) \
! ((((U) << UNIT_BITS) << BLOCKAGE_BITS \
| MIN_BLOCKAGE_COST (R)) << BLOCKAGE_BITS \
! | MAX_BLOCKAGE_COST (R))
#define UNIT_BLOCKED(B) ((B) >> (2 * BLOCKAGE_BITS))
#define BLOCKAGE_RANGE(B) \
(((((B) >> BLOCKAGE_BITS) & BLOCKAGE_MASK) << (HOST_BITS_PER_INT / 2)) \
--- 296,304 ----
#define UNIT_BITS 5
#define BLOCKAGE_MASK ((1 << BLOCKAGE_BITS) - 1)
#define ENCODE_BLOCKAGE(U, R) \
! (((U) << BLOCKAGE_BITS \
| MIN_BLOCKAGE_COST (R)) << BLOCKAGE_BITS \
! | MAX_BLOCKAGE_COST (R))
#define UNIT_BLOCKED(B) ((B) >> (2 * BLOCKAGE_BITS))
#define BLOCKAGE_RANGE(B) \
(((((B) >> BLOCKAGE_BITS) & BLOCKAGE_MASK) << (HOST_BITS_PER_INT / 2)) \
*************** print_exp (buf, x, verbose)
*** 5832,5839 ****
{
case PLUS:
op[0] = XEXP (x, 0);
! st[1] = "+";
! op[1] = XEXP (x, 1);
break;
case LO_SUM:
op[0] = XEXP (x, 0);
--- 5832,5848 ----
{
case PLUS:
op[0] = XEXP (x, 0);
! if (GET_CODE (XEXP (x, 1)) == CONST_INT
! && INTVAL (XEXP (x, 1)) < 0)
! {
! st[1] = "-";
! op[1] = GEN_INT (-INTVAL (XEXP (x, 1)));
! }
! else
! {
! st[1] = "+";
! op[1] = XEXP (x, 1);
! }
break;
case LO_SUM:
op[0] = XEXP (x, 0);
*************** print_value (buf, x, verbose)
*** 6159,6165 ****
switch (GET_CODE (x))
{
case CONST_INT:
! sprintf (t, "0x%lx", (long)INTVAL (x));
cur = safe_concat (buf, cur, t);
break;
case CONST_DOUBLE:
--- 6168,6174 ----
switch (GET_CODE (x))
{
case CONST_INT:
! sprintf (t, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
cur = safe_concat (buf, cur, t);
break;
case CONST_DOUBLE:
More information about the Gcc-patches
mailing list