summaryrefslogtreecommitdiff
path: root/src/ir/branch-utils.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-12-06 14:18:44 -0800
committerGitHub <noreply@github.com>2022-12-06 14:18:44 -0800
commit7769139efbe818c7ba36d1a382db5114ebee9df8 (patch)
treead14587c6213cfcdcb4dc0b7cb5d5a65499170a7 /src/ir/branch-utils.h
parent080a2e151b9d740f62bd91708cccb1c9be322cb8 (diff)
downloadbinaryen-7769139efbe818c7ba36d1a382db5114ebee9df8.tar.gz
binaryen-7769139efbe818c7ba36d1a382db5114ebee9df8.tar.bz2
binaryen-7769139efbe818c7ba36d1a382db5114ebee9df8.zip
Fix an Inlining bug with a name collision in a br nested in a call param (#5323)
Diffstat (limited to 'src/ir/branch-utils.h')
-rw-r--r--src/ir/branch-utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h
index d433a421e..3527f1b36 100644
--- a/src/ir/branch-utils.h
+++ b/src/ir/branch-utils.h
@@ -327,6 +327,12 @@ struct BranchAccumulator
auto selfBranches = getUniqueTargets(curr);
branches.insert(selfBranches.begin(), selfBranches.end());
}
+
+ static NameSet get(Expression* tree) {
+ BranchAccumulator accumulator;
+ accumulator.walk(tree);
+ return accumulator.branches;
+ }
};
// A helper structure for the common case of post-walking some IR while querying