Fixes PR 32607 by only ignoring undef when we can prove the phi is cycle-free
Diff Detail
- Build Status
Buildable 5447 Build 5447: arc lint + arc unit
Event Timeline
Unfortunately, as you can see, we lose optimization in a few cases where the phis *are* cycle-free.
I could just bite the bullet and build scc's to determine cycle-freeness.
I'll do some performance testing.
- Add SCC finding to discover cycle-free phis
(I'm performance testing a bunch of versions of this patch)
So far, i can't find any measurable time spent in the SCC version, so i think we will go with that.
LGTM. I'd split the SCC finder and move maybe to a separate file (as we may want to use it somewhere else), but we can move it later, so.
At some point i'm going to try to make the graph-traits'ish version work.
The main issue for us is that we have to iterate through all parts, because it's really stateless from our perspective.
IE every time you call scc_begin, it is starting the SCC finding from scratch.
That turned out to be pretty expensive for us vs doing this.