From 338da97ed47659b9ef04f60067f84cafc93e3dd3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 24 Feb 2014 08:49:19 -0800 Subject: Support GEP and ConstantExprs directly in the JSBackend. This patch also lays the groundwork for the single-use instruction trick to reduce the number of temporary variables. --- lib/Transforms/NaCl/PNaClABISimplify.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Transforms/NaCl/PNaClABISimplify.cpp') diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp index 520663152a..416c38dd17 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -116,15 +116,19 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) { // are expanded out later. PM.add(createFlattenGlobalsPass()); +#if 0 // XXX EMSCRIPTEN: We can handle ConstantExprs in our backend. // We should not place arbitrary passes after ExpandConstantExpr // because they might reintroduce ConstantExprs. PM.add(createExpandConstantExprPass()); +#endif // PromoteIntegersPass does not handle constexprs and creates GEPs, // so it goes between those passes. PM.add(createPromoteIntegersPass()); +#if 0 // XXX EMSCRIPTEN: We can handle GEPs in our backend. // ExpandGetElementPtr must follow ExpandConstantExpr to expand the // getelementptr instructions it creates. PM.add(createExpandGetElementPtrPass()); +#endif // Rewrite atomic and volatile instructions with intrinsic calls. #if 0 // EMSCRIPTEN: we don't need to fix volatiles etc, and can use llvm intrinsics PM.add(createRewriteAtomicsPass()); -- cgit v1.2.3-70-g09d2