summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-04-28 23:42:51 +0000
committerMatthias Braun <matze@braunis.de>2016-04-28 23:42:51 +0000
commitf84547c6e0ec638cdfe7367572cd5d57712ea0b9 (patch)
tree2f6ee90df77d099746ccb280c79aeb8186167a7a /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parent5baa2bc2e146ebf09a0c9d5bdaf82ab6d01144bc (diff)
downloadbcm5719-llvm-f84547c6e0ec638cdfe7367572cd5d57712ea0b9.tar.gz
bcm5719-llvm-f84547c6e0ec638cdfe7367572cd5d57712ea0b9.zip
LiveIntervalAnalysis: Remove LiveVariables requirement
This requirement was a huge hack to keep LiveVariables alive because it was optionally used by TwoAddressInstructionPass and PHIElimination. However we have AnalysisUsage::addUsedIfAvailable() which we can use in those passes. This re-applies r260806 with LiveVariables manually added to PowerPC to hopefully not break the stage 2 bots this time. llvm-svn: 267954
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index b21827418f8..77aab2dd031 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -15,6 +15,7 @@
#include "PPC.h"
#include "PPCTargetObjectFile.h"
#include "PPCTargetTransformInfo.h"
+#include "llvm/CodeGen/LiveVariables.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/LegacyPassManager.h"
@@ -387,8 +388,14 @@ void PPCPassConfig::addPreRegAlloc() {
insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID,
&PPCVSXFMAMutateID);
}
- if (getPPCTargetMachine().getRelocationModel() == Reloc::PIC_)
+ if (getPPCTargetMachine().getRelocationModel() == Reloc::PIC_) {
+ // FIXME: LiveVariables should not be necessary here!
+ // PPCTLSDYnamicCallPass uses LiveIntervals which previously dependet on
+ // LiveVariables. This (unnecessary) dependency has been removed now,
+ // however a stage-2 clang build fails without LiveVariables computed here.
+ addPass(&LiveVariablesID, false);
addPass(createPPCTLSDynamicCallPass());
+ }
if (EnableExtraTOCRegDeps)
addPass(createPPCTOCRegDepsPass());
}
OpenPOWER on IntegriCloud