aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-28 10:18:39 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-28 10:18:39 -0700
commita7b1caf4ea69d2cc6ff207fcef7085494bbc686a (patch)
tree0b9ee267a87e2d91f71f977d0bd3b9212201d1c6 /lib
parent33f698a2d1a30e31fb494922e3e6df8e643dc7b5 (diff)
PNaCl: Enable the ReplacePtrsWithInts pass
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=PNaCl toolchain trybots + GCC torture tests + LLVM test suite Review URL: https://codereview.chromium.org/15767004
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/NaCl/PNaClABISimplify.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index 9d7713139a..37504517d6 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -57,9 +57,12 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) {
PM.add(createFlattenGlobalsPass());
// We should not place arbitrary passes after ExpandConstantExpr
- // because they might reintroduce ConstantExprs. However,
+ // because they might reintroduce ConstantExprs.
+ PM.add(createExpandConstantExprPass());
// ExpandGetElementPtr must follow ExpandConstantExpr to expand the
// getelementptr instructions it creates.
- PM.add(createExpandConstantExprPass());
PM.add(createExpandGetElementPtrPass());
+ // ReplacePtrsWithInts assumes that getelementptr instructions and
+ // ConstantExprs have already been expanded out.
+ PM.add(createReplacePtrsWithIntsPass());
}