diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-02-11 06:07:03 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2002-02-11 06:07:03 +0000 |
commit | cddd8b72ad0e84a6ede84aed0c96d62871ef1f20 (patch) | |
tree | 3e7fcbfd5aa2fab762cda1114ace46f614b57192 /gcc/combine.c | |
parent | 5c665b884d659613a8dea504e42411d9fbdc9da9 (diff) | |
download | gcc-cddd8b72ad0e84a6ede84aed0c96d62871ef1f20.zip gcc-cddd8b72ad0e84a6ede84aed0c96d62871ef1f20.tar.gz gcc-cddd8b72ad0e84a6ede84aed0c96d62871ef1f20.tar.bz2 |
combine.c (try_combine): Apply substitutions in CALL_INSN_FUNCTION_USAGE too.
* combine.c (try_combine): Apply substitutions in
CALL_INSN_FUNCTION_USAGE too.
From-SVN: r49670
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 269731f..ba0bf35 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1478,6 +1478,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) { /* New patterns for I3 and I2, respectively. */ rtx newpat, newi2pat = 0; + int substed_i2 = 0, substed_i1 = 0; /* Indicates need to preserve SET in I1 or I2 in I3 if it is not dead. */ int added_sets_1, added_sets_2; /* Total number of SETs to put into I3. */ @@ -1939,6 +1940,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) subst_low_cuid = INSN_CUID (i2); newpat = subst (PATTERN (i3), i2dest, i2src, 0, ! i1_feeds_i3 && i1dest_in_i1src); + substed_i2 = 1; /* Record whether i2's body now appears within i3's body. */ i2_is_used = n_occurrences; @@ -1963,6 +1965,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) n_occurrences = 0; subst_low_cuid = INSN_CUID (i1); newpat = subst (newpat, i1dest, i1src, 0, 0); + substed_i1 = 1; } /* Fail if an autoincrement side-effect has been duplicated. Be careful @@ -2534,6 +2537,23 @@ try_combine (i3, i2, i1, new_direct_jump_p) INSN_CODE (i3) = insn_code_number; PATTERN (i3) = newpat; + + if (GET_CODE (i3) == CALL_INSN && CALL_INSN_FUNCTION_USAGE (i3)) + { + rtx call_usage = CALL_INSN_FUNCTION_USAGE (i3); + + reset_used_flags (call_usage); + call_usage = copy_rtx (call_usage); + + if (substed_i2) + replace_rtx (call_usage, i2dest, i2src); + + if (substed_i1) + replace_rtx (call_usage, i1dest, i1src); + + CALL_INSN_FUNCTION_USAGE (i3) = call_usage; + } + if (undobuf.other_insn) INSN_CODE (undobuf.other_insn) = other_code_number; |