[llvm-commits] [llvm] r56885 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86Subtarget.cpp lib/Target/X86/X86Su

Dale Johannesen dalej at apple.com
Tue Sep 30 15:28:31 PDT 2008


On Sep 30, 2008, at 3:17 PMPDT, Evan Cheng wrote:
>
> I am confused by the meaning of -fno-builtin:
>        -fno-builtin
>        -fno-builtin-function
>            Don't recognize built-in functions that do not begin with
>            __builtin_ as prefix.
>
> Does this actually disable the optimization of memset to bzero?

The wording is not ideal, but it is supposed to disable assuming that  
functions named in the standard have the special semantics defined in  
the standard, yes.  (Several groups in this company use it and expect  
it to do that.)

I'm not sure about Dan's point, that this is not supposed to apply to  
compiler-generated calls.  This is a reasonable reading, but not  
explicit.  More to the point, I don't think it's what users would  
usually want.  If they use -fno-builtin-memset that is because the  
compiler's usual expansion of memset doesn't work for them for some  
reason.  I don't see why user calls to memset would be different from  
compiler-generated ones in this regard.




More information about the llvm-commits mailing list