LLVM 24.0.0git
NVPTXPromoteParamAlign.cpp File Reference
#include "NVPTX.h"
#include "NVPTXUtilities.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include <optional>
#include <queue>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "nvptx-promote-param-align"

Functions

 INITIALIZE_PASS (NVPTXPromoteParamAlignLegacyPass, "nvptx-promote-param-align", "Promote alignment of parameters and return values (NVPTX)", false, false) static bool layoutAttrsMatch(AttributeSet CalleeAttrs
return !CalleeAttrs getByValType ()||CalleeAttrs.getAlignment()
static bool callSiteMatchesCalleeABI (const CallBase &CB, const Function &F)
static bool canPromoteParamAlign (Function &F)
static bool propagateAlignmentToLoads (Value *Val, Align NewAlign, const DataLayout &DL)
static MaybeAlign getPromotedParamAlign (Align CurrentAlign)
static bool promoteParamAlign (Function &F)
static bool setByValParamABIAlign (Function &F)
static bool propagateByValParamLoadAlign (Function &F)
static bool promoteParamAlignModule (Module &M)

Variables

AttributeSet CallAttrs

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "nvptx-promote-param-align"

Definition at line 40 of file NVPTXPromoteParamAlign.cpp.

Function Documentation

◆ callSiteMatchesCalleeABI()

bool callSiteMatchesCalleeABI ( const CallBase & CB,
const Function & F )
static

◆ canPromoteParamAlign()

bool canPromoteParamAlign ( Function & F)
static

Definition at line 90 of file NVPTXPromoteParamAlign.cpp.

References llvm::all_of(), and F.

Referenced by promoteParamAlign().

◆ getByValType()

return !CalleeAttrs getByValType ( )

References CallAttrs.

◆ getPromotedParamAlign()

MaybeAlign getPromotedParamAlign ( Align CurrentAlign)
static

Definition at line 164 of file NVPTXPromoteParamAlign.cpp.

Referenced by promoteParamAlign().

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( NVPTXPromoteParamAlignLegacyPass ,
"nvptx-promote-param-align" ,
"Promote alignment of parameters and return values (NVPTX)" ,
false ,
false  )

◆ promoteParamAlign()

◆ promoteParamAlignModule()

bool promoteParamAlignModule ( Module & M)
static

◆ propagateAlignmentToLoads()

◆ propagateByValParamLoadAlign()

bool propagateByValParamLoadAlign ( Function & F)
static

◆ setByValParamABIAlign()

bool setByValParamABIAlign ( Function & F)
static

Variable Documentation

◆ CallAttrs

AttributeSet CallAttrs
Initial value:
{
if (CalleeAttrs.getByValType() != CallAttrs.getByValType() ||
CalleeAttrs.getStackAlignment() != CallAttrs.getStackAlignment())
return false
AttributeSet CallAttrs

Definition at line 65 of file NVPTXPromoteParamAlign.cpp.

Referenced by llvm::AArch64TTIImpl::areInlineCompatible(), callSiteMatchesCalleeABI(), llvm::AArch64TargetLowering::fallBackToDAGISel(), getByValType(), llvm::AArch64TTIImpl::getInlineCallPenalty(), and getSMToggleCondition().