[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 22 20:36:19 PST 2005
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAG.h updated: 1.17 -> 1.18
---
Log message:
Give SelectionDAG a TargetLowering instance instead of TM instance.
---
Diffs of the changes: (+5 -4)
SelectionDAG.h | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.17 llvm/include/llvm/CodeGen/SelectionDAG.h:1.18
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.17 Wed Jan 19 14:19:58 2005
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Sat Jan 22 22:36:06 2005
@@ -36,7 +36,7 @@
/// 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 @@
// 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 @@
///
/// 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
More information about the llvm-commits
mailing list