aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-06-29 23:57:05 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-06-29 23:57:05 +0000
commit322812e603705e1c2037313633e72f689524b163 (patch)
tree7d13d6695fbade190d0cc907b4b48dd5dbce83b5 /utils
parent7dabf399b95aad4056985eac346451e134de9ebe (diff)
Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to reduce instruction selection function stack size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index d478a1e680..bf9c27a6ac 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -2450,14 +2450,16 @@ public:
emitCode("if (!Match) {");
for (std::vector<std::string>::iterator AI = InflightNodes.begin(),
AE = InflightNodes.end(); AI != AE; ++AI)
- emitCode(" InFlightSet.erase(" + *AI + ".Val);");
+ emitCode(" SelectionDAG::RemoveInFlightSetEntry(InFlightSet, " +
+ *AI + ".Val);");
emitCode("}");
}
emitCheck("Match");
for (unsigned i = 0; i < NumRes; ++i) {
- emitCode("InFlightSet.insert(CPTmp" + utostr(i+ResNo) + ".Val);");
+ emitCode("SelectionDAG::InsertInFlightSetEntry(InFlightSet, CPTmp" +
+ utostr(i+ResNo) + ".Val);");
InflightNodes.push_back("CPTmp" + utostr(i+ResNo));
}
for (unsigned i = 0; i < NumRes; ++i) {
@@ -2579,7 +2581,8 @@ public:
assert(!Val.empty() &&
"Variable referenced but not defined and not caught earlier!");
if (Child->isLeaf() && !NodeGetComplexPattern(Child, ISE)) {
- emitCode("InFlightSet.insert(" + Val + ".Val);");
+ emitCode("SelectionDAG::InsertInFlightSetEntry(InFlightSet, " +
+ Val + ".Val);");
InflightNodes.push_back(Val);
}
}
@@ -2616,7 +2619,8 @@ public:
// The operands have been selected. Remove them from InFlightSet.
for (std::vector<std::string>::iterator AI = InflightNodes.begin(),
AE = InflightNodes.end(); AI != AE; ++AI)
- emitCode("InFlightSet.erase(" + *AI + ".Val);");
+ emitCode("SelectionDAG::RemoveInFlightSetEntry(InFlightSet, " +
+ *AI + ".Val);");
}
unsigned NumResults = Inst.getNumResults();