1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Revert "Disable this-return argument forwarding on ARM/AArch64"

Inference of the 'returned' attribute was fixed in r276008, lets try
turning the backend support back on.

This reverts commit r275677.

llvm-svn: 276081
This commit is contained in:
David Majnemer 2016-07-20 04:13:01 +00:00
parent 5c2a8f1a0c
commit 96bc89c544
5 changed files with 7 additions and 21 deletions

View File

@ -53,13 +53,6 @@ cl::opt<bool> EnableAArch64ELFLocalDynamicTLSGeneration(
cl::desc("Allow AArch64 Local Dynamic TLS code generation"),
cl::init(false));
// Disabled for causing self-hosting failures once returned-attribute inference
// was enabled.
static cl::opt<bool>
EnableThisRetForwarding("aarch64-this-return-forwarding", cl::Hidden,
cl::desc("Directly forward this return"),
cl::init(false));
/// Value type used for condition codes.
static const MVT MVT_CC = MVT::i32;
@ -2735,7 +2728,7 @@ SDValue AArch64TargetLowering::LowerCallResult(
// Pass 'this' value directly from the argument to return value, to avoid
// reg unit interference
if (i == 0 && isThisReturn && EnableThisRetForwarding) {
if (i == 0 && isThisReturn) {
assert(!VA.needsCustom() && VA.getLocVT() == MVT::i64 &&
"unexpected return calling convention register assignment");
InVals.push_back(ThisVal);

View File

@ -65,13 +65,6 @@ ARMInterworking("arm-interworking", cl::Hidden,
cl::desc("Enable / disable ARM interworking (for debugging only)"),
cl::init(true));
// Disabled for causing self-hosting failures once returned-attribute inference
// was enabled.
static cl::opt<bool>
EnableThisRetForwarding("arm-this-return-forwarding", cl::Hidden,
cl::desc("Directly forward this return"),
cl::init(false));
namespace {
class ARMCCState : public CCState {
public:
@ -1474,7 +1467,7 @@ SDValue ARMTargetLowering::LowerCallResult(
// Pass 'this' value directly from the argument to return value, to avoid
// reg unit interference
if (i == 0 && isThisReturn && EnableThisRetForwarding) {
if (i == 0 && isThisReturn) {
assert(!VA.needsCustom() && VA.getLocVT() == MVT::i32 &&
"unexpected return calling convention register assignment");
InVals.push_back(ThisVal);

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -mtriple=arm64-eabi -aarch64-this-return-forwarding | FileCheck %s
; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
%struct.A = type { i8 }
%struct.B = type { i32 }

View File

@ -1,5 +1,5 @@
; RUN: llc < %s -mtriple=armv6-linux-gnueabi -arm-this-return-forwarding | FileCheck %s -check-prefix=CHECKELF
; RUN: llc < %s -mtriple=thumbv7-apple-ios5.0 -arm-this-return-forwarding | FileCheck %s -check-prefix=CHECKT2D
; RUN: llc < %s -mtriple=armv6-linux-gnueabi | FileCheck %s -check-prefix=CHECKELF
; RUN: llc < %s -mtriple=thumbv7-apple-ios5.0 | FileCheck %s -check-prefix=CHECKT2D
declare i16 @identity16(i16 returned %x)
declare i32 @identity32(i32 returned %x)

View File

@ -1,5 +1,5 @@
; RUN: llc < %s -mtriple=armv6-linux-gnueabi -arm-this-return-forwarding | FileCheck %s -check-prefix=CHECKELF
; RUN: llc < %s -mtriple=thumbv7-apple-ios5.0 -arm-this-return-forwarding | FileCheck %s -check-prefix=CHECKT2D
; RUN: llc < %s -mtriple=armv6-linux-gnueabi | FileCheck %s -check-prefix=CHECKELF
; RUN: llc < %s -mtriple=thumbv7-apple-ios5.0 | FileCheck %s -check-prefix=CHECKT2D
%struct.A = type { i8 }
%struct.B = type { i32 }