forked from OSchip/llvm-project
Fix for bug 840. Only use noinline attribute if gcc version >= 3.4
llvm-svn: 29311
This commit is contained in:
parent
23a21c19d9
commit
9384400d83
|
@ -3363,11 +3363,9 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
|||
}
|
||||
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 @@ void DAGISelEmitter::run(std::ostream &OS) {
|
|||
<< "// *** 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";
|
||||
|
|
Loading…
Reference in New Issue