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 | 6f287b22d2e57600b4cd5dc209d0d869e7736c0b (patch) | |
tree | 1c8e02946e9ac15065714bcc07bb0bdf38deb26c /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 5ec9efd61bc4214c787287409498e8b78f28c922 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 004fc4c156..a9b99b1bd9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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; |