aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-12 18:55:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-12 18:58:01 -0800
commit125256db5c00421c00ef2afbb0e909a81ab3d1d1 (patch)
tree361147c46856c1792f627e12089bcd79004ab836 /tools/eliminator
parent07ac727a607703a2688cbc58e560f6d3d70e3874 (diff)
do not try to eliminate phi variables, which are unsafe to be removed and the llvm optimizer will remove anyhow if unused
Diffstat (limited to 'tools/eliminator')
-rw-r--r--tools/eliminator/eliminator-test-output.js8
-rw-r--r--tools/eliminator/eliminator-test.js12
2 files changed, 19 insertions, 1 deletions
diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js
index ede34103..01f092d5 100644
--- a/tools/eliminator/eliminator-test-output.js
+++ b/tools/eliminator/eliminator-test-output.js
@@ -6132,4 +6132,12 @@ function _mallocNoU($bytes) {
return $mem_0;
return null;
}
+function phi() {
+ if (wat()) {
+ var $10 = 1;
+ } else {
+ var $10 = (_init_mparams() | 0) != 0;
+ }
+ var $10;
+}
diff --git a/tools/eliminator/eliminator-test.js b/tools/eliminator/eliminator-test.js
index e44f28ad..8b376305 100644
--- a/tools/eliminator/eliminator-test.js
+++ b/tools/eliminator/eliminator-test.js
@@ -8828,5 +8828,15 @@ function _mallocNoU($bytes) {
return $mem_0;
return null;
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"]
+function phi() {
+ if (wat()) {
+ var $10 = 1;
+ } else {
+ var $7=_init_mparams();
+ var $8=(($7)|0)!=0;
+ var $10 = $8;
+ }
+ var $10;
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU", "asm", "phi"]