From 3a1953a1f417eb2f588eeb35bf26a3df6ea8f8e1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 25 Mar 2022 16:33:07 -0700 Subject: [Docs] Add some comments on type updating in various places (#4548) --- src/passes/param-utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/passes/param-utils.h') 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 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& funcs, Index index, const std::vector& calls, -- cgit v1.2.3