aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-12 10:17:57 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-12 10:17:57 -0800
commit04db312c9612033c07ed11e081645686b09dd76a (patch)
tree7d9cfb3e258d56a142da9834a072ac70d54bb430
parent194d2fab4f8806afac58e4c940b729374fb7e08e (diff)
do reg2mem/mem2reg around the setjmp pass, to ensure our cfg changes do not break module validation through altering dominances
-rw-r--r--lib/Transforms/NaCl/PNaClABISimplify.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index 5689556f21..f563bc0d6a 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -49,7 +49,9 @@ void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) {
PM.add(createCFGSimplificationPass());
}
+ PM.add(createDemoteRegisterToMemoryPass()); // XXX EMSCRIPTEN we just need this for functions with setjmp in them...
PM.add(createLowerEmSetjmpPass()); // XXX EMSCRIPTEN
+ PM.add(createPromoteMemoryToRegisterPass()); // XXX EMSCRIPTEN we just need this for functions with setjmp in them...
#if 0 // EMSCRIPTEN: we allow arbitrary symbols to be preserved
// Internalize all symbols in the module except _start, which is the only