diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-10-01 00:59:58 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-10-01 00:59:58 +0000 |
commit | 68f12ee567f797c82398df20c20f0b5db27bcab3 (patch) | |
tree | 3019824eae9e6b7b18cfa436a4dd55e7ebbaa10c /llvm/lib/Target | |
parent | 23fd462f48ace997471c31f39a7f9c8decc18026 (diff) | |
download | bcm5719-llvm-68f12ee567f797c82398df20c20f0b5db27bcab3.tar.gz bcm5719-llvm-68f12ee567f797c82398df20c20f0b5db27bcab3.zip |
Implement the -fno-builtin option in the front-end, not in the back-end.
llvm-svn: 56900
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 37 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.h | 3 |
2 files changed, 18 insertions, 22 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 755554ba282..3bff205b991 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5132,8 +5132,7 @@ X86TargetLowering::EmitTargetCodeForMemset(SelectionDAG &DAG, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, const Value *DstSV, - uint64_t DstSVOff, - bool NoBuiltin) { + uint64_t DstSVOff) { ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size); // If not DWORD aligned or size is more than the threshold, call the library. @@ -5148,24 +5147,22 @@ X86TargetLowering::EmitTargetCodeForMemset(SelectionDAG &DAG, // Check to see if there is a specialized entry-point for memory zeroing. ConstantSDNode *V = dyn_cast<ConstantSDNode>(Src); - if (!NoBuiltin) { - if (const char *bzeroEntry = V && - V->isNullValue() ? Subtarget->getBZeroEntry() : 0) { - MVT IntPtr = getPointerTy(); - const Type *IntPtrTy = TD->getIntPtrType(); - TargetLowering::ArgListTy Args; - TargetLowering::ArgListEntry Entry; - Entry.Node = Dst; - Entry.Ty = IntPtrTy; - Args.push_back(Entry); - Entry.Node = Size; - Args.push_back(Entry); - std::pair<SDValue,SDValue> CallResult = - LowerCallTo(Chain, Type::VoidTy, false, false, false, false, - CallingConv::C, false, - DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG); - return CallResult.second; - } + if (const char *bzeroEntry = V && + V->isNullValue() ? Subtarget->getBZeroEntry() : 0) { + MVT IntPtr = getPointerTy(); + const Type *IntPtrTy = TD->getIntPtrType(); + TargetLowering::ArgListTy Args; + TargetLowering::ArgListEntry Entry; + Entry.Node = Dst; + Entry.Ty = IntPtrTy; + Args.push_back(Entry); + Entry.Node = Size; + Args.push_back(Entry); + std::pair<SDValue,SDValue> CallResult = + LowerCallTo(Chain, Type::VoidTy, false, false, false, false, + CallingConv::C, false, + DAG.getExternalSymbol(bzeroEntry, IntPtr), Args, DAG); + return CallResult.second; } // Otherwise have the target-independent code call memset. diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h index 5cdb65dd95e..54a74533eb3 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -578,8 +578,7 @@ namespace llvm { SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, - const Value *DstSV, uint64_t DstSVOff, - bool NoBuiltin); + const Value *DstSV, uint64_t DstSVOff); SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDValue Chain, SDValue Dst, SDValue Src, |