Quick workaround for a LLVM 2.9 crash with higher optimization levels.

createFunctionAttrsPass() is a LLVM pass and the crash is deep in LLVM code, maybe something is wrong with the pass manager state.
This commit is contained in:
David Nadlinger
2011-04-20 20:44:49 +02:00
parent 8d545a18c1
commit 3e28eecfea

View File

@@ -124,7 +124,11 @@ static void addPassesForOptLevel(PassManager& pm) {
addPass(pm, createInstructionCombiningPass());
addPass(pm, createCFGSimplificationPass());
addPass(pm, createPruneEHPass());
addPass(pm, createFunctionAttrsPass());
// FIXME: Adding this pass crashes LLVM 2.9 in
// PMTopLevelManager::schedulePass(), commented out for a quick fix.
// addPass(pm, createFunctionAttrsPass());
addPass(pm, createTailCallEliminationPass());
addPass(pm, createCFGSimplificationPass());
addPass(pm, createGVNPass());