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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Mar 6 12:17:05 PST 2012


> 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.

:-)

> -Andy

Thanks,
Rafael




More information about the llvm-commits mailing list