diff options
author | Stephen Hines <srhines@google.com> | 2015-04-01 18:49:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-01 18:49:26 +0000 |
commit | 3fa16bd6062e23bcdb82ed4dd965674792e6b761 (patch) | |
tree | 9348fc507292f7e8715d22d64ce5a32131b4f875 /lib/Target/XCore/XCoreTargetMachine.cpp | |
parent | beed47390a60f6f0c77532b3d3f76bb47ef49423 (diff) | |
parent | ebe69fe11e48d322045d5949c83283927a0d790b (diff) | |
download | external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.zip external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.gz external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r230699."
Diffstat (limited to 'lib/Target/XCore/XCoreTargetMachine.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreTargetMachine.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/Target/XCore/XCoreTargetMachine.cpp b/lib/Target/XCore/XCoreTargetMachine.cpp index 0fa8c21..7998fc1 100644 --- a/lib/Target/XCore/XCoreTargetMachine.cpp +++ b/lib/Target/XCore/XCoreTargetMachine.cpp @@ -12,10 +12,11 @@ #include "XCoreTargetMachine.h" #include "XCoreTargetObjectFile.h" +#include "XCoreTargetTransformInfo.h" #include "XCore.h" #include "llvm/CodeGen/Passes.h" #include "llvm/IR/Module.h" -#include "llvm/PassManager.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/Support/TargetRegistry.h" using namespace llvm; @@ -28,6 +29,7 @@ XCoreTargetMachine::XCoreTargetMachine(const Target &T, StringRef TT, CodeGenOpt::Level OL) : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), TLOF(make_unique<XCoreTargetObjectFile>()), + DL("e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32"), Subtarget(TT, CPU, FS, *this) { initAsmInfo(); } @@ -48,7 +50,7 @@ public: void addIRPasses() override; bool addPreISel() override; bool addInstSelector() override; - bool addPreEmitPass() override; + void addPreEmitPass() override; }; } // namespace @@ -72,9 +74,8 @@ bool XCorePassConfig::addInstSelector() { return false; } -bool XCorePassConfig::addPreEmitPass() { - addPass(createXCoreFrameToArgsOffsetEliminationPass()); - return false; +void XCorePassConfig::addPreEmitPass() { + addPass(createXCoreFrameToArgsOffsetEliminationPass(), false); } // Force static initialization. @@ -82,10 +83,7 @@ extern "C" void LLVMInitializeXCoreTarget() { RegisterTargetMachine<XCoreTargetMachine> X(TheXCoreTarget); } -void XCoreTargetMachine::addAnalysisPasses(PassManagerBase &PM) { - // Add first the target-independent BasicTTI pass, then our XCore pass. This - // allows the XCore pass to delegate to the target independent layer when - // appropriate. - PM.add(createBasicTargetTransformInfoPass(this)); - PM.add(createXCoreTargetTransformInfoPass(this)); +TargetIRAnalysis XCoreTargetMachine::getTargetIRAnalysis() { + return TargetIRAnalysis( + [this](Function &) { return TargetTransformInfo(XCoreTTIImpl(this)); }); } |