Makefile.in (lcm.o): Add dependency on function.h
authorJan Hubicka <jh@suse.cz>
Tue, 25 Feb 2003 11:39:20 +0000 (12:39 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 25 Feb 2003 11:39:20 +0000 (11:39 +0000)
* Makefile.in (lcm.o):  Add dependency on function.h
* lcm.c (function.h): Include.
* i386.c (machine_function, ix86_stack_locals,
* ix86_save_varrargs_registers) : Move to
...
* i386.h (machine_function, ix86_stack_locals,
ix86_save_varrargs_registers): ... here; add optimize_mode_switching
(ix86_optimize_mode_switching): New.
* i386.md (fix patterns): Set ix86_optimize_mode_switching

From-SVN: r63404

gcc/ChangeLog
gcc/Makefile.in
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/lcm.c
gcc/toplev.c

index a2ab54f..66e7882 100644 (file)
@@ -1,3 +1,15 @@
+Tue Feb 25 12:35:34 CET 2003  Jan Hubicka  <jh@suse.cz>
+
+       * Makefile.in (lcm.o):  Add dependency on function.h
+       * lcm.c (function.h): Include.
+       * i386.c (machine_function, ix86_stack_locals,
+       * ix86_save_varrargs_registers) : Move to
+       ...
+       * i386.h (machine_function, ix86_stack_locals,
+       ix86_save_varrargs_registers): ... here; add optimize_mode_switching
+       (ix86_optimize_mode_switching): New.
+       * i386.md (fix patterns): Set ix86_optimize_mode_switching
+
 2003-02-25  Nick Clifton  <nickc@redhat.com>
 
        * config/d30v/d30v.c (d30v_init_cumulative_args): Fix typo.  Name
index 271f3e0..ceb594b 100644 (file)
@@ -1552,7 +1552,7 @@ resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) coretype
    $(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
 lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
    hard-reg-set.h flags.h real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) \
-   $(BASIC_BLOCK_H) $(TM_P_H) df.h
+   $(BASIC_BLOCK_H) $(TM_P_H) df.h function.h
 ssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) varray.h \
    $(EXPR_H) hard-reg-set.h flags.h function.h real.h insn-config.h $(RECOG_H) \
    $(BASIC_BLOCK_H) output.h ssa.h
index 89995c7..c464b6c 100644 (file)
@@ -689,18 +689,6 @@ struct stack_local_entry GTY(())
   struct stack_local_entry *next;
 };
 
-
-struct machine_function GTY(())
-{
-  struct stack_local_entry *stack_locals;
-  const char *some_ld_name;
-  int save_varrargs_registers;
-  int accesses_prev_frame;
-};
-
-#define ix86_stack_locals (cfun->machine->stack_locals)
-#define ix86_save_varrargs_registers (cfun->machine->save_varrargs_registers)
-
 /* Structure describing stack frame layout.
    Stack grows downward:
 
index c8be296..e5daa5d 100644 (file)
@@ -3166,7 +3166,7 @@ enum fp_cw_mode {FP_CW_STORED, FP_CW_UNINITIALIZED, FP_CW_ANY};
 /* Define this macro if the port needs extra instructions inserted
    for mode switching in an optimizing compilation.  */
 
-#define OPTIMIZE_MODE_SWITCHING(ENTITY) 1
+#define OPTIMIZE_MODE_SWITCHING(ENTITY) ix86_optimize_mode_switching
 
 /* If you define `OPTIMIZE_MODE_SWITCHING', you have to define this as
    initializer for an array of integers.  Each initializer element N
@@ -3223,6 +3223,19 @@ enum fp_cw_mode {FP_CW_STORED, FP_CW_UNINITIALIZED, FP_CW_ANY};
 #define DLL_IMPORT_EXPORT_PREFIX '#'
 
 #define FASTCALL_PREFIX '@'
+\f
+struct machine_function GTY(())
+{
+  struct stack_local_entry *stack_locals;
+  const char *some_ld_name;
+  int save_varrargs_registers;
+  int accesses_prev_frame;
+  int optimize_mode_switching;
+};
+
+#define ix86_stack_locals (cfun->machine->stack_locals)
+#define ix86_save_varrargs_registers (cfun->machine->save_varrargs_registers)
+#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
 
 /*
 Local variables:
index bb2eb74..d5bc360 100644 (file)
   "&& 1"
   [(const_int 0)]
 {
+  ix86_optimize_mode_switching = 1;
   operands[2] = assign_386_stack_local (HImode, 1);
   operands[3] = assign_386_stack_local (HImode, 2);
   if (memory_operand (operands[0], VOIDmode))
   "&& 1"
   [(const_int 0)]
 {
+  ix86_optimize_mode_switching = 1;
   operands[2] = assign_386_stack_local (HImode, 1);
   operands[3] = assign_386_stack_local (HImode, 2);
   if (memory_operand (operands[0], VOIDmode))
   ""
   [(const_int 0)]
 {
+  ix86_optimize_mode_switching = 1;
   operands[2] = assign_386_stack_local (HImode, 1);
   operands[3] = assign_386_stack_local (HImode, 2);
   if (memory_operand (operands[0], VOIDmode))
index 8bbe893..c403485 100644 (file)
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -63,6 +63,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "basic-block.h"
 #include "output.h"
 #include "tm_p.h"
+#include "function.h"
 
 /* We want target macros for the mode switching code to be able to refer
    to instruction attribute values.  */
index 5e63794..8932409 100644 (file)
@@ -3493,21 +3493,6 @@ rest_of_compilation (decl)
       timevar_pop (TV_RENAME_REGISTERS);
     }
 
-  if (flag_if_conversion2)
-    {
-      timevar_push (TV_IFCVT2);
-      open_dump_file (DFI_ce3, decl);
-
-      if_convert (1);
-
-      close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
-      timevar_pop (TV_IFCVT2);
-    }
-#ifdef STACK_REGS
-  if (optimize)
-    split_all_insns (1);
-#endif
-
   if (optimize > 0)
     {
       timevar_push (TV_REORDER_BLOCKS);
@@ -3530,6 +3515,21 @@ rest_of_compilation (decl)
       timevar_pop (TV_REORDER_BLOCKS);
     }
 
+  if (flag_if_conversion2)
+    {
+      timevar_push (TV_IFCVT2);
+      open_dump_file (DFI_ce3, decl);
+
+      if_convert (1);
+
+      close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
+      timevar_pop (TV_IFCVT2);
+    }
+#ifdef STACK_REGS
+  if (optimize)
+    split_all_insns (1);
+#endif
+
 #ifdef INSN_SCHEDULING
   if (optimize > 0 && flag_schedule_insns_after_reload)
     {