aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-08-01 01:07:48 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-08-01 01:07:48 +0000
commitd3f8429f01150976d415e46aea999ec1938a6e50 (patch)
treee3147ad8c28e72abb417ab5c8ca5245ca530044f
parent8825a485e2e99216adc0c469a7c43895cd4eae40 (diff)
Pass N by reference to select functions to prevent gcc from allocating more stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29423 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index a15a6ba0f9..e0bc583cc6 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1829,7 +1829,7 @@ static void GenerateVariantsOf(TreePatternNode *N,
// If this node is commutative, consider the commuted order.
if (NodeInfo.hasProperty(SDNodeInfo::SDNPCommutative)) {
assert(N->getNumChildren()==2 &&"Commutative but doesn't have 2 children!");
- // Don't count childrean which are actually
+ // Don't count children which are actually register references.
unsigned NC = 0;
for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i) {
TreePatternNode *Child = N->getChild(i);
@@ -3321,7 +3321,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
}
std::string CalleeDecls;
- std::string CalleeCode = "(SDOperand &Result, SDOperand &N";
+ std::string CalleeCode = "(SDOperand &Result, const SDOperand &N";
std::string CallerCode = "(Result, N";
for (unsigned j = 0, e = TargetOpcodes.size(); j != e; ++j) {
CalleeCode += ", unsigned Opc" + utostr(j);
@@ -3399,7 +3399,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
OpVTI->second.push_back(OpVTStr);
OS << "void Select_" << OpName << (OpVTStr != "" ? "_" : "")
- << OpVTStr << "(SDOperand &Result, SDOperand N) {\n";
+ << OpVTStr << "(SDOperand &Result, const SDOperand &N) {\n";
if (OptSlctOrder) {
OS << " if (N.ResNo == " << OpcodeInfo.getNumResults()
<< " && N.getValue(0).hasOneUse()) {\n"