diff options
author | Justin Bogner <mail@justinbogner.com> | 2016-05-23 16:52:53 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2016-05-23 16:52:53 +0000 |
commit | 30680ad2f1ad33d1894c4d347fdc558b3148dd1f (patch) | |
tree | 24d1c86033e01415b9b44e904d21af483d141e06 /include | |
parent | 5131c267e1377b052abaee29e53904e2fe6c6d61 (diff) |
SDAG: Remove the transitional default Select() implementation
In r268693, we started requiring that SelectionDAGISel::Select return
void, but provided a default implementation that did just that by
calling into the old interface. Now that all targets have been
updated, we'll just remove the default implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGISel.h | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index b83a8897d86..3c7e9662dc7 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -77,39 +77,7 @@ public: virtual void PostprocessISelDAG() {} /// Main hook for targets to transform nodes into machine nodes. - /// - /// All targets should implement this hook. The default implementation will be - /// made abstract once all targets are migrated off of the legacy hook. - virtual void Select(SDNode *N) { - SDNode *New = SelectImpl(N); - // TODO: Checking DELETED_NODE here is undefined behaviour, which will be - // fixed by migrating backends to implement the void Select interface - // instead or returning a node. - if (New == N || N->getOpcode() == ISD::DELETED_NODE) - // If we ask to replace the node with itself or if we deleted the original - // node, just move on to the next one. This case will go away once - // everyone migrates to stop implementing SelectImpl. - return; - if (New) { - // Replace the node with the returned node. Originally, Select would - // always return a node and the caller would replace it, but this doesn't - // work for more complicated selection schemes. - ReplaceUses(N, New); - CurDAG->RemoveDeadNode(N); - } else if (N->use_empty()) - // Clean up dangling nodes if the target didn't bother. These are - // basically bugs in the targets, but we were lenient in the past and did - // this for them. - CurDAG->RemoveDeadNode(N); - } - - /// Legacy hook to support transitioning to the return-less Select(). - /// - /// This exposes the old style Select hook. New code should implement void - /// Select() instead. - virtual SDNode *SelectImpl(SDNode *N) { - llvm_unreachable("Subclasses must implement one of Select or SelectImpl"); - } + virtual void Select(SDNode *N) = 0; /// SelectInlineAsmMemoryOperand - Select the specified address as a target /// addressing mode, according to the specified constraint. If this does |