diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-15 01:25:47 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-15 01:25:47 +0000 |
commit | e3dc1c64fdf0a8ee2482eb355d684bf2f62d0e2c (patch) | |
tree | 088f82c1b8fdefd129440f02c5743d0fc3b46c87 /gcc/stupid.c | |
parent | 73b36b5078903723745feb1d5a2241c1fb5560c0 (diff) | |
download | gcc-e3dc1c64fdf0a8ee2482eb355d684bf2f62d0e2c.tar.gz |
(stupid_life_analysis): Make sure a function result reg
is still live if it contains an argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7301 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stupid.c')
-rw-r--r-- | gcc/stupid.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/stupid.c b/gcc/stupid.c index ca9d44cc5e7..1293d5da5b2 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -199,6 +199,13 @@ stupid_life_analysis (f, nregs, file) if (regs_live[i]) SET_HARD_REG_BIT (*p, i); + /* Update which hard regs are currently live + and also the birth and death suids of pseudo regs + based on the pattern of this insn. */ + + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') + stupid_mark_refs (PATTERN (insn), insn); + /* Mark all call-clobbered regs as live after each call insn so that a pseudo whose life span includes this insn will not go in one of them. @@ -215,15 +222,11 @@ stupid_life_analysis (f, nregs, file) if (call_used_regs[i]) regs_live[i] = 0; + /* It is important that this be done after processing the insn's + pattern because we want the function result register to still + be live if it's also used to pass arguments. */ stupid_mark_refs (CALL_INSN_FUNCTION_USAGE (insn), insn); } - - /* Update which hard regs are currently live - and also the birth and death suids of pseudo regs - based on the pattern of this insn. */ - - if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') - stupid_mark_refs (PATTERN (insn), insn); } /* Now decide the order in which to allocate the pseudo registers. */ |