mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -2464,7 +2464,7 @@ public:
|
|||||||
emitCode("SDOperand Chain" + ChainSuffix + ";");
|
emitCode("SDOperand Chain" + ChainSuffix + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Code = Fn + "(" + RootName;
|
std::string Code = Fn + "(" + RootName + ", " + RootName;
|
||||||
for (unsigned i = 0; i < NumOps; i++)
|
for (unsigned i = 0; i < NumOps; i++)
|
||||||
Code += ", CPTmp" + utostr(i);
|
Code += ", CPTmp" + utostr(i);
|
||||||
if (CP->hasProperty(SDNPHasChain)) {
|
if (CP->hasProperty(SDNPHasChain)) {
|
||||||
@@ -2531,10 +2531,10 @@ public:
|
|||||||
emitCode("SDOperand " + ChainName + ";");
|
emitCode("SDOperand " + ChainName + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Code = Fn + "(";
|
std::string Code = Fn + "(N, ";
|
||||||
if (CP->hasProperty(SDNPHasChain)) {
|
if (CP->hasProperty(SDNPHasChain)) {
|
||||||
std::string ParentName(RootName.begin(), RootName.end()-1);
|
std::string ParentName(RootName.begin(), RootName.end()-1);
|
||||||
Code += "N, " + ParentName + ", ";
|
Code += ParentName + ", ";
|
||||||
}
|
}
|
||||||
Code += RootName;
|
Code += RootName;
|
||||||
for (unsigned i = 0; i < NumOps; i++)
|
for (unsigned i = 0; i < NumOps; i++)
|
||||||
@@ -2662,7 +2662,6 @@ public:
|
|||||||
// value if used multiple times by this pattern result.
|
// value if used multiple times by this pattern result.
|
||||||
Val = "Tmp"+utostr(ResNo);
|
Val = "Tmp"+utostr(ResNo);
|
||||||
} else if (N->isLeaf() && (CP = NodeGetComplexPattern(N, ISE))) {
|
} else if (N->isLeaf() && (CP = NodeGetComplexPattern(N, ISE))) {
|
||||||
std::string Fn = CP->getSelectFunc();
|
|
||||||
for (unsigned i = 0; i < CP->getNumOperands(); ++i) {
|
for (unsigned i = 0; i < CP->getNumOperands(); ++i) {
|
||||||
emitCode("AddToISelQueue(CPTmp" + utostr(i) + ");");
|
emitCode("AddToISelQueue(CPTmp" + utostr(i) + ");");
|
||||||
NodeOps.push_back("CPTmp" + utostr(i));
|
NodeOps.push_back("CPTmp" + utostr(i));
|
||||||
|
Reference in New Issue
Block a user