aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/NaCl/PNaClABISimplify.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index f662ada99a..7d3307e0e7 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -114,4 +114,9 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) {
// ExpandVarArgs leaves around vararg intrinsics, and
// ReplacePtrsWithInts leaves the lifetime.start/end intrinsics.
PM.add(createStripDeadPrototypesPass());
+
+ // Eliminate simple dead code that the post-opt passes could have
+ // create. These are fairly simple passes that won't break the ABI.
+ PM.add(createDeadInstEliminationPass());
+ PM.add(createDeadCodeEliminationPass());
}