LLVM 20.0.0git
Macros | Functions | Variables
AArch64CallLowering.cpp File Reference

This file implements the lowering of LLVM calls to machine code calls for GlobalISel. More...

#include "AArch64CallLowering.h"
#include "AArch64GlobalISelUtils.h"
#include "AArch64ISelLowering.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64RegisterInfo.h"
#include "AArch64Subtarget.h"
#include "Utils/AArch64SMEAttributes.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/ObjCARCUtil.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/GlobalISel/Utils.h"
#include "llvm/CodeGen/LowLevelTypeUtils.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include <algorithm>
#include <cassert>
#include <cstdint>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "aarch64-call-lowering"
 

Functions

static void applyStackPassedSmallTypeDAGHack (EVT OrigVT, MVT &ValVT, MVT &LocVT)
 
static LLT getStackValueStoreTypeHack (const CCValAssign &VA)
 
static bool doesCalleeRestoreStack (CallingConv::ID CallConv, bool TailCallOpt)
 
static void handleMustTailForwardedRegisters (MachineIRBuilder &MIRBuilder, CCAssignFn *AssignFn)
 Helper function to compute forwarded registers for musttail calls.
 
static bool canGuaranteeTCO (CallingConv::ID CC, bool GuaranteeTailCalls)
 Return true if the calling convention is one that we can guarantee TCO for.
 
static bool mayTailCallThisCC (CallingConv::ID CC)
 Return true if we might ever do TCO for calls with this calling convention.
 
static std::pair< CCAssignFn *, CCAssignFn * > getAssignFnsForCC (CallingConv::ID CC, const AArch64TargetLowering &TLI)
 Returns a pair containing the fixed CCAssignFn and the vararg CCAssignFn for CC.
 
static unsigned getCallOpcode (const MachineFunction &CallerF, bool IsIndirect, bool IsTailCall, std::optional< CallLowering::PtrAuthInfo > &PAI, MachineRegisterInfo &MRI)
 
static const uint32_tgetMaskForArgs (SmallVectorImpl< AArch64CallLowering::ArgInfo > &OutArgs, AArch64CallLowering::CallLoweringInfo &Info, const AArch64RegisterInfo &TRI, MachineFunction &MF)
 

Variables

cl::opt< boolEnableSVEGISel
 

Detailed Description

This file implements the lowering of LLVM calls to machine code calls for GlobalISel.

Definition in file AArch64CallLowering.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aarch64-call-lowering"

Definition at line 51 of file AArch64CallLowering.cpp.

Function Documentation

◆ applyStackPassedSmallTypeDAGHack()

static void applyStackPassedSmallTypeDAGHack ( EVT  OrigVT,
MVT ValVT,
MVT LocVT 
)
static

Definition at line 61 of file AArch64CallLowering.cpp.

◆ canGuaranteeTCO()

static bool canGuaranteeTCO ( CallingConv::ID  CC,
bool  GuaranteeTailCalls 
)
static

Return true if the calling convention is one that we can guarantee TCO for.

Definition at line 781 of file AArch64CallLowering.cpp.

References CC, llvm::CallingConv::Fast, llvm::CallingConv::SwiftTail, and llvm::CallingConv::Tail.

◆ doesCalleeRestoreStack()

static bool doesCalleeRestoreStack ( CallingConv::ID  CallConv,
bool  TailCallOpt 
)
static

◆ getAssignFnsForCC()

static std::pair< CCAssignFn *, CCAssignFn * > getAssignFnsForCC ( CallingConv::ID  CC,
const AArch64TargetLowering TLI 
)
static

◆ getCallOpcode()

static unsigned getCallOpcode ( const MachineFunction CallerF,
bool  IsIndirect,
bool  IsTailCall,
std::optional< CallLowering::PtrAuthInfo > &  PAI,
MachineRegisterInfo MRI 
)
static

◆ getMaskForArgs()

static const uint32_t * getMaskForArgs ( SmallVectorImpl< AArch64CallLowering::ArgInfo > &  OutArgs,
AArch64CallLowering::CallLoweringInfo &  Info,
const AArch64RegisterInfo TRI,
MachineFunction MF 
)
static

◆ getStackValueStoreTypeHack()

static LLT getStackValueStoreTypeHack ( const CCValAssign VA)
static

◆ handleMustTailForwardedRegisters()

static void handleMustTailForwardedRegisters ( MachineIRBuilder MIRBuilder,
CCAssignFn *  AssignFn 
)
static

◆ mayTailCallThisCC()

static bool mayTailCallThisCC ( CallingConv::ID  CC)
static

Variable Documentation

◆ EnableSVEGISel

cl::opt<bool> EnableSVEGISel
extern