mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 07:01:03 +08:00
GlobalISel: Add CallBase to CallLoweringInfo
The DAG version has this, and is necessary for call lowering to take advantage of any attributes at the call site.
This commit is contained in:
@@ -116,6 +116,9 @@ public:
|
||||
/// vreg that the swifterror should be copied into after the call.
|
||||
Register SwiftErrorVReg;
|
||||
|
||||
/// Original IR callsite corresponding to this call, if available.
|
||||
const CallBase *CB = nullptr;
|
||||
|
||||
MDNode *KnownCallees = nullptr;
|
||||
|
||||
/// True if the call must be tail call optimized.
|
||||
|
||||
@@ -139,6 +139,7 @@ bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, const CallBase &CB,
|
||||
if (!Info.OrigRet.Ty->isVoidTy())
|
||||
setArgFlags(Info.OrigRet, AttributeList::ReturnIndex, DL, CB);
|
||||
|
||||
Info.CB = &CB;
|
||||
Info.KnownCallees = CB.getMetadata(LLVMContext::MD_callees);
|
||||
Info.CallConv = CallConv;
|
||||
Info.SwiftErrorVReg = SwiftErrorVReg;
|
||||
|
||||
Reference in New Issue
Block a user