aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/StandardPasses.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/StandardPasses.h')
-rw-r--r--include/llvm/Support/StandardPasses.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h
index 6a79b5d..a539444 100644
--- a/include/llvm/Support/StandardPasses.h
+++ b/include/llvm/Support/StandardPasses.h
@@ -107,13 +107,12 @@ namespace llvm {
PM->add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
// Start of CallGraph SCC passes.
- if (UnitAtATime) {
- if (HaveExceptions)
- PM->add(createPruneEHPass()); // Remove dead EH info
- PM->add(createFunctionAttrsPass()); // Set readonly/readnone attrs
- }
+ if (UnitAtATime && HaveExceptions)
+ PM->add(createPruneEHPass()); // Remove dead EH info
if (InliningPass)
PM->add(InliningPass);
+ if (UnitAtATime)
+ PM->add(createFunctionAttrsPass()); // Set readonly/readnone attrs
if (OptimizationLevel > 2)
PM->add(createArgumentPromotionPass()); // Scalarize uninlined fn args