arm.h (machine_function): Define variable after_arm_reorg here.
authorTerry Guo <terry.guo@arm.com>
Thu, 24 Apr 2014 06:40:24 +0000 (06:40 +0000)
committerXuepeng Guo <xguo@gcc.gnu.org>
Thu, 24 Apr 2014 06:40:24 +0000 (06:40 +0000)
2014-04-24  Terry Guo  <terry.guo@arm.com>

* config/arm/arm.h (machine_function): Define variable
after_arm_reorg here.
* config/arm/arm.c (after_arm_reorg): Remove the definition.
(arm_split_constant): Update the way to access variable
after_arm_reorg.
(arm_reorg): Ditto.
(arm_output_function_epilogue): Remove the reset of after_arm_reorg.

From-SVN: r209735

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h

index f022285..db6d73f 100644 (file)
@@ -1,3 +1,13 @@
+2014-04-24  Terry Guo  <terry.guo@arm.com>
+
+       * config/arm/arm.h (machine_function): Define variable
+       after_arm_reorg here.
+       * config/arm/arm.c (after_arm_reorg): Remove the definition.
+       (arm_split_constant): Update the way to access variable
+       after_arm_reorg.
+       (arm_reorg): Ditto.
+       (arm_output_function_epilogue): Remove the reset of after_arm_reorg.
+
 2014-04-23  Tom de Vries  <tom@codesourcery.com>
 
        * target-hooks-macros.h: Fix DEFHOOKPOD argument order in comment.
index 14dd901..09b5c52 100644 (file)
@@ -884,10 +884,6 @@ enum machine_mode output_memory_reference_mode;
 /* The register number to be used for the PIC offset register.  */
 unsigned arm_pic_register = INVALID_REGNUM;
 
-/* Set to 1 after arm_reorg has started.  Reset to start at the start of
-   the next function.  */
-static int after_arm_reorg = 0;
-
 enum arm_pcs arm_pcs_default;
 
 /* For an explanation of these variables, see final_prescan_insn below.  */
@@ -3516,7 +3512,7 @@ arm_split_constant (enum rtx_code code, enum machine_mode mode, rtx insn,
 
         Ref: gcc -O1 -mcpu=strongarm gcc.c-torture/compile/980506-2.c
       */
-      if (!after_arm_reorg
+      if (!cfun->machine->after_arm_reorg
          && !cond
          && (arm_gen_constant (code, mode, NULL_RTX, val, target, source,
                                1, 0)
@@ -17378,7 +17374,7 @@ arm_reorg (void)
   /* From now on we must synthesize any constants that we can't handle
      directly.  This can happen if the RTL gets split during final
      instruction generation.  */
-  after_arm_reorg = 1;
+  cfun->machine->after_arm_reorg = 1;
 
   /* Free the minipool memory.  */
   obstack_free (&minipool_obstack, minipool_startobj);
@@ -19527,9 +19523,6 @@ arm_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
                  || (cfun->machine->return_used_this_function != 0)
                  || offsets->saved_regs == offsets->outgoing_args
                  || frame_pointer_needed);
-
-      /* Reset the ARM-specific per-function variables.  */
-      after_arm_reorg = 0;
     }
 }
 
index dafef09..3a9e3eb 100644 (file)
@@ -1543,6 +1543,8 @@ typedef struct GTY(()) machine_function
   rtx thumb1_cc_op1;
   /* Also record the CC mode that is supported.  */
   enum machine_mode thumb1_cc_mode;
+  /* Set to 1 after arm_reorg has started.  */
+  int after_arm_reorg;
 }
 machine_function;
 #endif