aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/NaCl/PNaClABISimplify.cpp
diff options
context:
space:
mode:
authorDan Gohman <sunfish@google.com>2014-02-24 08:49:19 -0800
committerDan Gohman <sunfish@google.com>2014-02-25 11:58:56 -0800
commit338da97ed47659b9ef04f60067f84cafc93e3dd3 (patch)
tree2a80c78435712eafe02ea4afdc96c8d7713016cb /lib/Transforms/NaCl/PNaClABISimplify.cpp
parent5653eb58d0b0068f0ef341c8928aa06d1d0ea3f7 (diff)
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.
Diffstat (limited to 'lib/Transforms/NaCl/PNaClABISimplify.cpp')
-rw-r--r--lib/Transforms/NaCl/PNaClABISimplify.cpp4
1 files changed, 4 insertions, 0 deletions
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());