summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelDAGToDAG.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
commit2c836cf1870cada5c09c69b6b35a9b5d3aca5e8f (patch)
tree3dc90c89c7afe8506b10368f93ba0d543824d7f6 /llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
parente4ac7a40595365f55dca86e05a3dce6ff467e0ce (diff)
downloadbcm5719-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/ARM/ARMISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
index 46b9a19376e..560be0ad96e 100644
--- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -39,15 +39,13 @@ namespace {
class ARMDAGToDAGISel : public SelectionDAGISel {
ARMTargetMachine &TM;
- ARMTargetLowering ARMLowering;
-
/// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
/// make the right decision when generating code for different targets.
const ARMSubtarget *Subtarget;
public:
explicit ARMDAGToDAGISel(ARMTargetMachine &tm)
- : SelectionDAGISel(ARMLowering), TM(tm), ARMLowering(tm),
+ : SelectionDAGISel(*tm.getTargetLowering()), TM(tm),
Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
}
OpenPOWER on IntegriCloud