[llvm-commits] [llvm] r151466 - in /llvm/trunk: include/llvm/Analysis/Dominators.h lib/Analysis/InstructionSimplify.cpp

Duncan Sands baldrick at free.fr
Tue Mar 6 12:19:18 PST 2012


On 06/03/12 21:17, Rafael EspĂ­ndola wrote:
>> So, we can have dominates(I1, I1) = = true, if I1 is an instruction (or phi) in an unreachable block, right?
>
> Probably depends on the verifier. If it survives the verifier, we
> would return true for a recursive phi on an unreachable block, yes.
>
>>> I still have a small preference for renaming one of the functions or
>>> making them behave more like one another, but I agree that this would
>>> be a bit better than what we have now. Chris, would you be OK with a
>>> patch implementing it?
>>
>> "dominatesUse()" was ok, but as Duncan pointed out could be misleading, since there's no assumption of data flow between operands. "properlyDominates()" could be misleading because of the unreachable case above, and theoretically wrong because "proper" dominance essentially refers nodes in the domtree, not instructions. I just don't have a better idea.
>
> Same here. Chris, just waiting for you OK on
>
> * Dominates for BB is changed so that anything dominates an
>    unreachable block. This does create a case where
>    A != B&&  dominates(A, B)&&  dominates(B,A) is true.

I think it's too early to say if this is going to work.  I think we just have
to implement this and see how much trouble it causes.  If it's a lot then we
may need to reconsider.

Ciao, Duncan.



More information about the llvm-commits mailing list