#include "AMDGPU.h"
#include "AMDGPUTargetMachine.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
usingnamespacellvm;
namespace {
static cl::opt<bool> StressCalls(
"amdgpu-stress-function-calls",
cl::Hidden,
cl::desc("Force all functions to be noinline"),
cl::init(false));
class AMDGPUAlwaysInline : public ModulePass { … };
}
INITIALIZE_PASS(…)
char AMDGPUAlwaysInline::ID = …;
static void
recursivelyVisitUsers(GlobalValue &GV,
SmallPtrSetImpl<Function *> &FuncsToAlwaysInline) { … }
static bool alwaysInlineImpl(Module &M, bool GlobalOpt) { … }
bool AMDGPUAlwaysInline::runOnModule(Module &M) { … }
ModulePass *llvm::createAMDGPUAlwaysInlinePass(bool GlobalOpt) { … }
PreservedAnalyses AMDGPUAlwaysInlinePass::run(Module &M,
ModuleAnalysisManager &AM) { … }