summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelEmitter.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-11-08 20:31:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-11-08 20:31:10 +0000
commit811731e340c54f761a199a6b2d35af7f03b42664 (patch)
tree8ed3be3bb2b071b4f0607bdfab739279047a0315 /utils/TableGen/DAGISelEmitter.cpp
parentb00dddd1643f207f09de382dd67675f375327bb7 (diff)
downloadllvm-811731e340c54f761a199a6b2d35af7f03b42664.tar.gz
llvm-811731e340c54f761a199a6b2d35af7f03b42664.tar.bz2
llvm-811731e340c54f761a199a6b2d35af7f03b42664.tar.xz
Always pass the root node to ComplexPattern isel matching function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 0701ffbd7d..1940c9f5dc 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -2464,7 +2464,7 @@ public:
emitCode("SDOperand Chain" + ChainSuffix + ";");
}
- std::string Code = Fn + "(" + RootName;
+ std::string Code = Fn + "(" + RootName + ", " + RootName;
for (unsigned i = 0; i < NumOps; i++)
Code += ", CPTmp" + utostr(i);
if (CP->hasProperty(SDNPHasChain)) {
@@ -2531,10 +2531,10 @@ public:
emitCode("SDOperand " + ChainName + ";");
}
- std::string Code = Fn + "(";
+ std::string Code = Fn + "(N, ";
if (CP->hasProperty(SDNPHasChain)) {
std::string ParentName(RootName.begin(), RootName.end()-1);
- Code += "N, " + ParentName + ", ";
+ Code += ParentName + ", ";
}
Code += RootName;
for (unsigned i = 0; i < NumOps; i++)
@@ -2662,7 +2662,6 @@ public:
// value if used multiple times by this pattern result.
Val = "Tmp"+utostr(ResNo);
} else if (N->isLeaf() && (CP = NodeGetComplexPattern(N, ISE))) {
- std::string Fn = CP->getSelectFunc();
for (unsigned i = 0; i < CP->getNumOperands(); ++i) {
emitCode("AddToISelQueue(CPTmp" + utostr(i) + ");");
NodeOps.push_back("CPTmp" + utostr(i));