[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices

Owen Anderson resistor at mac.com
Thu Nov 15 12:41:11 PST 2007


On Nov 15, 2007, at 2:17 PM, Wojciech Matyjewicz wrote:
>  BasicAA is correct for in this case, as it seems to treat
> conservatively any indexing of a variable-sized array.

Right, that's the key distinction.  For a VLA, you don't know where it  
might end (without more complex reasoning), so you can't assume that a  
given GEP is undefined.  However, for arrays with declared length, it  
is easy to tell when you're doing something undefined by GEPing past  
the end.  This latter case is the optimization opportunity.

--Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071115/4d851db6/attachment.bin>


More information about the llvm-dev mailing list