summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer/optimizer.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-17 15:18:31 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-17 15:21:20 -0800
commit297d6048ea0c1350f7b6418084fc57ab560677a8 (patch)
treeb1292df286e2fc97e49cca5d08273de1e4deddba /src/emscripten-optimizer/optimizer.h
parenteab9bb324d4a88fe94b044bf773fa27c3e842b7a (diff)
downloadbinaryen-297d6048ea0c1350f7b6418084fc57ab560677a8.tar.gz
binaryen-297d6048ea0c1350f7b6418084fc57ab560677a8.tar.bz2
binaryen-297d6048ea0c1350f7b6418084fc57ab560677a8.zip
port detectSign from emscripten asm optimizer, and use it
Diffstat (limited to 'src/emscripten-optimizer/optimizer.h')
-rw-r--r--src/emscripten-optimizer/optimizer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/emscripten-optimizer/optimizer.h b/src/emscripten-optimizer/optimizer.h
index 5edcaad87..fe1c18770 100644
--- a/src/emscripten-optimizer/optimizer.h
+++ b/src/emscripten-optimizer/optimizer.h
@@ -123,5 +123,14 @@ struct HeapInfo {
HeapInfo parseHeap(const char *name);
+enum AsmSign {
+ ASM_FLEXIBLE = 0, // small constants can be signed or unsigned, variables are also flexible
+ ASM_SIGNED = 1,
+ ASM_UNSIGNED = 2,
+ ASM_NONSIGNED = 3,
+};
+
+extern AsmSign detectSign(cashew::Ref node);
+
#endif // __optimizer_h__