diff options
author | Richard Osborne <richard@xmos.com> | 2011-12-15 15:18:35 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2011-12-15 15:18:35 +0000 |
commit | 27a7859bf72b740cdb0cb32bc1e4e24b684eab0c (patch) | |
tree | 4ebf9ea69be051334ad27ac3c2a1ce8ac2a5145a /lib/Target/XCore | |
parent | 3ba19b1045a97dadc4baa1f3d44a5f549194a2b3 (diff) | |
download | external_llvm-27a7859bf72b740cdb0cb32bc1e4e24b684eab0c.zip external_llvm-27a7859bf72b740cdb0cb32bc1e4e24b684eab0c.tar.gz external_llvm-27a7859bf72b740cdb0cb32bc1e4e24b684eab0c.tar.bz2 |
Pass optLevel to XCoreDAGToDAGISel.
Patch by Kyriakos Georgiou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCore.h | 3 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreISelDAGToDAG.cpp | 9 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreTargetMachine.cpp | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/lib/Target/XCore/XCore.h b/lib/Target/XCore/XCore.h index b8fb0ca..08f091e 100644 --- a/lib/Target/XCore/XCore.h +++ b/lib/Target/XCore/XCore.h @@ -24,7 +24,8 @@ namespace llvm { class XCoreTargetMachine; class formatted_raw_ostream; - FunctionPass *createXCoreISelDag(XCoreTargetMachine &TM); + FunctionPass *createXCoreISelDag(XCoreTargetMachine &TM, + CodeGenOpt::Level OptLevel); } // end namespace llvm; diff --git a/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/lib/Target/XCore/XCoreISelDAGToDAG.cpp index 8d746ae..7564fba 100644 --- a/lib/Target/XCore/XCoreISelDAGToDAG.cpp +++ b/lib/Target/XCore/XCoreISelDAGToDAG.cpp @@ -41,8 +41,8 @@ namespace { const XCoreSubtarget &Subtarget; public: - XCoreDAGToDAGISel(XCoreTargetMachine &TM) - : SelectionDAGISel(TM), + XCoreDAGToDAGISel(XCoreTargetMachine &TM, CodeGenOpt::Level OptLevel) + : SelectionDAGISel(TM, OptLevel), Lowering(*TM.getTargetLowering()), Subtarget(*TM.getSubtargetImpl()) { } @@ -83,8 +83,9 @@ namespace { /// createXCoreISelDag - This pass converts a legalized DAG into a /// XCore-specific DAG, ready for instruction scheduling. /// -FunctionPass *llvm::createXCoreISelDag(XCoreTargetMachine &TM) { - return new XCoreDAGToDAGISel(TM); +FunctionPass *llvm::createXCoreISelDag(XCoreTargetMachine &TM, + CodeGenOpt::Level OptLevel) { + return new XCoreDAGToDAGISel(TM, OptLevel); } bool XCoreDAGToDAGISel::SelectADDRspii(SDValue Addr, SDValue &Base, diff --git a/lib/Target/XCore/XCoreTargetMachine.cpp b/lib/Target/XCore/XCoreTargetMachine.cpp index c326ffb..7e1e035 100644 --- a/lib/Target/XCore/XCoreTargetMachine.cpp +++ b/lib/Target/XCore/XCoreTargetMachine.cpp @@ -35,7 +35,7 @@ XCoreTargetMachine::XCoreTargetMachine(const Target &T, StringRef TT, } bool XCoreTargetMachine::addInstSelector(PassManagerBase &PM) { - PM.add(createXCoreISelDag(*this)); + PM.add(createXCoreISelDag(*this, getOptLevel())); return false; } |