diff options
author | Alon Zakai <azakai@google.com> | 2022-03-25 16:33:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-25 16:33:07 -0700 |
commit | 3a1953a1f417eb2f588eeb35bf26a3df6ea8f8e1 (patch) | |
tree | 8f119d7d7c2003ccbf181d272c1ec7e292d2be19 /src/passes | |
parent | 05527357b307714dab259098e860e610f69ecf59 (diff) | |
download | binaryen-3a1953a1f417eb2f588eeb35bf26a3df6ea8f8e1.tar.gz binaryen-3a1953a1f417eb2f588eeb35bf26a3df6ea8f8e1.tar.bz2 binaryen-3a1953a1f417eb2f588eeb35bf26a3df6ea8f8e1.zip |
[Docs] Add some comments on type updating in various places (#4548)
Diffstat (limited to 'src/passes')
-rw-r--r-- | src/passes/param-utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/passes/param-utils.h b/src/passes/param-utils.h index 10645b230..202c8b007 100644 --- a/src/passes/param-utils.h +++ b/src/passes/param-utils.h @@ -58,6 +58,12 @@ std::unordered_set<Index> getUsedParams(Function* func); // use cases are either to send a single function, or to send a set of functions // that all have the same heap type (and so if they all do not use some // parameter, it can be removed from them all). +// +// This does *not* update the types in call_refs. It is assumed that the caller +// will be updating types, which is simpler as there may be other locations that +// need adjusting and it is easier to do it all in one place. Also, the caller +// can update all the types at once throughout the program after making +// multiple calls to removeParameter(). bool removeParameter(const std::vector<Function*>& funcs, Index index, const std::vector<Call*>& calls, |