[PATCH]: PRE can handle stuff set in jumps
Daniel Berlin
dan@cgsoftware.com
Mon Aug 20 14:43:00 GMT 2001
As I mentioned to Geoff, PRE inserts on edges, and thus, can handle
sets in jumps. If it can't, then something in the edge insertion is
broken.
Thus, saying an expression inside a jump isn't available is incorrect
unless we are running classic GCSE.
It appears the patch was committed anyway a few days ago (I never
noticed), so here's a simple fix, since classic GCSE is only run if
we are optimizing for size.
2001-08-20 Daniel Berlin <dan@cgsoftware.com>
* gcse.c (hash_scan_set): It's only not available in jumps if this
is classic GCSE. Update comment and code to reflect that.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.148
diff -c -3 -p -w -B -b -r1.148 gcse.c
*** gcse.c 2001/08/13 21:42:10 1.148
--- gcse.c 2001/08/20 21:42:14
*************** hash_scan_set (pat, insn, set_p)
*** 2192,2201 ****
int antic_p = oprs_anticipatable_p (src, insn) && single_set (insn);
/* An expression is not available if its operands are
subsequently modified, including this insn. It's also not
! available if this is a branch, because we can't insert
! a set after the branch. */
int avail_p = (oprs_available_p (src, insn)
! && ! JUMP_P (insn));
insert_expr_in_table (src, GET_MODE (dest), insn, antic_p, avail_p);
}
--- 2192,2201 ----
int antic_p = oprs_anticipatable_p (src, insn) && single_set (insn);
/* An expression is not available if its operands are
subsequently modified, including this insn. It's also not
! available if this is a branch, and we are running classic
! GCSE, because we can't insert a set after the branch. */
int avail_p = (oprs_available_p (src, insn)
! && ! (optimize_size && JUMP_P (insn)));
insert_expr_in_table (src, GET_MODE (dest), insn, antic_p, avail_p);
}
--
"I was arrested for selling illegal-sized paper.
"-Steven Wright
More information about the Gcc-patches
mailing list