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

Daniel Dunbar daniel at zuster.org
Fri Sep 11 17:12:42 PDT 2009


On Fri, Sep 11, 2009 at 11:30 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Sep 11, 2009, at 10:22 AM, Dan Gohman wrote:
>
>> Hi Victor,
>>
>> If MallocHelper is going to replace MallocInst, how will it support
>> -fno-builtins?  With MallocInst, one at least had the option of
>> omitting the RaiseAllocations pass (though it seems llvm-gcc and
>> clang don't actually do this, which is a bug). With MallocHelper,
>> how can -fno-builtins be implemented?
>
> In order to support -fno-builtin-foo, we'd want to introduce a
> function attribute saying "not a builtin" and stick it on foo.  This
> doesn't exist today, but shouldn't be particularly hard.

This would be a nice way to tell LLVM not to treat "main()" specially
too, which irritates some clients who start execution at _start. :)

 - Daniel




More information about the llvm-commits mailing list