[LLVMdev] LLVM GCC and Malloc

Ben Chambers bjchambers at gmail.com
Tue May 22 18:51:42 PDT 2007

I've noticed a slight difference between the code emitted by LLVM-GCC
and what the online demo emits.  For instance, the C code:
   malloc (5 * sizeof(int))
   malloc [5 x int]
when using the online demo, and
   call @malloc (i32 20)
when using llvm-gcc.

I understand that the effective behavior is the same thing, but for
some work that I'm doing it's much better to have the malloc [5 x
int], because it is more detailed.  Is there some way to get llvm-gcc
to emit this information, or an optimization pass I can run to recover
this more detailed information?

Ben Chambers

More information about the llvm-dev mailing list