summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-03-05 00:23:40 +0000
committerEric Christopher <echristo@gmail.com>2015-03-05 00:23:40 +0000
commit63b44882ef8704f531c97a56e6895a400c85474c (patch)
tree3db2fbc7992a981beecbecbb4abb6b405969ee2d /llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
parent49e38965dc3424859429ee1ae043dab44cd849f5 (diff)
downloadbcm5719-llvm-63b44882ef8704f531c97a56e6895a400c85474c.tar.gz
bcm5719-llvm-63b44882ef8704f531c97a56e6895a400c85474c.zip
Cleanup and remove a chunk of getARMSubtarget calls in the
ARM TargetMachine pass pipeline construction by pushing them down into the appropriate pass. llvm-svn: 231323
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp')
-rw-r--r--llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
index b657f2d3fa4..7bb226510a2 100644
--- a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
+++ b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
@@ -255,6 +255,8 @@ bool Thumb2ITBlockPass::InsertITInstructions(MachineBasicBlock &MBB) {
bool Thumb2ITBlockPass::runOnMachineFunction(MachineFunction &Fn) {
const ARMSubtarget &STI =
static_cast<const ARMSubtarget &>(Fn.getSubtarget());
+ if (!STI.isThumb2())
+ return false;
AFI = Fn.getInfo<ARMFunctionInfo>();
TII = static_cast<const Thumb2InstrInfo *>(STI.getInstrInfo());
TRI = STI.getRegisterInfo();
OpenPOWER on IntegriCloud