aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2013-08-08 22:33:24 -0700
committerJF Bastien <jfb@chromium.org>2013-08-08 22:33:24 -0700
commit260e981f6e3d5cfad459e97da1b53b5885238f0d (patch)
treee8ea7b707de09852c0e06534eb176c24a5a311d3
parent10c5d2cb2f5611441dae3114e3803526340e4b4b (diff)
Add simple dead code elimination at the end of post-opt.
This should slightly reduce the size of generate pexes without compromising ABI stability since the code in DCE.cpp is so simple. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3613 TEST= tryjobs R= kschimpf@chromium.org, eliben@chromium.org Review URL: https://codereview.chromium.org/22710004
-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());
}