diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-03 16:55:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-03 16:55:19 +0000 |
commit | da8ac5fd9130b70b61be61e4819faa8d842d708f (patch) | |
tree | f5cd677e4925c97b3acedfa9cb18693a5429a162 /lib/Target/Mips/MipsISelDAGToDAG.cpp | |
parent | 38217fef57de72064ba74a165cf100d785dfcad0 (diff) | |
download | llvm-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/Mips/MipsISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Mips/MipsISelDAGToDAG.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Target/Mips/MipsISelDAGToDAG.cpp b/lib/Target/Mips/MipsISelDAGToDAG.cpp index a408a9623c..669f62f9f1 100644 --- a/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -52,19 +52,14 @@ class VISIBILITY_HIDDEN MipsDAGToDAGISel : public SelectionDAGISel { /// TM - Keep a reference to MipsTargetMachine. MipsTargetMachine &TM; - /// MipsLowering - This object fully describes how to lower LLVM code to an - /// Mips-specific SelectionDAG. - MipsTargetLowering MipsLowering; - /// Subtarget - Keep a pointer to the MipsSubtarget around so that we can /// make the right decision when generating code for different targets. const MipsSubtarget &Subtarget; public: explicit MipsDAGToDAGISel(MipsTargetMachine &tm) : - SelectionDAGISel(MipsLowering), - TM(tm), MipsLowering(*TM.getTargetLowering()), - Subtarget(tm.getSubtarget<MipsSubtarget>()) {} + SelectionDAGISel(*tm.getTargetLowering()), + TM(tm), Subtarget(tm.getSubtarget<MipsSubtarget>()) {} virtual void InstructionSelect(); |