diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-17 15:26:15 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-17 15:26:15 +0000 |
commit | d858e90f039f5fcdc2fa93035e911a5a9505cc50 (patch) | |
tree | 36440ef2be51930ff4234131a14b365f5a0453ca /lib/Target/CellSPU/SPUISelDAGToDAG.cpp | |
parent | 1e93df6f0b5ee6e36d7ec18e6035f0f5a53e5ec6 (diff) | |
download | llvm-d858e90f039f5fcdc2fa93035e911a5a9505cc50.tar.gz llvm-d858e90f039f5fcdc2fa93035e911a5a9505cc50.tar.bz2 llvm-d858e90f039f5fcdc2fa93035e911a5a9505cc50.tar.xz |
Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.
SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.
And PIC16's AsmPrinter no longer uses TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU/SPUISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index 7867849d80..71965cbe6e 100644 --- a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -14,7 +14,6 @@ #include "SPU.h" #include "SPUTargetMachine.h" -#include "SPUISelLowering.h" #include "SPUHazardRecognizers.h" #include "SPUFrameInfo.h" #include "SPURegisterNames.h" @@ -239,8 +238,8 @@ namespace { class SPUDAGToDAGISel : public SelectionDAGISel { - SPUTargetMachine &TM; - SPUTargetLowering &SPUtli; + const SPUTargetMachine &TM; + const SPUTargetLowering &SPUtli; unsigned GlobalBaseReg; public: @@ -310,8 +309,7 @@ namespace { SDValue CPIdx = CurDAG->getConstantPool(CP, SPUtli.getPointerTy()); unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment(); SDValue CGPoolOffset = - SPU::LowerConstantPool(CPIdx, *CurDAG, - SPUtli.getSPUTargetMachine()); + SPU::LowerConstantPool(CPIdx, *CurDAG, TM); HandleSDNode Dummy(CurDAG->getLoad(vecVT, dl, CurDAG->getEntryNode(), CGPoolOffset, |