libcall problem during new unroller merge
Jan Hubicka
jh@suse.cz
Fri Feb 7 15:40:00 GMT 2003
> Hello,
> > > (insn 547 546 548 (nil) (set (reg:SI 238)
> > > (reg:SI 0 eax)) -1 (nil)
> > > (insn_list:REG_RETVAL 543 (expr_list:REG_EQUAL (expr_list (use (mem:BLK (scratch) [0 A8]))
> > > (expr_list (symbol_ref:SI ("strcmp"))
> > > (expr_list (mem/f:SI (symbol_ref:SI ("ix86_cpu_string")) [9 ix86_cpu_string+0 S4 A32])
> > > (expr_list (mem/s/u:SI (plus:SI (reg:SI 235)
> > > (reg:SI 231)) [9 <variable>.name+0 S4 A32])
> > > (nil)))))
> > > (nil))))
>
> one question to this -- what does the expr_list inside REG_EQUAL mean?
It is just place holder - we don't have RTL construct to represent call
with arguments, so we present it as linked list of expression. Function
is first, arguments follows
> >From the documentation I've got feeling that there should be rtl
> expression of value of libcall; is this some way to express that this
> is call to function with those arguments that is not documented?
> Anyway, it makes delete_trivially_dead_insns wrong, as it does not
> find register usage in this REG_EQUAL note.
THis looks like the problem. Now I see, delte_trivially_dead_insns
ignores body of expr_list.
DOes this patch fix the problem?
Index: cse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cse.c,v
retrieving revision 1.253
diff -c -3 -p -r1.253 cse.c
*** cse.c 28 Jan 2003 21:29:40 -0000 1.253
--- cse.c 7 Feb 2003 15:40:08 -0000
*************** count_reg_usage (x, counts, dest, incr)
*** 7461,7466 ****
--- 7461,7467 ----
int incr;
{
enum rtx_code code;
+ rtx note;
const char *fmt;
int i, j;
*************** count_reg_usage (x, counts, dest, incr)
*** 7518,7533 ****
/* Things used in a REG_EQUAL note aren't dead since loop may try to
use them. */
! count_reg_usage (REG_NOTES (x), counts, NULL_RTX, incr);
return;
- case EXPR_LIST:
case INSN_LIST:
! if (REG_NOTE_KIND (x) == REG_EQUAL
! || (REG_NOTE_KIND (x) != REG_NONNEG && GET_CODE (XEXP (x,0)) == USE))
! count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr);
! count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr);
! return;
default:
break;
--- 7519,7531 ----
/* Things used in a REG_EQUAL note aren't dead since loop may try to
use them. */
! note = find_reg_equal_equiv_note (x);
! if (note)
! count_reg_usage (XEXP (note, 0), counts, NULL_RTX, incr);
return;
case INSN_LIST:
! abort ();
default:
break;
More information about the Gcc
mailing list