[LLVMdev] Missed devirtualization opportunities

Kenneth Uildriks kennethuil at gmail.com
Tue Oct 12 10:45:08 PDT 2010


>> For that matter, when you can find the *last* use of pT, you should be
>> able to put an llvm.immutable.end marker right after it, right?  Or
>> have I forgotten something else in the standard? (entirely possible,
>> it's enormous!)
>
> I'm not sure why we would.  Any workable approach based on invariant
> ranges will need to allow open ranges.

Starting from the assumption that every use of pT is valid, it follows
that at every use of pT, pT->_vtblptr is invariant.  After the last
use, we can no longer assume that pT->_vtblptr is invariant, so the
invariant region ends.  That doesn't mean that pT->_vtbl is guaranteed
to change, just that we can no longer assume that it hasn't.




More information about the llvm-dev mailing list