+2014-09-23 Renlin Li <renlin.li@arm.com>
+
+ * config/aarch64/aarch64.md (return): New.
+ (simple_return): Likewise.
+ * config/aarch64/aarch64.c (aarch64_use_return_insn_p): New.
+ * config/aarch64/aarch64-protos.h (aarch64_use_return_insn_p): New.
+
2014-09-23 Wilco Dijkstra <wdijkstr@arm.com>
* common/config/aarch64/aarch64-common.c:
struct simd_immediate_info *);
bool aarch64_symbolic_address_p (rtx);
bool aarch64_uimm12_shift (HOST_WIDE_INT);
+bool aarch64_use_return_insn_p (void);
const char *aarch64_output_casesi (rtx *);
const char *aarch64_rewrite_selected_cpu (const char *name);
}
}
+/* Return TRUE if we can use a simple_return insn.
+
+ This function checks whether the callee saved stack is empty, which
+ means no restore actions are need. The pro_and_epilogue will use
+ this to check whether shrink-wrapping opt is feasible. */
+
+bool
+aarch64_use_return_insn_p (void)
+{
+ if (!reload_completed)
+ return false;
+
+ if (crtl->profile)
+ return false;
+
+ aarch64_layout_frame ();
+
+ return cfun->machine->frame.frame_size == 0;
+}
+
/* Generate the epilogue instructions for returning from a function. */
void
aarch64_expand_epilogue (bool for_sibcall)
[(set_attr "type" "branch")]
)
+(define_expand "return"
+ [(simple_return)]
+ "aarch64_use_return_insn_p ()"
+ ""
+)
+
+(define_insn "simple_return"
+ [(simple_return)]
+ ""
+ "ret"
+ [(set_attr "type" "branch")]
+)
+
(define_insn "eh_return"
[(unspec_volatile [(match_operand:DI 0 "register_operand" "r")]
UNSPECV_EH_RETURN)]
+2014-09-24 Renlin Li <renlin.li@arm.com>
+
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Enable aarch64.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+ * gcc.dg/pr10474.c: Likewise.
+
2014-09-20 Mark Wielaard <mjw@redhat.com>
* gcc.dg/guality/const-volatile.c (i): Mark as used.
-/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || arm_nothumb } } } } */
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || { arm_nothumb || { aarch64*-*-* && lp64 } } } } } } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
long __attribute__((noinline, noclone))
-/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || arm_nothumb } } } } */
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || { arm_nothumb || { aarch64*-*-* && lp64 } } } } } } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
long __attribute__((noinline, noclone))
-/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || arm_nothumb } } } } */
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } || { arm_nothumb || { aarch64*-*-* && lp64 } } } } } } */
/* { dg-options "-O3 -fdump-rtl-pro_and_epilogue" } */
void f(int *i)