diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-23 04:36:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-23 04:36:06 +0000 |
commit | 063287a76b5d1486f498fcf674a26d1155471a3f (patch) | |
tree | 3ea3bc1fc0eb68aaf2d38a1589099f4b1dbf194b /include/llvm/CodeGen | |
parent | 1fefef1b2714c855d0700cecde11513af8fb9046 (diff) | |
download | external_llvm-063287a76b5d1486f498fcf674a26d1155471a3f.zip external_llvm-063287a76b5d1486f498fcf674a26d1155471a3f.tar.gz external_llvm-063287a76b5d1486f498fcf674a26d1155471a3f.tar.bz2 |
Give SelectionDAG a TargetLowering instance instead of TM instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 8c2020d..8c65742 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -36,7 +36,7 @@ namespace llvm { /// linear form. /// class SelectionDAG { - const TargetMachine &TM; + TargetLowering &TLI; MachineFunction &MF; // Root - The root of the entire DAG. EntryNode - The starting token. @@ -45,13 +45,14 @@ class SelectionDAG { // AllNodes - All of the nodes in the DAG std::vector<SDNode*> AllNodes; public: - SelectionDAG(const TargetMachine &tm, MachineFunction &mf) : TM(tm), MF(mf) { + SelectionDAG(TargetLowering &tli, MachineFunction &mf) : TLI(tli), MF(mf) { EntryNode = Root = getNode(ISD::EntryToken, MVT::Other); } ~SelectionDAG(); MachineFunction &getMachineFunction() const { return MF; } - const TargetMachine &getTarget() { return TM; } + const TargetMachine &getTarget() const; + TargetLowering &getTargetLoweringInfo() const { return TLI; } /// viewGraph - Pop up a ghostview window with the DAG rendered using 'dot'. /// @@ -80,7 +81,7 @@ public: /// /// Note that this is an involved process that may invalidate pointers into /// the graph. - void Legalize(TargetLowering &TLI); + void Legalize(); /// RemoveDeadNodes - This method deletes all unreachable nodes in the /// SelectionDAG, including nodes (like loads) that have uses of their token |