summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-19 19:22:07 +0000
committerDan Gohman <gohman@apple.com>2010-04-19 19:22:07 +0000
commit50d2b1ac029d63500ea9b9347561b1454fa6ed6a (patch)
tree846bfe2f516f7877d7c5463ee0c0828004064cd1 /include
parent285fb1cc4a7ea924b4d94e9c2cb890125d56a7e0 (diff)
downloadllvm-50d2b1ac029d63500ea9b9347561b1454fa6ed6a.tar.gz
llvm-50d2b1ac029d63500ea9b9347561b1454fa6ed6a.tar.bz2
llvm-50d2b1ac029d63500ea9b9347561b1454fa6ed6a.tar.xz
Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index 8b71f989b0..bb3274dcad 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -117,6 +117,7 @@ void checkForCycles(const SelectionDAG *DAG);
/// linear form.
///
class SelectionDAG {
+ const TargetMachine &TM;
const TargetLowering &TLI;
MachineFunction *MF;
FunctionLoweringInfo &FLI;
@@ -172,7 +173,7 @@ class SelectionDAG {
SelectionDAG(const SelectionDAG&); // Do not implement.
public:
- SelectionDAG(const TargetLowering &tli, FunctionLoweringInfo &fli);
+ SelectionDAG(const TargetMachine &TM, FunctionLoweringInfo &fli);
~SelectionDAG();
/// init - Prepare this SelectionDAG to process code in the given
@@ -186,7 +187,7 @@ public:
void clear();
MachineFunction &getMachineFunction() const { return *MF; }
- const TargetMachine &getTarget() const;
+ const TargetMachine &getTarget() const { return TM; }
const TargetLowering &getTargetLoweringInfo() const { return TLI; }
FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; }
LLVMContext *getContext() const {return Context; }