inference: follow up #54323, override ssaflags with new cycle effects#54689
inference: follow up #54323, override ssaflags with new cycle effects#54689
Conversation
878ca04 to
b7ac60a
Compare
|
We do already have a list of the back edges and their statement numbers. Would it be easier to walk that list instead? |
|
My understanding is that this PR does that (specifically, traversing |
b7ac60a to
c9a5560
Compare
|
I was referencing |
c9a5560 to
73d4077
Compare
|
LGTM, though may want to update the commit message now |
Thanks, that should be far more efficient. |
|
Updated the PR description, and I will use it for an incoming commit description. |
#54323 ensures that all frames within a cycle have the same, cycle valid effects. However, `src.ssaflags` is calculated using partial effects, so when the effects of a `frame` within the cycle are updated, there would be an inconsistency between `frame.ipo_effects` and `frame.src.ssaflags`. Due to this inconsistency, #54323 breaks the test cases from #51092, when backported to v1.11. On the surface this is because #52999 hasn't been backported to v1.11, but the fundamental issue lies in this inconsistency between cycle effects and `ssaflags`. To resolve this issue, this commit traverses `cycle_backedges` to visit statements involved in the cycle, and updates each `ssaflags` according to new cycle valid effects if necessary.
73d4077 to
8ac9368
Compare
|
The |
…#54689) #54323 ensures that all frames within a cycle have the same, cycle valid effects. However, `src.ssaflags` is calculated using partial effects, so when the effects of a `frame` within the cycle are updated, there would be an inconsistency between `frame.ipo_effects` and `frame.src.ssaflags`. Due to this inconsistency, #54323 breaks the test cases from #51092, when backported to v1.11. On the surface this is because #52999 hasn't been backported to v1.11, but the fundamental issue lies in this inconsistency between cycle effects and `ssaflags`. To resolve this issue, this commit traverses `cycle_backedges` to visit statements involved in the cycle, and updates each `ssaflags` according to new cycle valid effects if necessary.
#54323 ensures that all frames within a cycle have the
same, cycle valid effects. However,
src.ssaflagsis calculated usingpartial effects, so when the effects of a
framewithin the cycle areupdated, there would be an inconsistency between
frame.ipo_effectsandframe.src.ssaflags. Due to this inconsistency, #54323breaks the test cases from #51092, when backported to
v1.11. On the surface this is because #52999 hasn't been
backported to v1.11, but the fundamental issue lies in this
inconsistency between cycle effects and
ssaflags.To resolve this issue, this commit traverses
cycle_backedgesto visitstatements involved in the cycle, and updates each
ssaflagsaccordingto new cycle valid effects if necessary.