diff options
| author | Dan Gohman <gohman@apple.com> | 2009-01-16 02:05:52 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-01-16 02:05:52 +0000 |
| commit | 3e35fe8968e080da2ab5e7ff72b480a2ef85e8b2 (patch) | |
| tree | 6ae7915373a94c79c76dd1188502304c5de66628 /llvm/utils/TableGen | |
| parent | f557d831a7609f983a4a58c5c595c106bd83717d (diff) | |
| download | bcm5719-llvm-3e35fe8968e080da2ab5e7ff72b480a2ef85e8b2.tar.gz bcm5719-llvm-3e35fe8968e080da2ab5e7ff72b480a2ef85e8b2.zip | |
Add support for instructions with multiple ComplexPatterns, by
adding more information to the temporary variables names so that
they don't conflict.
llvm-svn: 62296
Diffstat (limited to 'llvm/utils/TableGen')
| -rw-r--r-- | llvm/utils/TableGen/DAGISelEmitter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 2c6b6dae309..ace1d7646f5 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -613,8 +613,8 @@ public: std::string Fn = CP->getSelectFunc(); unsigned NumOps = CP->getNumOperands(); for (unsigned i = 0; i < NumOps; ++i) { - emitDecl("CPTmp" + utostr(i)); - emitCode("SDValue CPTmp" + utostr(i) + ";"); + emitDecl("CPTmp" + RootName + "_" + utostr(i)); + emitCode("SDValue CPTmp" + RootName + "_" + utostr(i) + ";"); } if (CP->hasProperty(SDNPHasChain)) { emitDecl("CPInChain"); @@ -625,7 +625,7 @@ public: std::string Code = Fn + "(" + RootName + ", " + RootName; for (unsigned i = 0; i < NumOps; i++) - Code += ", CPTmp" + utostr(i); + Code += ", CPTmp" + RootName + "_" + utostr(i); if (CP->hasProperty(SDNPHasChain)) { ChainName = "Chain" + ChainSuffix; Code += ", CPInChain, Chain" + ChainSuffix; @@ -687,8 +687,8 @@ public: std::string Fn = CP->getSelectFunc(); unsigned NumOps = CP->getNumOperands(); for (unsigned i = 0; i < NumOps; ++i) { - emitDecl("CPTmp" + utostr(i)); - emitCode("SDValue CPTmp" + utostr(i) + ";"); + emitDecl("CPTmp" + RootName + "_" + utostr(i)); + emitCode("SDValue CPTmp" + RootName + "_" + utostr(i) + ";"); } if (CP->hasProperty(SDNPHasChain)) { const SDNodeInfo &PInfo = CGP.getSDNodeInfo(Parent->getOperator()); @@ -713,7 +713,7 @@ public: } Code += RootName; for (unsigned i = 0; i < NumOps; i++) - Code += ", CPTmp" + utostr(i); + Code += ", CPTmp" + RootName + "_" + utostr(i); if (CP->hasProperty(SDNPHasChain)) Code += ", CPInChain, Chain" + ChainSuffix; emitCheck(Code + ")"); @@ -862,7 +862,7 @@ public: NodeOps.push_back(Val); } else if (N->isLeaf() && (CP = NodeGetComplexPattern(N, CGP))) { for (unsigned i = 0; i < CP->getNumOperands(); ++i) { - NodeOps.push_back("CPTmp" + utostr(i)); + NodeOps.push_back("CPTmp" + Val + "_" + utostr(i)); } } else { // This node, probably wrapped in a SDNodeXForm, behaves like a leaf |

