[cfe-dev] disabling loop idiom recognizer in clang

Chris Lattner clattner at apple.com
Thu Apr 28 15:24:51 PDT 2011


On Apr 28, 2011, at 3:17 PM, Damjan Marion wrote:

> On Apr 29, 2011, at 12:15 AM, Chris Lattner wrote:
> 
>> 
>> On Apr 28, 2011, at 3:09 PM, Damjan Marion wrote:
>> 
>>> 
>>> Hi,
>>> 
>>> is there a way to disable loop idiom recognizer in clang?
>>> 
>>> I have a problem with compiling early stage code for ARM architecture which should not be linked to external libraries but clang replaces loop with memset call in the code.
>> 
>> Yep, build with -fno-builtin or -ffreestanding.
> 
> It doesn't work. According to gcc docs (which clang probably follows): 
> "GCC requires the freestanding environment provide memcpy, memmove, memset and memcmp."

Did you try it?  I'm aware of the requirements for a freestanding implementation.

-Chris



More information about the cfe-dev mailing list