#include "NVPTX.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include <algorithm>
#include <sstream>
#include <string>
#define NVVM_REFLECT_FUNCTION …
#define NVVM_REFLECT_OCL_FUNCTION …
usingnamespacellvm;
#define DEBUG_TYPE …
namespace llvm { void initializeNVVMReflectPass(PassRegistry &); }
namespace {
class NVVMReflect : public FunctionPass { … };
}
FunctionPass *llvm::createNVVMReflectPass(unsigned int SmVersion) { … }
static cl::opt<bool>
NVVMReflectEnabled("nvvm-reflect-enable", cl::init(true), cl::Hidden,
cl::desc("NVVM reflection, enabled by default"));
char NVVMReflect::ID = …;
INITIALIZE_PASS(…)
static bool runNVVMReflect(Function &F, unsigned SmVersion) { … }
bool NVVMReflect::runOnFunction(Function &F) { … }
NVVMReflectPass::NVVMReflectPass() : … { … }
PreservedAnalyses NVVMReflectPass::run(Function &F,
FunctionAnalysisManager &AM) { … }