summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGISel.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-20 22:08:50 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-20 22:08:50 +0000
commit8c48e4ff899303eb9a4ea8ed1c43d175f0cf48ff (patch)
tree1d7abb045603aadda7bb4e411bf834dd3fc9f12c /include/llvm/CodeGen/SelectionDAGISel.h
parentbc7d448f242b1bbc1031fb87cd69c285ff9aaffa (diff)
downloadllvm-8c48e4ff899303eb9a4ea8ed1c43d175f0cf48ff.tar.gz
llvm-8c48e4ff899303eb9a4ea8ed1c43d175f0cf48ff.tar.bz2
llvm-8c48e4ff899303eb9a4ea8ed1c43d175f0cf48ff.tar.xz
Make ISelPosition a local variable.
Now that multiple DAGUpdateListeners can be active at the same time, ISelPosition can become a local variable in DoInstructionSelection. We simply register an ISelUpdater with CurDAG while ISelPosition exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGISel.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 6829a570a2..c42f655800 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -172,49 +172,21 @@ protected:
///
unsigned DAGSize;
- /// ISelPosition - Node iterator marking the current position of
- /// instruction selection as it procedes through the topologically-sorted
- /// node list.
- SelectionDAG::allnodes_iterator ISelPosition;
-
-
- /// ISelUpdater - helper class to handle updates of the
- /// instruction selection graph.
- class ISelUpdater : public SelectionDAG::DAGUpdateListener {
- virtual void anchor();
- SelectionDAG::allnodes_iterator &ISelPosition;
- public:
- ISelUpdater(SelectionDAG &DAG, SelectionDAG::allnodes_iterator &isp)
- : SelectionDAG::DAGUpdateListener(DAG), ISelPosition(isp) {}
-
- /// NodeDeleted - Handle nodes deleted from the graph. If the
- /// node being deleted is the current ISelPosition node, update
- /// ISelPosition.
- ///
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
- if (ISelPosition == SelectionDAG::allnodes_iterator(N))
- ++ISelPosition;
- }
- };
-
/// ReplaceUses - replace all uses of the old node F with the use
/// of the new node T.
void ReplaceUses(SDValue F, SDValue T) {
- ISelUpdater ISU(*CurDAG, ISelPosition);
CurDAG->ReplaceAllUsesOfValueWith(F, T);
}
/// ReplaceUses - replace all uses of the old nodes F with the use
/// of the new nodes T.
void ReplaceUses(const SDValue *F, const SDValue *T, unsigned Num) {
- ISelUpdater ISU(*CurDAG, ISelPosition);
CurDAG->ReplaceAllUsesOfValuesWith(F, T, Num);
}
/// ReplaceUses - replace all uses of the old node F with the use
/// of the new node T.
void ReplaceUses(SDNode *F, SDNode *T) {
- ISelUpdater ISU(*CurDAG, ISelPosition);
CurDAG->ReplaceAllUsesWith(F, T);
}