On 12/20/2016 10:33 AM, Richard Biener wrote:

but for loops we can just continue and ignore this use.  And
bitmap_set_bit
returns whether it set a bit, thus

                if (bitmap_set_bit (visited_ssa, SSA_NAME_VERSION
(name)))
                  worklist.safe_push (name);

should work?
What if we're in an irreducible region?

Handling all back edges by deferring to their defs should work.  At least I 
can't see how it would not.
I'll take your word for it -- I haven't thought deeply about this.






In principle the thing is sound but I'd like to be able to pass in a
bitmap of
known maybe-undefined/must-defined SSA names to have a cache for
multiple invocations from within a pass (like this unswitching case).
So that means keeping another bitmap for things positively identified
as
defined, then saving it for later invocations.

We eventually need a tristate here for maximum caching.  And as the result 
depends on the dominating BB of the postdom region the savings might be 
questionable.
Possibly.

Jeff

Reply via email to