Skip to content

Commit ac6081c

Browse files
committedMar 18, 2017
Make library calls sensitive to regparm module flag (Fixes PR3997).
Reviewers: mkuper, rnk Subscribers: mehdi_amini, jyknight, aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D27050 llvm-svn: 298179
1 parent 6de2c77 commit ac6081c

25 files changed

+219
-123
lines changed
 

‎llvm/include/llvm/CodeGen/FastISel.h

+2-26
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,8 @@ class MachineConstantPool;
4141
/// quickly.
4242
class FastISel {
4343
public:
44-
struct ArgListEntry {
45-
Value *Val = nullptr;
46-
Type *Ty = nullptr;
47-
bool IsSExt : 1;
48-
bool IsZExt : 1;
49-
bool IsInReg : 1;
50-
bool IsSRet : 1;
51-
bool IsNest : 1;
52-
bool IsByVal : 1;
53-
bool IsInAlloca : 1;
54-
bool IsReturned : 1;
55-
bool IsSwiftSelf : 1;
56-
bool IsSwiftError : 1;
57-
uint16_t Alignment = 0;
58-
59-
ArgListEntry()
60-
: IsSExt(false), IsZExt(false), IsInReg(false), IsSRet(false),
61-
IsNest(false), IsByVal(false), IsInAlloca(false), IsReturned(false),
62-
IsSwiftSelf(false), IsSwiftError(false) {}
63-
64-
/// \brief Set CallLoweringInfo attribute flags based on a call instruction
65-
/// and called function attributes.
66-
void setAttributes(ImmutableCallSite *CS, unsigned AttrIdx);
67-
};
68-
typedef std::vector<ArgListEntry> ArgListTy;
69-
44+
typedef TargetLoweringBase::ArgListEntry ArgListEntry;
45+
typedef TargetLoweringBase::ArgListTy ArgListTy;
7046
struct CallLoweringInfo {
7147
Type *RetTy = nullptr;
7248
bool RetSExt : 1;

‎llvm/include/llvm/IR/Module.h

+4
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@ class Module {
726726
/// @name Utility functions for querying Debug information.
727727
/// @{
728728

729+
/// \brief Returns the Number of Register ParametersDwarf Version by checking
730+
/// module flags.
731+
unsigned getNumberRegisterParameters() const;
732+
729733
/// \brief Returns the Dwarf Version by checking module flags.
730734
unsigned getDwarfVersion() const;
731735

‎llvm/include/llvm/Target/TargetLowering.h

+16-1
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525

2626
#include "llvm/ADT/ArrayRef.h"
2727
#include "llvm/ADT/DenseMap.h"
28-
#include "llvm/ADT/SmallVector.h"
2928
#include "llvm/ADT/STLExtras.h"
29+
#include "llvm/ADT/SmallVector.h"
3030
#include "llvm/ADT/StringRef.h"
3131
#include "llvm/CodeGen/DAGCombine.h"
3232
#include "llvm/CodeGen/ISDOpcodes.h"
3333
#include "llvm/CodeGen/MachineValueType.h"
3434
#include "llvm/CodeGen/RuntimeLibcalls.h"
35+
#include "llvm/CodeGen/SelectionDAG.h"
3536
#include "llvm/CodeGen/SelectionDAGNodes.h"
3637
#include "llvm/CodeGen/ValueTypes.h"
3738
#include "llvm/IR/Attributes.h"
@@ -2628,6 +2629,20 @@ class TargetLowering : public TargetLoweringBase {
26282629
return *this;
26292630
}
26302631

2632+
// setCallee with target/module-specific attributes
2633+
CallLoweringInfo &setLibCallee(CallingConv::ID CC, Type *ResultType,
2634+
SDValue Target, ArgListTy &&ArgsList) {
2635+
RetTy = ResultType;
2636+
Callee = Target;
2637+
CallConv = CC;
2638+
NumFixedArgs = Args.size();
2639+
Args = std::move(ArgsList);
2640+
2641+
DAG.getTargetLoweringInfo().markLibCallAttributes(
2642+
&(DAG.getMachineFunction()), CC, Args);
2643+
return *this;
2644+
}
2645+
26312646
CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultType,
26322647
SDValue Target, ArgListTy &&ArgsList) {
26332648
RetTy = ResultType;

‎llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

+1-15
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,6 @@ STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by "
119119
"target-specific selector");
120120
STATISTIC(NumFastIselDead, "Number of dead insts removed on failure");
121121

122-
void FastISel::ArgListEntry::setAttributes(ImmutableCallSite *CS,
123-
unsigned AttrIdx) {
124-
IsSExt = CS->paramHasAttr(AttrIdx, Attribute::SExt);
125-
IsZExt = CS->paramHasAttr(AttrIdx, Attribute::ZExt);
126-
IsInReg = CS->paramHasAttr(AttrIdx, Attribute::InReg);
127-
IsSRet = CS->paramHasAttr(AttrIdx, Attribute::StructRet);
128-
IsNest = CS->paramHasAttr(AttrIdx, Attribute::Nest);
129-
IsByVal = CS->paramHasAttr(AttrIdx, Attribute::ByVal);
130-
IsInAlloca = CS->paramHasAttr(AttrIdx, Attribute::InAlloca);
131-
IsReturned = CS->paramHasAttr(AttrIdx, Attribute::Returned);
132-
IsSwiftSelf = CS->paramHasAttr(AttrIdx, Attribute::SwiftSelf);
133-
IsSwiftError = CS->paramHasAttr(AttrIdx, Attribute::SwiftError);
134-
Alignment = CS->getParamAlignment(AttrIdx);
135-
}
136-
137122
/// Set the current block to which generated machine instructions will be
138123
/// appended, and clear the local CSE map.
139124
void FastISel::startNewBlock() {
@@ -929,6 +914,7 @@ bool FastISel::lowerCallTo(const CallInst *CI, MCSymbol *Symbol,
929914
Entry.setAttributes(&CS, ArgI + 1);
930915
Args.push_back(Entry);
931916
}
917+
TLI.markLibCallAttributes(MF, CS.getCallingConv(), Args);
932918

933919
CallLoweringInfo CLI;
934920
CLI.setCallee(RetTy, FTy, Symbol, std::move(Args), CS, NumArgs);

‎llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

+37-23
Original file line numberDiff line numberDiff line change
@@ -1935,9 +1935,13 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node,
19351935
InChain = TCChain;
19361936

19371937
TargetLowering::CallLoweringInfo CLI(DAG);
1938-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
1939-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1940-
.setTailCall(isTailCall).setSExtResult(isSigned).setZExtResult(!isSigned);
1938+
CLI.setDebugLoc(SDLoc(Node))
1939+
.setChain(InChain)
1940+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1941+
std::move(Args))
1942+
.setTailCall(isTailCall)
1943+
.setSExtResult(isSigned)
1944+
.setZExtResult(!isSigned);
19411945

19421946
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
19431947

@@ -1970,9 +1974,12 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, EVT RetVT,
19701974
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
19711975

19721976
TargetLowering::CallLoweringInfo CLI(DAG);
1973-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
1974-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1975-
.setSExtResult(isSigned).setZExtResult(!isSigned);
1977+
CLI.setDebugLoc(dl)
1978+
.setChain(DAG.getEntryNode())
1979+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1980+
std::move(Args))
1981+
.setSExtResult(isSigned)
1982+
.setZExtResult(!isSigned);
19761983

19771984
std::pair<SDValue,SDValue> CallInfo = TLI.LowerCallTo(CLI);
19781985

@@ -2004,9 +2011,12 @@ SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC,
20042011
Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
20052012

20062013
TargetLowering::CallLoweringInfo CLI(DAG);
2007-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
2008-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
2009-
.setSExtResult(isSigned).setZExtResult(!isSigned);
2014+
CLI.setDebugLoc(SDLoc(Node))
2015+
.setChain(InChain)
2016+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
2017+
std::move(Args))
2018+
.setSExtResult(isSigned)
2019+
.setZExtResult(!isSigned);
20102020

20112021
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
20122022

@@ -2099,9 +2109,12 @@ SelectionDAGLegalize::ExpandDivRemLibCall(SDNode *Node,
20992109

21002110
SDLoc dl(Node);
21012111
TargetLowering::CallLoweringInfo CLI(DAG);
2102-
CLI.setDebugLoc(dl).setChain(InChain)
2103-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
2104-
.setSExtResult(isSigned).setZExtResult(!isSigned);
2112+
CLI.setDebugLoc(dl)
2113+
.setChain(InChain)
2114+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
2115+
std::move(Args))
2116+
.setSExtResult(isSigned)
2117+
.setZExtResult(!isSigned);
21052118

21062119
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
21072120

@@ -2210,9 +2223,9 @@ SelectionDAGLegalize::ExpandSinCosLibCall(SDNode *Node,
22102223

22112224
SDLoc dl(Node);
22122225
TargetLowering::CallLoweringInfo CLI(DAG);
2213-
CLI.setDebugLoc(dl).setChain(InChain)
2214-
.setCallee(TLI.getLibcallCallingConv(LC),
2215-
Type::getVoidTy(*DAG.getContext()), Callee, std::move(Args));
2226+
CLI.setDebugLoc(dl).setChain(InChain).setLibCallee(
2227+
TLI.getLibcallCallingConv(LC), Type::getVoidTy(*DAG.getContext()), Callee,
2228+
std::move(Args));
22162229

22172230
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
22182231

@@ -3830,10 +3843,11 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
38303843
TargetLowering::CallLoweringInfo CLI(DAG);
38313844
CLI.setDebugLoc(dl)
38323845
.setChain(Node->getOperand(0))
3833-
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3834-
DAG.getExternalSymbol("__sync_synchronize",
3835-
TLI.getPointerTy(DAG.getDataLayout())),
3836-
std::move(Args));
3846+
.setLibCallee(
3847+
CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3848+
DAG.getExternalSymbol("__sync_synchronize",
3849+
TLI.getPointerTy(DAG.getDataLayout())),
3850+
std::move(Args));
38373851

38383852
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
38393853

@@ -3870,10 +3884,10 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
38703884
TargetLowering::CallLoweringInfo CLI(DAG);
38713885
CLI.setDebugLoc(dl)
38723886
.setChain(Node->getOperand(0))
3873-
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3874-
DAG.getExternalSymbol("abort",
3875-
TLI.getPointerTy(DAG.getDataLayout())),
3876-
std::move(Args));
3887+
.setLibCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3888+
DAG.getExternalSymbol(
3889+
"abort", TLI.getPointerTy(DAG.getDataLayout())),
3890+
std::move(Args));
38773891
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
38783892

38793893
Results.push_back(CallResult.second);

‎llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2607,7 +2607,7 @@ void DAGTypeLegalizer::ExpandIntRes_XMULO(SDNode *N,
26072607
TargetLowering::CallLoweringInfo CLI(DAG);
26082608
CLI.setDebugLoc(dl)
26092609
.setChain(Chain)
2610-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, std::move(Args))
2610+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, std::move(Args))
26112611
.setSExtResult();
26122612

26132613
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);

‎llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,12 @@ DAGTypeLegalizer::ExpandChainLibCall(RTLIB::Libcall LC, SDNode *Node,
10941094
Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
10951095

10961096
TargetLowering::CallLoweringInfo CLI(DAG);
1097-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
1098-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1099-
.setSExtResult(isSigned).setZExtResult(!isSigned);
1097+
CLI.setDebugLoc(SDLoc(Node))
1098+
.setChain(InChain)
1099+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1100+
std::move(Args))
1101+
.setSExtResult(isSigned)
1102+
.setZExtResult(!isSigned);
11001103

11011104
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
11021105

‎llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -5175,11 +5175,11 @@ SDValue SelectionDAG::getMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst,
51755175
TargetLowering::CallLoweringInfo CLI(*this);
51765176
CLI.setDebugLoc(dl)
51775177
.setChain(Chain)
5178-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMCPY),
5179-
Dst.getValueType().getTypeForEVT(*getContext()),
5180-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
5181-
TLI->getPointerTy(getDataLayout())),
5182-
std::move(Args))
5178+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMCPY),
5179+
Dst.getValueType().getTypeForEVT(*getContext()),
5180+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
5181+
TLI->getPointerTy(getDataLayout())),
5182+
std::move(Args))
51835183
.setDiscardResult()
51845184
.setTailCall(isTailCall);
51855185

@@ -5236,11 +5236,11 @@ SDValue SelectionDAG::getMemmove(SDValue Chain, const SDLoc &dl, SDValue Dst,
52365236
TargetLowering::CallLoweringInfo CLI(*this);
52375237
CLI.setDebugLoc(dl)
52385238
.setChain(Chain)
5239-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMMOVE),
5240-
Dst.getValueType().getTypeForEVT(*getContext()),
5241-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
5242-
TLI->getPointerTy(getDataLayout())),
5243-
std::move(Args))
5239+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMMOVE),
5240+
Dst.getValueType().getTypeForEVT(*getContext()),
5241+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
5242+
TLI->getPointerTy(getDataLayout())),
5243+
std::move(Args))
52445244
.setDiscardResult()
52455245
.setTailCall(isTailCall);
52465246

@@ -5298,11 +5298,11 @@ SDValue SelectionDAG::getMemset(SDValue Chain, const SDLoc &dl, SDValue Dst,
52985298
TargetLowering::CallLoweringInfo CLI(*this);
52995299
CLI.setDebugLoc(dl)
53005300
.setChain(Chain)
5301-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMSET),
5302-
Dst.getValueType().getTypeForEVT(*getContext()),
5303-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
5304-
TLI->getPointerTy(getDataLayout())),
5305-
std::move(Args))
5301+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMSET),
5302+
Dst.getValueType().getTypeForEVT(*getContext()),
5303+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
5304+
TLI->getPointerTy(getDataLayout())),
5305+
std::move(Args))
53065306
.setDiscardResult()
53075307
.setTailCall(isTailCall);
53085308

‎llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4912,7 +4912,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
49124912
report_fatal_error("Unsupported element size");
49134913

49144914
TargetLowering::CallLoweringInfo CLI(DAG);
4915-
CLI.setDebugLoc(sdl).setChain(getRoot()).setCallee(
4915+
CLI.setDebugLoc(sdl).setChain(getRoot()).setLibCallee(
49164916
TLI.getLibcallCallingConv(LibraryCall),
49174917
Type::getVoidTy(*DAG.getContext()),
49184918
DAG.getExternalSymbol(TLI.getLibcallName(LibraryCall),
@@ -5536,7 +5536,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
55365536
TargetLowering::ArgListTy Args;
55375537

55385538
TargetLowering::CallLoweringInfo CLI(DAG);
5539-
CLI.setDebugLoc(sdl).setChain(getRoot()).setCallee(
5539+
CLI.setDebugLoc(sdl).setChain(getRoot()).setLibCallee(
55405540
CallingConv::C, I.getType(),
55415541
DAG.getExternalSymbol(TrapFuncName.data(),
55425542
TLI.getPointerTy(DAG.getDataLayout())),

‎llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ bool TargetLowering::parametersInCSRMatch(const MachineRegisterInfo &MRI,
9696

9797
/// \brief Set CallLoweringInfo attribute flags based on a call instruction
9898
/// and called function attributes.
99-
void TargetLowering::ArgListEntry::setAttributes(ImmutableCallSite *CS,
100-
unsigned AttrIdx) {
99+
void TargetLoweringBase::ArgListEntry::setAttributes(ImmutableCallSite *CS,
100+
unsigned AttrIdx) {
101101
IsSExt = CS->paramHasAttr(AttrIdx, Attribute::SExt);
102102
IsZExt = CS->paramHasAttr(AttrIdx, Attribute::ZExt);
103103
IsInReg = CS->paramHasAttr(AttrIdx, Attribute::InReg);
@@ -138,10 +138,13 @@ TargetLowering::makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT,
138138
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
139139
TargetLowering::CallLoweringInfo CLI(DAG);
140140
bool signExtend = shouldSignExtendTypeInLibCall(RetVT, isSigned);
141-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
142-
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
143-
.setNoReturn(doesNotReturn).setDiscardResult(!isReturnValueUsed)
144-
.setSExtResult(signExtend).setZExtResult(!signExtend);
141+
CLI.setDebugLoc(dl)
142+
.setChain(DAG.getEntryNode())
143+
.setLibCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
144+
.setNoReturn(doesNotReturn)
145+
.setDiscardResult(!isReturnValueUsed)
146+
.setSExtResult(signExtend)
147+
.setZExtResult(!signExtend);
145148
return LowerCallTo(CLI);
146149
}
147150

@@ -3853,7 +3856,7 @@ SDValue TargetLowering::LowerToTLSEmulatedModel(const GlobalAddressSDNode *GA,
38533856

38543857
TargetLowering::CallLoweringInfo CLI(DAG);
38553858
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode());
3856-
CLI.setCallee(CallingConv::C, VoidPtrType, EmuTlsGetAddr, std::move(Args));
3859+
CLI.setLibCallee(CallingConv::C, VoidPtrType, EmuTlsGetAddr, std::move(Args));
38573860
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
38583861

38593862
// TLSADDR will be codegen'ed as call. Inform MFI that function has calls.

‎llvm/lib/IR/Module.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,14 @@ void Module::dropAllReferences() {
465465
GIF.dropAllReferences();
466466
}
467467

468+
unsigned Module::getNumberRegisterParameters() const {
469+
auto *Val =
470+
cast_or_null<ConstantAsMetadata>(getModuleFlag("NumRegisterParameters"));
471+
if (!Val)
472+
return 0;
473+
return cast<ConstantInt>(Val->getValue())->getZExtValue();
474+
}
475+
468476
unsigned Module::getDwarfVersion() const {
469477
auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Dwarf Version"));
470478
if (!Val)

‎llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -2123,8 +2123,9 @@ SDValue AArch64TargetLowering::LowerFSINCOS(SDValue Op,
21232123

21242124
StructType *RetTy = StructType::get(ArgTy, ArgTy, nullptr);
21252125
TargetLowering::CallLoweringInfo CLI(DAG);
2126-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
2127-
.setCallee(CallingConv::Fast, RetTy, Callee, std::move(Args));
2126+
CLI.setDebugLoc(dl)
2127+
.setChain(DAG.getEntryNode())
2128+
.setLibCallee(CallingConv::Fast, RetTy, Callee, std::move(Args));
21282129

21292130
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
21302131
return CallResult.first;

‎llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
4444
TargetLowering::CallLoweringInfo CLI(DAG);
4545
CLI.setDebugLoc(dl)
4646
.setChain(Chain)
47-
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
48-
DAG.getExternalSymbol(bzeroEntry, IntPtr), std::move(Args))
47+
.setLibCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
48+
DAG.getExternalSymbol(bzeroEntry, IntPtr),
49+
std::move(Args))
4950
.setDiscardResult();
5051
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
5152
return CallResult.second;

0 commit comments

Comments
 (0)