[llvm-commits] [PATCH] Add malloc call utility functions
Chris Lattner
clattner at apple.com
Mon Sep 7 15:12:08 PDT 2009
On Sep 5, 2009, at 5:36 AM, Duncan Sands wrote:
> Hi Victor, when bitcode containing a MallocInst is read, it looks
> like you plan to turn this into a malloc call ignoring the alignment
> value of the MallocInst. However if the alignment was huge, the
> pointer
> returned by the malloc call might not be sufficiently aligned. In
> this
> case you would need to allocate a larger amount of memory and adjust
> the
> returned pointer to be sufficiently aligned. The extra complexity may
> not be worth it: I don't know if anyone ever used huge alignments with
> MallocInst, or even if codegen respected these alignments. If you
> decide to ignore the alignment I suggest you add a comment about this.
The MallocInst alignment field is already ignored by all versions of
llvm. Don't worry about this.
-Chris
More information about the llvm-commits
mailing list