summaryrefslogtreecommitdiff
path: root/src/passes/CoalesceLocals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/CoalesceLocals.cpp')
-rw-r--r--src/passes/CoalesceLocals.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp
index 232685001..e5416971b 100644
--- a/src/passes/CoalesceLocals.cpp
+++ b/src/passes/CoalesceLocals.cpp
@@ -19,6 +19,11 @@
// is similar to register allocation, however, there is never any
// spilling, and there isn't a fixed number of locals.
//
+// NB: This pass is nonlinear in the number of locals. It is best to run it
+// after the number of locals has been somewhat reduced by other passes,
+// for example by simplify-locals (to remove unneeded uses of locals) and
+// reorder-locals (to sort them by # of uses and remove all unneeded ones).
+//
#include <algorithm>
#include <memory>