summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-05-23 16:52:53 +0000
committerJustin Bogner <mail@justinbogner.com>2016-05-23 16:52:53 +0000
commit45fe81fb64e379534d9c271eb5bb1fb238b435d0 (patch)
tree1f8f0f83ef1d202063cfba50a799a5f0875796c5
parenta5ad4d691bd1e7db190362597bca638926b18699 (diff)
downloadbcm5719-llvm-45fe81fb64e379534d9c271eb5bb1fb238b435d0.tar.gz
bcm5719-llvm-45fe81fb64e379534d9c271eb5bb1fb238b435d0.zip
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. llvm-svn: 270454
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGISel.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/llvm/include/llvm/CodeGen/SelectionDAGISel.h
index b83a8897d86..3c7e9662dc7 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/llvm/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
OpenPOWER on IntegriCloud