This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
darwin-specific codegen improvement
- To: gcc-patches at gcc dot gnu dot org
- Subject: darwin-specific codegen improvement
- From: dalej at apple dot com
- Date: Wed, 30 May 2001 15:12:32 -0700
2001-05-30 Dale Johannesen <dalej@apple.com>
* config/rs6000/rs6000.c: Remove an unnecessary copy of the
result when
generating RTL for the -fPIC address of a symbol; some
optimizations were
being lost. Darwin specific.
Index: rs6000.c
===================================================================
RCS file: /cvs/repository/CoreTools/gcc3/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.25
diff -u -d -b -w -r1.25 rs6000.c
--- rs6000.c 2001/05/22 21:45:09 1.25
+++ rs6000.c 2001/05/30 22:07:52
@@ -2744,14 +2744,14 @@
if (DEFAULT_ABI == ABI_DARWIN && flag_pic)
{
#if TARGET_MACHO
- rtx temp_reg = ((reload_in_progress || reload_completed)
- ? operands[0] : NULL);
-
operands[1] =
rs6000_machopic_legitimize_pic_address (operands[1],
mode,
- temp_reg);
-#endif
+ operands[0]);
+ if ( operands[0]!=operands[1] )
emit_insn (gen_rtx_SET (VOIDmode, operands[0],
operands[1]));
+#else
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0],
operands[1]));
+#endif
return;
}