aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-05-11 22:08:04 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2001-05-11 22:08:04 +0200
commit3721581af164ecdc50346c435a098d4ea806d66c (patch)
treee3f47db684b16470dfb3de36d6dfa30d84afe0f6
parentfecd6201e6051a32f6645dcb3138526a2e6b0100 (diff)
downloadgcc-3721581af164ecdc50346c435a098d4ea806d66c.zip
gcc-3721581af164ecdc50346c435a098d4ea806d66c.tar.gz
gcc-3721581af164ecdc50346c435a098d4ea806d66c.tar.bz2
regmove.c (regmove_optimize): Suppress the optimization for unchanging destination register.
* regmove.c (regmove_optimize): Suppress the optimization for unchanging destination register. Add comment above function. From-SVN: r41974
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/regmove.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9814720..04297a6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * regmove.c (regmove_optimize): Suppress the optimization for
+ unchanging destination register. Add comment above function.
+
2001-05-11 Zack Weinberg <zackw@stanford.edu>
* Makefile.in: Exterminate all references to assert.h.
diff --git a/gcc/regmove.c b/gcc/regmove.c
index a151d6f..910c422 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -1060,6 +1060,12 @@ fixup_match_2 (insn, dst, src, offset, regmove_dump_file)
return 0;
}
+/* Main entry for the register move optimization.
+ F is the first instruction.
+ NREGS is one plus the highest pseudo-reg number used in the instruction.
+ REGMOVE_DUMP_FILE is a stream for output of a trace of actions taken
+ (or 0 if none should be output). */
+
void
regmove_optimize (f, nregs, regmove_dump_file)
rtx f;
@@ -1282,7 +1288,8 @@ regmove_optimize (f, nregs, regmove_dump_file)
if (GET_CODE (dst) != REG
|| REGNO (dst) < FIRST_PSEUDO_REGISTER
- || REG_LIVE_LENGTH (REGNO (dst)) < 0)
+ || REG_LIVE_LENGTH (REGNO (dst)) < 0
+ || RTX_UNCHANGING_P (dst))
continue;
/* If the operands already match, then there is nothing to do. */