[llvm-commits] [llvm] r89421 - /llvm/trunk/lib/Analysis/CaptureTracking.cpp

Duncan Sands baldrick at free.fr
Wed Nov 25 01:24:33 PST 2009


Hi John,

> If we're not going to consider "correlated" captures, shouldn't the 
> model just be taint-checking?  The original parameter is tainted, GEPs 
> are tainted, phis to which it's an input are tainted, possibly some 
> other things.  The parameter is nocapture only if there's no "capturing" 
> use of a tainted value.  That's about as good as you're going to get 
> without a lot of (expensive) sophistication.

the current implementation of nocapture is very strict, and does not allow
"correlated" captures or any other kind of capture.  This seems stricter
than is needed, since "capture" exists for the benefit of alias analysis,
and most languages allow you assume that pointers don't alias in certain
circumstances, and these circumstances seem to say that we can ignore
"correlated" capture - though this isn't completely clear.  So I've started
experimenting with a more liberal notion of capture, essentially the notion
you describe above.  If this doesn't give any practical improvement over the
current strict definition, then I guess we will stay with the current version.

Ciao,

Duncan.



More information about the llvm-commits mailing list