summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 10:16:18 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-17 10:16:18 +0000
commit49ef4267bd1ff4d39fbb6d57a9266182c998af87 (patch)
tree4278129a94b054f344c4d42adf6c7eb2d64dd16e
parentdf1b48d8daf53947cae525c9d48aecd19c723d68 (diff)
downloadppe42-gcc-49ef4267bd1ff4d39fbb6d57a9266182c998af87.tar.gz
ppe42-gcc-49ef4267bd1ff4d39fbb6d57a9266182c998af87.zip
* flow.c (libcall_dead_p): Use single_set to verify the insn
has only one set and get for analysis. (propagate_one_insn): Don't pass the PATTERN of the insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35091 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/flow.c25
2 files changed, 18 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 14d1cca0e88..e460c9e92b6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * flow.c (libcall_dead_p): Use single_set to verify the insn
+ has only one set and get for analysis.
+ (propagate_one_insn): Don't pass the PATTERN of the insn.
+
2000-07-17 Mark Klein <mklein@dis.com>
* pa.c (emit_hpdiv_const): Update to match new pattern for udivsi3.
diff --git a/gcc/flow.c b/gcc/flow.c
index 8135e020ec3..2dc2b173089 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -354,7 +354,7 @@ static rtx propagate_block_delete_libcall PARAMS ((basic_block, rtx, rtx));
static int insn_dead_p PARAMS ((struct propagate_block_info *,
rtx, int, rtx));
static int libcall_dead_p PARAMS ((struct propagate_block_info *,
- rtx, rtx, rtx));
+ rtx, rtx));
static void mark_set_regs PARAMS ((struct propagate_block_info *,
rtx, rtx));
static void mark_set_1 PARAMS ((struct propagate_block_info *,
@@ -3417,8 +3417,7 @@ propagate_one_insn (pbi, insn)
insn_is_dead = insn_dead_p (pbi, PATTERN (insn), 0,
REG_NOTES (insn));
libcall_is_dead = (insn_is_dead && note != 0
- && libcall_dead_p (pbi, PATTERN (insn),
- note, insn));
+ && libcall_dead_p (pbi, note, insn));
}
/* We almost certainly don't want to delete prologue or epilogue
@@ -4000,30 +3999,30 @@ insn_dead_p (pbi, x, call_ok, notes)
return 0;
}
-/* If X is the pattern of the last insn in a libcall, and assuming X is dead,
+/* If INSN is the last insn in a libcall, and assuming INSN is dead,
return 1 if the entire library call is dead.
- This is true if X copies a register (hard or pseudo)
- and if the hard return reg of the call insn is dead.
- (The caller should have tested the destination of X already for death.)
+ This is true if INSN copies a register (hard or pseudo)
+ and if the hard return reg of the call insn is dead.
+ (The caller should have tested the destination of the SET inside
+ INSN already for death.)
If this insn doesn't just copy a register, then we don't
have an ordinary libcall. In that case, cse could not have
managed to substitute the source for the dest later on,
so we can assume the libcall is dead.
- NEEDED is the bit vector of pseudoregs live before this insn.
- NOTE is the REG_RETVAL note of the insn. INSN is the insn itself. */
+ PBI is the block info giving pseudoregs live before this insn.
+ NOTE is the REG_RETVAL note of the insn. */
static int
-libcall_dead_p (pbi, x, note, insn)
+libcall_dead_p (pbi, note, insn)
struct propagate_block_info *pbi;
- rtx x;
rtx note;
rtx insn;
{
- register RTX_CODE code = GET_CODE (x);
+ rtx x = single_set (insn);
- if (code == SET)
+ if (x)
{
register rtx r = SET_SRC (x);
if (GET_CODE (r) == REG)
OpenPOWER on IntegriCloud