summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-04 01:23:08 +0000
committerChris Lattner <sabre@nondot.org>2010-03-04 01:23:08 +0000
commit0acbb71badd565a75a3c41e04908ca0b56717b5f (patch)
tree5dd269a3e182e9d8818477062caad9a837390025 /llvm/lib/CodeGen
parent9eba9dfb0c525eb20eedad1bed92a459a591600c (diff)
downloadbcm5719-llvm-0acbb71badd565a75a3c41e04908ca0b56717b5f.tar.gz
bcm5719-llvm-0acbb71badd565a75a3c41e04908ca0b56717b5f.zip
change the new isel matcher to emit ComplexPattern matches
as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. llvm-svn: 97703
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index c1d159af63a..44f99181dea 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -2249,11 +2249,15 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
N.getNode()))
break;
continue;
- case OPC_CheckComplexPat:
- if (!CheckComplexPattern(NodeToMatch, N,
- MatcherTable[MatcherIndex++], RecordedNodes))
+ case OPC_CheckComplexPat: {
+ unsigned CPNum = MatcherTable[MatcherIndex++];
+ unsigned RecNo = MatcherTable[MatcherIndex++];
+ assert(RecNo < RecordedNodes.size() && "Invalid CheckComplexPat");
+ if (!CheckComplexPattern(NodeToMatch, RecordedNodes[RecNo], CPNum,
+ RecordedNodes))
break;
continue;
+ }
case OPC_CheckOpcode:
if (!::CheckOpcode(MatcherTable, MatcherIndex, N.getNode())) break;
continue;
OpenPOWER on IntegriCloud