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 | 2c836cf1870cada5c09c69b6b35a9b5d3aca5e8f (patch) | |
| tree | 3dc90c89c7afe8506b10368f93ba0d543824d7f6 /llvm/lib/Target/PIC16 | |
| parent | e4ac7a40595365f55dca86e05a3dce6ff467e0ce (diff) | |
| download | bcm5719-llvm-2c836cf1870cada5c09c69b6b35a9b5d3aca5e8f.tar.gz bcm5719-llvm-2c836cf1870cada5c09c69b6b35a9b5d3aca5e8f.zip | |
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.
llvm-svn: 57016
Diffstat (limited to 'llvm/lib/Target/PIC16')
| -rw-r--r-- | llvm/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp b/llvm/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp index 3fc7c72a61c..285c5a6355e 100644 --- a/llvm/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp +++ b/llvm/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp @@ -51,14 +51,10 @@ class VISIBILITY_HIDDEN PIC16DAGToDAGISel : public SelectionDAGISel { /// TM - Keep a reference to PIC16TargetMachine. PIC16TargetMachine &TM; - /// PIC16Lowering - This object fully describes how to lower LLVM code to an - /// PIC16-specific SelectionDAG. - PIC16TargetLowering PIC16Lowering; - public: explicit PIC16DAGToDAGISel(PIC16TargetMachine &tm) : - SelectionDAGISel(PIC16Lowering), - TM(tm), PIC16Lowering(*TM.getTargetLowering()) {} + SelectionDAGISel(*tm.getTargetLowering()), + TM(tm) {} virtual void InstructionSelect(); |

