LLVM 20.0.0git
Functions | Variables
HipStdPar.cpp File Reference
#include "llvm/Transforms/HipStdPar/HipStdPar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <cassert>
#include <string>
#include <utility>

Go to the source code of this file.

Functions

template<typename T >
static void eraseFromModule (T &ToErase)
 
static bool checkIfSupported (GlobalVariable &G)
 
static void clearModule (Module &M)
 
static void maybeHandleGlobals (Module &M)
 
template<unsigned N>
static void removeUnreachableFunctions (const SmallPtrSet< const Function *, N > &Reachable, Module &M)
 
static bool isAcceleratorExecutionRoot (const Function *F)
 
static bool checkIfSupported (const Function *F, const CallBase *CB)
 

Variables

static constexpr std::pair< StringLiteral, StringLiteralReplaceMap []
 

Function Documentation

◆ checkIfSupported() [1/2]

static bool checkIfSupported ( const Function F,
const CallBase CB 
)
inlinestatic

◆ checkIfSupported() [2/2]

static bool checkIfSupported ( GlobalVariable G)
inlinestatic

◆ clearModule()

static void clearModule ( Module M)
inlinestatic

◆ eraseFromModule()

template<typename T >
static void eraseFromModule ( T ToErase)
inlinestatic

◆ isAcceleratorExecutionRoot()

static bool isAcceleratorExecutionRoot ( const Function F)
inlinestatic

Definition at line 156 of file HipStdPar.cpp.

References llvm::CallingConv::AMDGPU_KERNEL, and F.

Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().

◆ maybeHandleGlobals()

static void maybeHandleGlobals ( Module M)
inlinestatic

Definition at line 117 of file HipStdPar.cpp.

References checkIfSupported(), clearModule(), and G.

Referenced by llvm::HipStdParAcceleratorCodeSelectionPass::run().

◆ removeUnreachableFunctions()

template<unsigned N>
static void removeUnreachableFunctions ( const SmallPtrSet< const Function *, N > &  Reachable,
Module M 
)
inlinestatic

Variable Documentation

◆ ReplaceMap

constexpr std::pair<StringLiteral, StringLiteral> ReplaceMap[]
staticconstexpr

Definition at line 233 of file HipStdPar.cpp.

Referenced by llvm::HipStdParAllocationInterpositionPass::run().