mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 02:42:58 +00:00
[CodeGen] Add space-optimized EmitMergeInputChains1_2 to the DAG isel matching tables. Shaves about 5100 bytes from the X86 matcher table. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f73f5cd094
commit
4016ad20d2
@ -140,6 +140,7 @@ public:
|
||||
OPC_EmitMergeInputChains,
|
||||
OPC_EmitMergeInputChains1_0,
|
||||
OPC_EmitMergeInputChains1_1,
|
||||
OPC_EmitMergeInputChains1_2,
|
||||
OPC_EmitCopyToReg,
|
||||
OPC_EmitNodeXForm,
|
||||
OPC_EmitNode,
|
||||
|
@ -3051,7 +3051,8 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
}
|
||||
|
||||
case OPC_EmitMergeInputChains1_0: // OPC_EmitMergeInputChains, 1, 0
|
||||
case OPC_EmitMergeInputChains1_1: { // OPC_EmitMergeInputChains, 1, 1
|
||||
case OPC_EmitMergeInputChains1_1: // OPC_EmitMergeInputChains, 1, 1
|
||||
case OPC_EmitMergeInputChains1_2: { // OPC_EmitMergeInputChains, 1, 2
|
||||
// These are space-optimized forms of OPC_EmitMergeInputChains.
|
||||
assert(!InputChain.getNode() &&
|
||||
"EmitMergeInputChains should be the first chain producing node");
|
||||
@ -3059,7 +3060,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
"Should only have one EmitMergeInputChains per match");
|
||||
|
||||
// Read all of the chained nodes.
|
||||
unsigned RecNo = Opcode == OPC_EmitMergeInputChains1_1;
|
||||
unsigned RecNo = Opcode - OPC_EmitMergeInputChains1_0;
|
||||
assert(RecNo < RecordedNodes.size() && "Invalid EmitMergeInputChains");
|
||||
ChainNodesMatched.push_back(RecordedNodes[RecNo].first.getNode());
|
||||
|
||||
|
@ -500,8 +500,8 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
|
||||
const EmitMergeInputChainsMatcher *MN =
|
||||
cast<EmitMergeInputChainsMatcher>(N);
|
||||
|
||||
// Handle the specialized forms OPC_EmitMergeInputChains1_0 and 1_1.
|
||||
if (MN->getNumNodes() == 1 && MN->getNode(0) < 2) {
|
||||
// Handle the specialized forms OPC_EmitMergeInputChains1_0, 1_1, and 1_2.
|
||||
if (MN->getNumNodes() == 1 && MN->getNode(0) < 3) {
|
||||
OS << "OPC_EmitMergeInputChains1_" << MN->getNode(0) << ",\n";
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user