#include "llvm/Pass.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassNameParser.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/OptBisect.h"
#include "llvm/PassInfo.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#ifdef EXPENSIVE_CHECKS
#include "llvm/IR/StructuralHash.h"
#endif
usingnamespacellvm;
#define DEBUG_TYPE …
Pass::~Pass() { … }
ModulePass::~ModulePass() = default;
Pass *ModulePass::createPrinterPass(raw_ostream &OS,
const std::string &Banner) const { … }
PassManagerType ModulePass::getPotentialPassManagerType() const { … }
static std::string getDescription(const Module &M) { … }
bool ModulePass::skipModule(Module &M) const { … }
bool Pass::mustPreserveAnalysisID(char &AID) const { … }
void Pass::dumpPassStructure(unsigned Offset) { … }
StringRef Pass::getPassName() const { … }
void Pass::preparePassManager(PMStack &) { … }
PassManagerType Pass::getPotentialPassManagerType() const { … }
void Pass::getAnalysisUsage(AnalysisUsage &) const { … }
void Pass::releaseMemory() { … }
void Pass::verifyAnalysis() const { … }
void *Pass::getAdjustedAnalysisPointer(AnalysisID AID) { … }
ImmutablePass *Pass::getAsImmutablePass() { … }
PMDataManager *Pass::getAsPMDataManager() { … }
void Pass::setResolver(AnalysisResolver *AR) { … }
void Pass::print(raw_ostream &OS, const Module *) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void Pass::dump() const {
print(dbgs(), nullptr);
}
#endif
#ifdef EXPENSIVE_CHECKS
uint64_t Pass::structuralHash(Module &M) const {
return StructuralHash(M, true);
}
uint64_t Pass::structuralHash(Function &F) const {
return StructuralHash(F, true);
}
#endif
ImmutablePass::~ImmutablePass() = default;
void ImmutablePass::initializePass() { … }
Pass *FunctionPass::createPrinterPass(raw_ostream &OS,
const std::string &Banner) const { … }
PassManagerType FunctionPass::getPotentialPassManagerType() const { … }
static std::string getDescription(const Function &F) { … }
bool FunctionPass::skipFunction(const Function &F) const { … }
const PassInfo *Pass::lookupPassInfo(const void *TI) { … }
const PassInfo *Pass::lookupPassInfo(StringRef Arg) { … }
Pass *Pass::createPass(AnalysisID ID) { … }
void PassRegistrationListener::enumeratePasses() { … }
PassNameParser::PassNameParser(cl::Option &O)
: … { … }
PassNameParser::~PassNameParser() = default;
namespace {
struct GetCFGOnlyPasses : public PassRegistrationListener { … };
}
void AnalysisUsage::setPreservesCFG() { … }
AnalysisUsage &AnalysisUsage::addPreserved(StringRef Arg) { … }
AnalysisUsage &AnalysisUsage::addRequiredID(const void *ID) { … }
AnalysisUsage &AnalysisUsage::addRequiredID(char &ID) { … }
AnalysisUsage &AnalysisUsage::addRequiredTransitiveID(char &ID) { … }