mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-21 19:20:50 +00:00
SDAG: Implement Select instead of SelectImpl in WebAssemblyDAGToDAGISel
This backend doesn't do anything custom here yet, so we just modernize the boilerplate. Part of llvm.org/pr26808. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269506 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a719a1dad2
commit
20520cf22a
@ -54,7 +54,7 @@ public:
|
||||
return SelectionDAGISel::runOnMachineFunction(MF);
|
||||
}
|
||||
|
||||
SDNode *SelectImpl(SDNode *Node) override;
|
||||
void Select(SDNode *Node) override;
|
||||
|
||||
bool SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID,
|
||||
std::vector<SDValue> &OutOps) override;
|
||||
@ -67,7 +67,7 @@ private:
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
SDNode *WebAssemblyDAGToDAGISel::SelectImpl(SDNode *Node) {
|
||||
void WebAssemblyDAGToDAGISel::Select(SDNode *Node) {
|
||||
// Dump information about the Node being selected.
|
||||
DEBUG(errs() << "Selecting: ");
|
||||
DEBUG(Node->dump(CurDAG));
|
||||
@ -77,11 +77,10 @@ SDNode *WebAssemblyDAGToDAGISel::SelectImpl(SDNode *Node) {
|
||||
if (Node->isMachineOpcode()) {
|
||||
DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n");
|
||||
Node->setNodeId(-1);
|
||||
return nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
// Few custom selection stuff.
|
||||
SDNode *ResNode = nullptr;
|
||||
EVT VT = Node->getValueType(0);
|
||||
|
||||
switch (Node->getOpcode()) {
|
||||
@ -92,16 +91,7 @@ SDNode *WebAssemblyDAGToDAGISel::SelectImpl(SDNode *Node) {
|
||||
}
|
||||
|
||||
// Select the default instruction.
|
||||
ResNode = SelectCode(Node);
|
||||
|
||||
DEBUG(errs() << "=> ");
|
||||
if (ResNode == nullptr || ResNode == Node)
|
||||
DEBUG(Node->dump(CurDAG));
|
||||
else
|
||||
DEBUG(ResNode->dump(CurDAG));
|
||||
DEBUG(errs() << "\n");
|
||||
|
||||
return ResNode;
|
||||
SelectCode(Node);
|
||||
}
|
||||
|
||||
bool WebAssemblyDAGToDAGISel::SelectInlineAsmMemoryOperand(
|
||||
|
Loading…
x
Reference in New Issue
Block a user