[LLVMdev] optimization assumes malloc return is non-null
Chris Lattner
sabre at nondot.org
Fri May 2 11:06:23 PDT 2008
On Fri, 2 May 2008, Sandro Magi wrote:
>> This is safe even without "whole program" information. I love the as-if
>> rule ;-)
>
> No, that seems perfectly reasonable (assuming I understand the
> translation), but only because char is so small. This optimization
> seems reasonable when the object is of word size or smaller, as this
> may simply
We currently do this for mallocs that are 2048 bytes and less.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list