[llvm-commits] [llvm-gcc-4.2] r51616 - in /llvm-gcc-4.2/trunk/gcc: bb-reorder.c bt-load.c final.c flow.c haifa-sched.c

Dale Johannesen dalej at apple.com
Tue May 27 14:48:05 PDT 2008


Author: johannes
Date: Tue May 27 16:48:05 2008
New Revision: 51616

URL: http://llvm.org/viewvc/llvm-project?rev=51616&view=rev
Log:
Comment out more stuff that doesn't apply to llvm.


Modified:
    llvm-gcc-4.2/trunk/gcc/bb-reorder.c
    llvm-gcc-4.2/trunk/gcc/bt-load.c
    llvm-gcc-4.2/trunk/gcc/final.c
    llvm-gcc-4.2/trunk/gcc/flow.c
    llvm-gcc-4.2/trunk/gcc/haifa-sched.c

Modified: llvm-gcc-4.2/trunk/gcc/bb-reorder.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/bb-reorder.c?rev=51616&r1=51615&r2=51616&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/bb-reorder.c (original)
+++ llvm-gcc-4.2/trunk/gcc/bb-reorder.c Tue May 27 16:48:05 2008
@@ -85,6 +85,8 @@
 #include "toplev.h"
 #include "tree-pass.h"
 
+/* LLVM LOCAL begin comment out most of this file */
+#ifndef ENABLE_LLVM
 #ifndef HAVE_conditional_execution
 #define HAVE_conditional_execution 0
 #endif
@@ -1965,6 +1967,8 @@
 	}
     }
 }
+#endif
+/* LLVM LOCAL end */
 
 /* Duplicate the blocks containing computed gotos.  This basically unfactors
    computed gotos that were factored early on in the compilation process to
@@ -1978,10 +1982,11 @@
   return (optimize > 0 && flag_expensive_optimizations && !optimize_size);
 }
 
-
 static unsigned int
 duplicate_computed_gotos (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   basic_block bb, new_bb;
   bitmap candidates;
   int max_size;
@@ -2083,6 +2088,8 @@
   cfg_layout_finalize ();
 
   BITMAP_FREE (candidates);
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 
@@ -2104,6 +2111,8 @@
 };
 
 
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 /* This function is the main 'entrance' for the optimization that
    partitions hot and cold basic blocks into separate sections of the
    .o file (to improve performance and cache locality).  Ideally it
@@ -2193,6 +2202,8 @@
 
   cfg_layout_finalize();
 }
+#endif
+/* LLVM LOCAL end */
 
 static bool
 gate_handle_reorder_blocks (void)
@@ -2205,6 +2216,8 @@
 static unsigned int
 rest_of_handle_reorder_blocks (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   bool changed;
   unsigned int liveness_flags;
 
@@ -2235,6 +2248,8 @@
 
   /* Add NOTE_INSN_SWITCH_TEXT_SECTIONS notes.  */
   insert_section_boundary_note ();
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 
@@ -2272,12 +2287,16 @@
 static unsigned int
 rest_of_handle_partition_blocks (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   no_new_pseudos = 0;
   partition_hot_cold_basic_blocks ();
   allocate_reg_life_data ();
   update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
 		    PROP_LOG_LINKS | PROP_REG_INFO | PROP_DEATH_NOTES);
   no_new_pseudos = 1;
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 

Modified: llvm-gcc-4.2/trunk/gcc/bt-load.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/bt-load.c?rev=51616&r1=51615&r2=51616&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/bt-load.c (original)
+++ llvm-gcc-4.2/trunk/gcc/bt-load.c Tue May 27 16:48:05 2008
@@ -38,6 +38,8 @@
 #include "toplev.h"
 #include "tree-pass.h"
 
+/* LLVM LOCAL begin comment out most of this file */
+#ifndef ENABLE_LLVM
 /* Target register optimizations - these are performed after reload.  */
 
 typedef struct btr_def_group_s
@@ -1492,6 +1494,8 @@
 			PROP_DEATH_NOTES | PROP_REG_INFO);
     }
 }
+#endif
+/* LLVM LOCAL end */
 
 static bool
 gate_handle_branch_target_load_optimize (void)
@@ -1503,12 +1507,9 @@
 static unsigned int
 rest_of_handle_branch_target_load_optimize (void)
 {
-  static int warned = 0;
 /* LLVM LOCAL begin - reduce cc1 size.  */
-#ifdef ENABLE_LLVM
-  return 0;
-#endif
-/* LLVM LOCAL end.  */
+#ifndef ENABLE_LLVM
+  static int warned = 0;
   /* Leave this a warning for now so that it is possible to experiment
      with running this pass twice.  In 3.6, we should either make this
      an error, or use separate dump files.  */
@@ -1523,6 +1524,8 @@
     }
 
   branch_target_load_optimize (epilogue_completed);
+#endif
+/* LLVM LOCAL end.  */
   return 0;
 }
 

Modified: llvm-gcc-4.2/trunk/gcc/final.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/final.c?rev=51616&r1=51615&r2=51616&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/final.c (original)
+++ llvm-gcc-4.2/trunk/gcc/final.c Tue May 27 16:48:05 2008
@@ -132,6 +132,8 @@
 static rtx debug_insn;
 rtx current_output_insn;
 
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 /* Line number of last NOTE.  */
 static int last_linenum;
 
@@ -146,7 +148,8 @@
 
 /* Whether to force emission of a line note before the next insn.  */
 static bool force_source_line = false;
-
+#endif
+/* LLVM LOCAL end */
 extern const int length_unit_log; /* This is defined in insn-attrtab.c.  */
 
 /* Nonzero while outputting an `asm' with operands.
@@ -157,10 +160,13 @@
 /* Number of operands of this insn, for an `asm' with operands.  */
 static unsigned int insn_noperands;
 
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 /* Compare optimization flag.  */
 
 static rtx last_ignored_compare = 0;
-
+#endif
+/* LLVM LOCAL end */
 /* Assign a unique number to each insn that is output.
    This can be used to generate unique local labels.  */
 
@@ -202,10 +208,13 @@
 
 int frame_pointer_needed;
 
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 /* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen.  */
 
 static int block_depth;
-
+#endif
+/* LLVM LOCAL end */
 /* Nonzero if have enabled APP processing of our assembler output.  */
 
 static int app_on;
@@ -229,12 +238,20 @@
 #ifdef HAVE_ATTR_length
 static int asm_insn_count (rtx);
 #endif
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 static void profile_function (FILE *);
 static void profile_after_prologue (FILE *);
 static bool notice_source_line (rtx);
+#endif
+/* LLVM LOCAL end */
 static rtx walk_alter_subreg (rtx *);
 static void output_asm_name (void);
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 static void output_alternate_entry_point (FILE *, rtx);
+#endif
+/* LLVM LOCAL end */
 static tree get_mem_expr_from_op (rtx, int *);
 static void output_asm_operand_names (rtx *, int *, int);
 static void output_operand (rtx, int);
@@ -244,9 +261,13 @@
 #ifdef HAVE_cc0
 static int alter_cond (rtx);
 #endif
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 #ifndef ADDR_VEC_ALIGN
 static int final_addr_vec_align (rtx);
 #endif
+#endif
+/* LLVM LOCAL end */
 #ifdef HAVE_ATTR_length
 static int align_fuzz (rtx, rtx, int, unsigned);
 #endif
@@ -541,6 +562,8 @@
 #endif
 
 #ifndef ADDR_VEC_ALIGN
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 static int
 final_addr_vec_align (rtx addr_vec)
 {
@@ -551,6 +574,8 @@
   return exact_log2 (align);
 
 }
+#endif
+/* LLVM LOCAL end */
 
 #define ADDR_VEC_ALIGN(ADDR_VEC) final_addr_vec_align (ADDR_VEC)
 #endif
@@ -788,6 +813,8 @@
 };
 
 
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
 /* Make a pass over all insns and compute their actual lengths by shortening
    any branches of variable length if possible.  */
 
@@ -2535,6 +2562,8 @@
     }
   return false;
 }
+#endif
+/* LLVM LOCAL end */
 
 /* For each operand in INSN, simplify (subreg (reg)) so that it refers
    directly to the desired hard register.  */
@@ -3932,6 +3961,8 @@
 static unsigned int
 rest_of_handle_final (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   rtx x;
   const char *fnname;
 
@@ -3987,6 +4018,8 @@
     (*debug_hooks->function_decl) (current_function_decl);
   /* APPLE LOCAL end aaa */
   timevar_pop (TV_SYMOUT);
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 
@@ -4011,8 +4044,12 @@
 static unsigned int
 rest_of_handle_shorten_branches (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   /* Shorten branches.  */
   shorten_branches (get_insns ());
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 
@@ -4037,6 +4074,8 @@
 static unsigned int
 rest_of_clean_state (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   rtx insn, next;
 
   /* It is very important to decompose the RTL instruction chain here:
@@ -4109,6 +4148,8 @@
   /* We're done with this function.  Free up memory if we can.  */
   free_after_parsing (cfun);
   free_after_compilation (cfun);
+#endif
+/* LLVM LOCAL end */
   return 0;
 }
 

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=51616&r1=51615&r2=51616&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/flow.c (original)
+++ llvm-gcc-4.2/trunk/gcc/flow.c Tue May 27 16:48:05 2008
@@ -4750,6 +4750,8 @@
 static unsigned int
 rest_of_handle_flow2 (void)
 {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   /* If optimizing, then go ahead and split insns now.  */
 #ifndef STACK_REGS
   if (optimize > 0)
@@ -4767,6 +4769,8 @@
      it and the rest of the code and also allows delayed branch
      scheduling to operate in the epilogue.  */
   thread_prologue_and_epilogue_insns (get_insns ());
+#endif
+/* LLVM LOCAL end */
   epilogue_completed = 1;
   flow2_completed = 1;
   return 0;

Modified: llvm-gcc-4.2/trunk/gcc/haifa-sched.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/haifa-sched.c?rev=51616&r1=51615&r2=51616&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/haifa-sched.c (original)
+++ llvm-gcc-4.2/trunk/gcc/haifa-sched.c Tue May 27 16:48:05 2008
@@ -146,7 +146,7 @@
 #include "params.h"
 
 /* LLVM LOCAL begin comment out most of this file */
-#ifndef ENABLE_LLVM
+#ifdef ENABLE_LLVM
 #undef INSN_SCHEDULING
 #endif
 /* LLVM LOCAL end */





More information about the llvm-commits mailing list