mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -113,7 +113,7 @@ namespace {
|
||||
|
||||
/// X86Lowering - This object fully describes how to lower LLVM code to an
|
||||
/// X86-specific SelectionDAG.
|
||||
X86TargetLowering X86Lowering;
|
||||
X86TargetLowering &X86Lowering;
|
||||
|
||||
/// Subtarget - Keep a pointer to the X86Subtarget around so that we can
|
||||
/// make the right decision when generating code for different targets.
|
||||
@@ -129,7 +129,7 @@ namespace {
|
||||
|
||||
public:
|
||||
X86DAGToDAGISel(X86TargetMachine &tm, bool fast)
|
||||
: SelectionDAGISel(X86Lowering, fast),
|
||||
: SelectionDAGISel(*tm.getTargetLowering(), fast),
|
||||
TM(tm), X86Lowering(*TM.getTargetLowering()),
|
||||
Subtarget(&TM.getSubtarget<X86Subtarget>()),
|
||||
OptForSize(false) {}
|
||||
|
Reference in New Issue
Block a user