From a7b1caf4ea69d2cc6ff207fcef7085494bbc686a Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Tue, 28 May 2013 10:18:39 -0700 Subject: 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 --- lib/Transforms/NaCl/PNaClABISimplify.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Transforms/NaCl/PNaClABISimplify.cpp') 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()); } -- cgit v1.2.3-70-g09d2