[LLVMdev] optimization assumes malloc return is non-null

Jonathan S. Shapiro shap at eros-os.com
Wed Apr 30 17:57:48 PDT 2008

Never mind -- this argument is okay as far as it goes, but I don't think
Daveed is relying on this.

On Wed, 2008-04-30 at 20:47 -0400, Jonathan S. Shapiro wrote:
> I hope that Daveed will correct me on this, but I think that the theory
> is as follows:
>   Since the effect of malloc is not captured, the entire malloc can be
>   discarded. Any call to malloc that is discarded can be presumed
>   (arbitrarily) to succeed, and therefore to return non-null.
> shap
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list