diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-30 21:22:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-30 21:22:07 +0000 |
commit | bd09262e97e8a04433eaad72151478bdb4ae3f58 (patch) | |
tree | 95692913b554d03f528d4286d9dd370e8402b06d /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 123e7d1c2a8d04d43d146b55d1b6ef716ac3f526 (diff) | |
download | bcm5719-llvm-bd09262e97e8a04433eaad72151478bdb4ae3f58.tar.gz bcm5719-llvm-bd09262e97e8a04433eaad72151478bdb4ae3f58.zip |
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.
llvm-svn: 56885
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 004fc4c1565..a9b99b1bd93 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -29,6 +29,7 @@ #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/SetVector.h" @@ -40,6 +41,11 @@ #include <cmath> using namespace llvm; +static cl::opt<bool> +NoBuiltin("no-builtin", + cl::desc("Don't recognize built-in functions that do not begin " + "with `__builtin_' as prefix")); + /// makeVTList - Return an instance of the SDVTList struct initialized with the /// specified members. static SDVTList makeVTList(const MVT *VTs, unsigned NumVTs) { @@ -3189,7 +3195,7 @@ SDValue SelectionDAG::getMemset(SDValue Chain, SDValue Dst, // code. If the target chooses to do this, this is the next best. SDValue Result = TLI.EmitTargetCodeForMemset(*this, Chain, Dst, Src, Size, Align, - DstSV, DstSVOff); + DstSV, DstSVOff, NoBuiltin); if (Result.getNode()) return Result; |