From b041949151f3ba686dc6e8fe0ced121aef9347f2 Mon Sep 17 00:00:00 2001 From: Terry Guo Date: Thu, 24 Apr 2014 06:40:24 +0000 Subject: [PATCH] arm.h (machine_function): Define variable after_arm_reorg here. 2014-04-24 Terry Guo * 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 | 10 ++++++++++ gcc/config/arm/arm.c | 11 ++--------- gcc/config/arm/arm.h | 2 ++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f02228564c6e..db6d73f925d8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-04-24 Terry Guo + + * 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 * target-hooks-macros.h: Fix DEFHOOKPOD argument order in comment. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 14dd90174373..09b5c520d665 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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; } } diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index dafef09a9db8..3a9e3ebbb3e5 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -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 -- 2.47.3