We tag micro-ops as "escaping", using HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world.
However, if that call only happens on an exit branch, then there is no escape if execution stays on trace.
In those cases we should not mark the micro-op as escaping.
For example: _GUARD_IS_NONE_POP is defined as follows:
int is_none = PyStackRef_IsNone(val);
if (!is_none) {
PyStackRef_CLOSE(val);
SYNC_SP();
EXIT_IF(1);
}
DEAD(val);
The call to PyStackRef_CLOSE only occurs on the exit branch. So, if execution continues past _GUARD_IS_NONE_POP then no escaping call has been made. Therefore we shouldn't mark _GUARD_IS_NONE_POP as escaping.
Linked PRs
We tag micro-ops as "escaping", using
HAS_ESCAPES_FLAG, when they call out to a function that might change the state of the world.However, if that call only happens on an exit branch, then there is no escape if execution stays on trace.
In those cases we should not mark the micro-op as escaping.
For example:
_GUARD_IS_NONE_POPis defined as follows:The call to
PyStackRef_CLOSEonly occurs on the exit branch. So, if execution continues past_GUARD_IS_NONE_POPthen no escaping call has been made. Therefore we shouldn't mark_GUARD_IS_NONE_POPas escaping.Linked PRs