LLVM 17.0.0git
Namespaces | Macros | Functions | Variables
AMDGPUPropagateAttributes.cpp File Reference

This pass propagates attributes from kernels to the non-entry functions. More...

#include "AMDGPU.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/Cloning.h"
Include dependency graph for AMDGPUPropagateAttributes.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "amdgpu-propagate-attributes"
 

Functions

 INITIALIZE_PASS (AMDGPUPropagateAttributesEarly, "amdgpu-propagate-attributes-early", "Early propagate attributes from kernels to functions", false, false) INITIALIZE_PASS(AMDGPUPropagateAttributesLate
 

Variables

const SubtargetFeatureKV llvm::AMDGPUFeatureKV [AMDGPU::NumSubtargetFeatures-1]
 
amdgpu propagate attributes late
 
amdgpu propagate attributes Late propagate attributes from kernels to functions
 
amdgpu propagate attributes Late propagate attributes from kernels to false
 

Detailed Description

This pass propagates attributes from kernels to the non-entry functions.

Most of the library functions were not compiled for specific ABI, yet will be correctly compiled if proper attributes are propagated from the caller.

The pass analyzes call graph and propagates ABI target features through the call graph.

It can run in two modes: as a function or module pass. A function pass simply propagates attributes. A module pass clones functions if there are callers with different ABI. If a function is cloned all call sites will be updated to use a correct clone.

A function pass is limited in functionality but can run early in the pipeline. A module pass is more powerful but has to run late, so misses library folding opportunities.

Definition in file AMDGPUPropagateAttributes.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-propagate-attributes"

Definition at line 39 of file AMDGPUPropagateAttributes.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AMDGPUPropagateAttributesEarly  ,
"amdgpu-propagate-attributes-early"  ,
"Early propagate attributes from kernels to functions"  ,
false  ,
false   
)

Variable Documentation

◆ false

amdgpu propagate attributes Late propagate attributes from kernels to false

Definition at line 197 of file AMDGPUPropagateAttributes.cpp.

◆ functions

amdgpu propagate attributes Late propagate attributes from kernels to functions

Definition at line 196 of file AMDGPUPropagateAttributes.cpp.

Referenced by LLVMCreateSimpleMCJITMemoryManager().

◆ late

amdgpu propagate attributes late

Definition at line 195 of file AMDGPUPropagateAttributes.cpp.