summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-03 16:55:19 +0000
committerDan Gohman <gohman@apple.com>2008-10-03 16:55:19 +0000
commitda8ac5fd9130b70b61be61e4819faa8d842d708f (patch)
treef5cd677e4925c97b3acedfa9cb18693a5429a162 /lib/Target/PowerPC/PPCISelDAGToDAG.cpp
parent38217fef57de72064ba74a165cf100d785dfcad0 (diff)
downloadllvm-da8ac5fd9130b70b61be61e4819faa8d842d708f.tar.gz
llvm-da8ac5fd9130b70b61be61e4819faa8d842d708f.tar.bz2
llvm-da8ac5fd9130b70b61be61e4819faa8d842d708f.tar.xz
Avoid creating two TargetLowering objects for each target.
Instead, just create one, and make sure everything that needs it can access it. Previously most of the SelectionDAGISel subclasses all had their own TargetLowering object, which was redundant with the TargetLowering object in the TargetMachine subclasses, except on Sparc, where SparcTargetMachine didn't have a TargetLowering object. Change Sparc to work more like the other targets here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelDAGToDAG.cpp')
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 6b2ec4a890..56d6a58591 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -41,12 +41,12 @@ namespace {
///
class VISIBILITY_HIDDEN PPCDAGToDAGISel : public SelectionDAGISel {
PPCTargetMachine &TM;
- PPCTargetLowering PPCLowering;
+ PPCTargetLowering &PPCLowering;
const PPCSubtarget &PPCSubTarget;
unsigned GlobalBaseReg;
public:
explicit PPCDAGToDAGISel(PPCTargetMachine &tm)
- : SelectionDAGISel(PPCLowering), TM(tm),
+ : SelectionDAGISel(*tm.getTargetLowering()), TM(tm),
PPCLowering(*TM.getTargetLowering()),
PPCSubTarget(*TM.getSubtargetImpl()) {}