summaryrefslogtreecommitdiff
path: root/src/passes/StackIR.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-11-07 22:30:18 -0800
committerGitHub <noreply@github.com>2019-11-07 22:30:18 -0800
commit4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6 (patch)
tree7ddc2211e1bace767dfce94f9622db9629e46c6d /src/passes/StackIR.cpp
parent42f70a7c8608f5fc85b2676fda29b8405459ebdf (diff)
downloadbinaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.tar.gz
binaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.tar.bz2
binaryen-4ad7a2cfd0b3ac14fbe767d50e4994f8297d37f6.zip
Add Stack IR optimization support for EH (#2425)
Diffstat (limited to 'src/passes/StackIR.cpp')
-rw-r--r--src/passes/StackIR.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/passes/StackIR.cpp b/src/passes/StackIR.cpp
index 9b8b9b8b1..52ea061a3 100644
--- a/src/passes/StackIR.cpp
+++ b/src/passes/StackIR.cpp
@@ -255,7 +255,9 @@ private:
case StackInst::BlockEnd:
case StackInst::IfElse:
case StackInst::IfEnd:
- case StackInst::LoopEnd: {
+ case StackInst::LoopEnd:
+ case StackInst::Catch:
+ case StackInst::TryEnd: {
return true;
}
default: { return false; }
@@ -267,7 +269,8 @@ private:
switch (inst->op) {
case StackInst::BlockBegin:
case StackInst::IfBegin:
- case StackInst::LoopBegin: {
+ case StackInst::LoopBegin:
+ case StackInst::TryBegin: {
return true;
}
default: { return false; }
@@ -279,7 +282,8 @@ private:
switch (inst->op) {
case StackInst::BlockEnd:
case StackInst::IfEnd:
- case StackInst::LoopEnd: {
+ case StackInst::LoopEnd:
+ case StackInst::TryEnd: {
return true;
}
default: { return false; }