[llvm-commits] [PATCH] Add malloc call utility functions

Daniel Dunbar daniel at zuster.org
Sat Sep 5 17:43:53 PDT 2009


On Sat, Sep 5, 2009 at 5:36 AM, Duncan Sands<baldrick at free.fr> 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.

What about just making this an error when upgrading?

 - Daniel




More information about the llvm-commits mailing list