[LLVMdev] interesting possible compiler bug

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Oct 15 14:43:52 PDT 2012


On 10/15/2012 4:39 PM, Eli Friedman wrote:
>
> The system malloc isn't, but the compiler can change any given call to
> malloc to call an implementation which is known to return a non-null
> pointer.

Do we do that in LLVM?  That would be surprising...  Optimizing calls to 
malloc (like memory pooling for example) is not a trivial thing to do, 
and it requires a fairly strong interprocedural analysis.  The fact that 
this seems to happen with LLVM at -O2 looks more like a bug than a 
clever optimization.

-K

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list