LLVM  10.0.0svn
Macros | Functions
AArch64CallLowering.cpp File Reference

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

#include "AArch64CallLowering.h"
#include "AArch64ISelLowering.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64Subtarget.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/GlobalISel/Utils.h"
#include "llvm/CodeGen/LowLevelType.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/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/MachineValueType.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
Include dependency graph for AArch64CallLowering.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "aarch64-call-lowering"
 

Functions

static bool doesCalleeRestoreStack (CallingConv::ID CallConv, bool TailCallOpt)
 
static void handleMustTailForwardedRegisters (MachineIRBuilder &MIRBuilder, CCAssignFn *AssignFn)
 Helper function to compute forwarded registers for musttail calls. More...
 
static bool canGuaranteeTCO (CallingConv::ID CC)
 Return true if the calling convention is one that we can guarantee TCO for. More...
 
static bool mayTailCallThisCC (CallingConv::ID CC)
 Return true if we might ever do TCO for calls with this calling convention. More...
 
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. More...
 
static unsigned getCallOpcode (const Function &CallerF, bool IsIndirect, bool IsTailCall)
 

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 47 of file AArch64CallLowering.cpp.

Function Documentation

◆ canGuaranteeTCO()

static bool canGuaranteeTCO ( CallingConv::ID  CC)
static

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

Definition at line 498 of file AArch64CallLowering.cpp.

References llvm::CallingConv::Fast.

Referenced by llvm::AArch64CallLowering::isEligibleForTailCallOptimization(), and mayTailCallThisCC().

◆ 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 Function CallerF,
bool  IsIndirect,
bool  IsTailCall 
)
static

◆ handleMustTailForwardedRegisters()

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

◆ mayTailCallThisCC()

static bool mayTailCallThisCC ( CallingConv::ID  CC)
static

Return true if we might ever do TCO for calls with this calling convention.

Definition at line 503 of file AArch64CallLowering.cpp.

References llvm::CallingConv::C, canGuaranteeTCO(), llvm::CallingConv::PreserveMost, and llvm::CallingConv::Swift.

Referenced by llvm::AArch64CallLowering::isEligibleForTailCallOptimization().