summaryrefslogtreecommitdiff
path: root/src/asmjs
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-03-10 10:44:37 -0800
committerGitHub <noreply@github.com>2017-03-10 10:44:37 -0800
commitd54c03e99f9a43bde1b6cec94f05b0af412d0e4f (patch)
tree94128b81f1f1d2e9ecf83fe2e699e2528f6c49fc /src/asmjs
parentd79d71ac7dfe807a5e98b94c9d1f67df4da7998a (diff)
downloadbinaryen-d54c03e99f9a43bde1b6cec94f05b0af412d0e4f.tar.gz
binaryen-d54c03e99f9a43bde1b6cec94f05b0af412d0e4f.tar.bz2
binaryen-d54c03e99f9a43bde1b6cec94f05b0af412d0e4f.zip
optimize pow (#934)
* optimize pow(x,2) => x*x * optimize pow(x, 0.5) => sqrt(x)
Diffstat (limited to 'src/asmjs')
-rw-r--r--src/asmjs/shared-constants.cpp1
-rw-r--r--src/asmjs/shared-constants.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/asmjs/shared-constants.cpp b/src/asmjs/shared-constants.cpp
index e30fd939c..d704c8009 100644
--- a/src/asmjs/shared-constants.cpp
+++ b/src/asmjs/shared-constants.cpp
@@ -49,6 +49,7 @@ cashew::IString GLOBAL("global"),
FLOOR("floor"),
CEIL("ceil"),
SQRT("sqrt"),
+ POW("pow"),
I32_TEMP("asm2wasm_i32_temp"),
DEBUGGER("debugger"),
USE_ASM("use asm"),
diff --git a/src/asmjs/shared-constants.h b/src/asmjs/shared-constants.h
index e0c627511..7b48c3df5 100644
--- a/src/asmjs/shared-constants.h
+++ b/src/asmjs/shared-constants.h
@@ -52,6 +52,7 @@ extern cashew::IString GLOBAL,
FLOOR,
CEIL,
SQRT,
+ POW,
I32_TEMP,
DEBUGGER,
USE_ASM,