summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2014-02-27 21:37:33 +0000
committerAndrew Trick <atrick@apple.com>2014-02-27 21:37:33 +0000
commitb1531e582fa5ce7443abf71f21d2785441d30594 (patch)
tree77d69b2ab06b942eb0a0926ddacaf3b1ac88c86e /llvm/lib/Target
parentaa895884b26d8295dedb7240d4d9eacf65756ead (diff)
downloadbcm5719-llvm-b1531e582fa5ce7443abf71f21d2785441d30594.tar.gz
bcm5719-llvm-b1531e582fa5ce7443abf71f21d2785441d30594.zip
Provide a target override for the latest regalloc heuristic.
This is a temporary workaround for native arm linux builds: PR18996: Changing regalloc order breaks "lencod" on native arm linux builds. llvm-svn: 202433
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp5
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 79f975e3ae2..964289d2c11 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -408,6 +408,11 @@ emitLoadConstPool(MachineBasicBlock &MBB,
.setMIFlags(MIFlags);
}
+bool ARMBaseRegisterInfo::mayOverrideLocalAssignment() const {
+ // The native linux build hits a downstream codegen bug when this is enabled.
+ return STI.isTargetDarwin();
+}
+
bool ARMBaseRegisterInfo::
requiresRegisterScavenging(const MachineFunction &MF) const {
return true;
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
index 4e72f6bd5bd..5d2bf6808c3 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
@@ -172,6 +172,8 @@ public:
unsigned MIFlags = MachineInstr::NoFlags)const;
/// Code Generation virtual methods...
+ virtual bool mayOverrideLocalAssignment() const;
+
virtual bool requiresRegisterScavenging(const MachineFunction &MF) const;
virtual bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const;
OpenPOWER on IntegriCloud