[llvm-commits] [llvm-gcc-4.2] r55662 - in /llvm-gcc-4.2/trunk/gcc: flow.c sbitmap.c
Bill Wendling
isanbard at gmail.com
Tue Sep 2 14:52:04 PDT 2008
Author: void
Date: Tue Sep 2 16:52:04 2008
New Revision: 55662
URL: http://llvm.org/viewvc/llvm-project?rev=55662&view=rev
Log:
If targeting ppc with -ftree-pre, clear existing reg-lifetime info to insure thorough DCE
Modified:
llvm-gcc-4.2/trunk/gcc/flow.c
llvm-gcc-4.2/trunk/gcc/sbitmap.c
Modified: llvm-gcc-4.2/trunk/gcc/flow.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/flow.c?rev=55662&r1=55661&r2=55662&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/flow.c (original)
+++ llvm-gcc-4.2/trunk/gcc/flow.c Tue Sep 2 16:52:04 2008
@@ -3994,10 +3994,12 @@
}
/* APPLE LOCAL begin 5695218 */
static void
-maybe_uses_pic_offset_table_rtx (struct propagate_block_info *pbi ATTRIBUTE_UNUSED,
- rtx reg ATTRIBUTE_UNUSED,
+/* LLVM LOCAL begin */
+maybe_uses_pic_offset_table_rtx (struct propagate_block_info *pbi ATTRIBUTE_UNUSED,
+ rtx reg ATTRIBUTE_UNUSED,
rtx cond ATTRIBUTE_UNUSED,
- rtx insn ATTRIBUTE_UNUSED)
+ rtx insn ATTRIBUTE_UNUSED)
+/* LLVM LOCAL begin */
{
/* LLVM LOCAL */
#ifndef ENABLE_LLVM
@@ -4566,7 +4568,25 @@
REG_UNUSED notes to REG_DEAD notes. This causes CHECK_DEAD_NOTES
in sched1 to die. To solve this update the DEATH_NOTES
here. */
- update_life_info (NULL, UPDATE_LIFE_LOCAL, PROP_REG_INFO | PROP_DEATH_NOTES);
+ /* APPLE LOCAL begin 6102803 */
+#ifdef TARGET_POWERPC
+ if (flag_tree_pre)
+ {
+ basic_block bb;
+ /* Zap the life information from the last round. If we don't
+ do this, we can wind up with registers that no longer appear
+ in the code being marked live at entry. */
+ FOR_EACH_BB (bb)
+ {
+ CLEAR_REG_SET (bb->il.rtl->global_live_at_start);
+ CLEAR_REG_SET (bb->il.rtl->global_live_at_end);
+ }
+ update_life_info (NULL, UPDATE_LIFE_GLOBAL, PROP_FINAL);
+ }
+ else
+#endif
+ update_life_info (NULL, UPDATE_LIFE_LOCAL, PROP_REG_INFO | PROP_DEATH_NOTES);
+ /* APPLE LOCAL end 6102803 */
if (dump_file)
dump_flow_info (dump_file, dump_flags);
Modified: llvm-gcc-4.2/trunk/gcc/sbitmap.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/sbitmap.c?rev=55662&r1=55661&r2=55662&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/sbitmap.c (original)
+++ llvm-gcc-4.2/trunk/gcc/sbitmap.c Tue Sep 2 16:52:04 2008
@@ -787,7 +787,8 @@
int bb;
fprintf (file, "%s\n", title);
- for (bb = 0; bb < n_maps; bb++)
+ /* APPLE LOCAL 6102803 */
+ for (bb = NUM_FIXED_BLOCKS; bb < n_maps; bb++)
{
fprintf (file, "%s %d\n", subtitle, bb);
dump_sbitmap (file, bmaps[bb]);
More information about the llvm-commits
mailing list