LLVM 19.0.0git
Functions | Variables
HipStdPar.cpp File Reference
#include "llvm/Transforms/HipStdPar/HipStdPar.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.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 159 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 120 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 236 of file HipStdPar.cpp.

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