[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

Bill Wendling isanbard at gmail.com
Tue Sep 30 15:36:23 PDT 2008


On Tue, Sep 30, 2008 at 3:28 PM, Dale Johannesen <dalej at apple.com> wrote:
>
> 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.
>
To make it even more confusing, the user could be using their own
version of memset which does something entirely different than what
normal memset does. It would be unwise for the compiler to assume that
these functions behave as normal under this flag.

-bw



More information about the llvm-commits mailing list