[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jul 26 16:06:41 PDT 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.225 -> 1.226
---
Log message:
Fix for bug 840: http://llvm.org/PR840 . Only use noinline attribute if gcc version >= 3.4
---
Diffs of the changes: (+6 -3)
DAGISelEmitter.cpp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.225 llvm/utils/TableGen/DAGISelEmitter.cpp:1.226
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.225 Fri Jul 21 17:19:51 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Jul 26 18:06:27 2006
@@ -3363,11 +3363,9 @@
}
CallerCode += ");";
CalleeCode += ") ";
-#ifdef __GNUC__
// Prevent emission routines from being inlined to reduce selection
// routines stack frame sizes.
- CalleeCode += "__attribute__((noinline)) ";
-#endif
+ CalleeCode += "NOINLINE ";
CalleeCode += "{\n" + CalleeDecls;
for (int j = LastPred+1; j < CodeSize; ++j)
CalleeCode += " " + GeneratedCode[j].second + '\n';
@@ -3632,6 +3630,11 @@
<< "// *** instruction selector class. These functions are really "
<< "methods.\n\n";
+ OS << "#if defined(__GNUC__) && \\\n";
+ OS << " ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)))\n";
+ OS << "#define NOINLINE __attribute__((noinline))\n";
+ OS << "#endif\n\n";
+
OS << "// Instance var to keep track of multiply used nodes that have \n"
<< "// already been selected.\n"
<< "std::map<SDOperand, SDOperand> CodeGenMap;\n";
More information about the llvm-commits
mailing list