File tree Expand file tree Collapse file tree 2 files changed +193
-36
lines changed
Expand file tree Collapse file tree 2 files changed +193
-36
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,20 @@ class EffectAnalyzer {
296296 return hasSideEffects () || accessesLocal () || readsMutableGlobalState ();
297297 }
298298
299+ // Check if this has any ordering-relevant effects beyond local variable
300+ // access. This is used by SimplifyLocals' reverse-index optimization to
301+ // classify sinkables: those with only local effects can be looked up via
302+ // the local reverse index, while those with non-local effects need broader
303+ // conflict checks.
304+ //
305+ // This is derived from the same helpers used by orderedBefore(), so it
306+ // automatically stays in sync when new effect types are added.
307+ bool hasNonLocalOrderingEffects () const {
308+ return transfersControlFlow () || writesGlobalState () ||
309+ readsMutableGlobalState () || danglingPop || trap ||
310+ hasSynchronization () || mayNotReturn;
311+ }
312+
299313 // check if we break to anything external from ourselves
300314 bool hasExternalBreakTargets () const { return !breakTargets.empty (); }
301315
You can’t perform that action at this time.
0 commit comments