LLVM  10.0.0svn
Namespaces | Macros | Functions | Variables
AMDGPUPropagateAttributes.cpp File Reference

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

#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <string>
Include dependency graph for AMDGPUPropagateAttributes.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

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 attrbutes 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 clonned 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 41 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 153 of file AMDGPUPropagateAttributes.cpp.

◆ functions

amdgpu propagate attributes Late propagate attributes from kernels to functions

Definition at line 153 of file AMDGPUPropagateAttributes.cpp.

Referenced by LLVMCreateSimpleMCJITMemoryManager().

◆ late

amdgpu propagate attributes late

Definition at line 153 of file AMDGPUPropagateAttributes.cpp.