Use StringRef in Pass/PassManager APIs (NFC)

llvm-svn: 283004
This commit is contained in:
Mehdi Amini 2016-10-01 02:56:57 +00:00
parent 1851fff9c0
commit 1fef2dd6b7
216 changed files with 259 additions and 397 deletions

View File

@ -107,9 +107,7 @@ public:
// LPPassManager needs LoopInfo.
void getAnalysisUsage(AnalysisUsage &Info) const override;
const char *getPassName() const override {
return "Loop Pass Manager";
}
StringRef getPassName() const override { return "Loop Pass Manager"; }
PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }

View File

@ -101,9 +101,7 @@ public:
/// RGPassManager needs RegionInfo.
void getAnalysisUsage(AnalysisUsage &Info) const override;
const char *getPassName() const override {
return "Region Pass Manager";
}
StringRef getPassName() const override { return "Region Pass Manager"; }
PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }

View File

@ -342,9 +342,7 @@ public:
// Ctor, nothing fancy.
IRTranslator();
const char *getPassName() const override {
return "IRTranslator";
}
StringRef getPassName() const override { return "IRTranslator"; }
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -28,7 +28,7 @@ namespace llvm {
class InstructionSelect : public MachineFunctionPass {
public:
static char ID;
const char *getPassName() const override { return "InstructionSelect"; }
StringRef getPassName() const override { return "InstructionSelect"; }
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -41,9 +41,7 @@ public:
// Ctor, nothing fancy.
MachineLegalizePass();
const char *getPassName() const override {
return "MachineLegalizePass";
}
StringRef getPassName() const override { return "MachineLegalizePass"; }
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -586,9 +586,7 @@ public:
/// Create a RegBankSelect pass with the specified \p RunningMode.
RegBankSelect(Mode RunningMode = Fast);
const char *getPassName() const override {
return "RegBankSelect";
}
StringRef getPassName() const override { return "RegBankSelect"; }
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -458,7 +458,7 @@ public:
/// in BackendConsumer::OptimizationRemarkHandler).
virtual bool isEnabled() const = 0;
const char *getPassName() const { return PassName; }
StringRef getPassName() const { return PassName; }
std::string getMsg() const;
Optional<uint64_t> getHotness() const { return Hotness; }
void setHotness(Optional<uint64_t> H) { Hotness = H; }

View File

@ -486,9 +486,7 @@ public:
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) override;
const char *getPassName() const override {
return "Function Pass Manager";
}
StringRef getPassName() const override { return "Function Pass Manager"; }
FunctionPass *getContainedPass(unsigned N) {
assert ( N < PassVector.size() && "Pass number out of range!");

View File

@ -60,20 +60,20 @@ public:
inline bool ignorablePass(const PassInfo *P) const {
// Ignore non-selectable and non-constructible passes! Ignore
// non-optimizations.
return P->getPassArgument() == nullptr || *P->getPassArgument() == 0 ||
P->getNormalCtor() == nullptr || ignorablePassImpl(P);
return P->getPassArgument().empty() || P->getNormalCtor() == nullptr ||
ignorablePassImpl(P);
}
// Implement the PassRegistrationListener callbacks used to populate our map
//
void passRegistered(const PassInfo *P) override {
if (ignorablePass(P)) return;
if (findOption(P->getPassArgument()) != getNumOptions()) {
if (findOption(P->getPassArgument().data()) != getNumOptions()) {
errs() << "Two passes with the same argument (-"
<< P->getPassArgument() << ") attempted to be registered!\n";
llvm_unreachable(nullptr);
}
addLiteralOption(P->getPassArgument(), P, P->getPassName());
addLiteralOption(P->getPassArgument().data(), P, P->getPassName().data());
}
void passEnumerate(const PassInfo *P) override { passRegistered(P); }
@ -89,7 +89,7 @@ private:
// ValLessThan - Provide a sorting comparator for Values elements...
static int ValLessThan(const PassNameParser::OptionInfo *VT1,
const PassNameParser::OptionInfo *VT2) {
return std::strcmp(VT1->Name, VT2->Name);
return VT1->Name < VT2->Name;
}
};
@ -130,7 +130,7 @@ template<const char *Args>
class PassArgFilter {
public:
bool operator()(const PassInfo &P) const {
return(std::strstr(Args, P.getPassArgument()));
return StringRef(Args).contains(P.getPassArgument());
}
};

View File

@ -97,7 +97,7 @@ public:
/// implemented in terms of the name that is registered by one of the
/// Registration templates, but can be overloaded directly.
///
virtual const char *getPassName() const;
virtual StringRef getPassName() const;
/// getPassID - Return the PassID number that corresponds to this pass.
AnalysisID getPassID() const {

View File

@ -13,6 +13,8 @@
#ifndef LLVM_PASSINFO_H
#define LLVM_PASSINFO_H
#include "llvm/ADT/StringRef.h"
#include <cassert>
#include <vector>
@ -33,8 +35,8 @@ public:
typedef Pass *(*TargetMachineCtor_t)(TargetMachine *);
private:
const char *const PassName; // Nice name for Pass
const char *const PassArgument; // Command Line argument to run this pass
StringRef PassName; // Nice name for Pass
StringRef PassArgument; // Command Line argument to run this pass
const void *PassID;
const bool IsCFGOnlyPass; // Pass only looks at the CFG.
const bool IsAnalysis; // True if an analysis pass.
@ -47,8 +49,8 @@ private:
public:
/// PassInfo ctor - Do not call this directly, this should only be invoked
/// through RegisterPass.
PassInfo(const char *name, const char *arg, const void *pi,
NormalCtor_t normal, bool isCFGOnly, bool is_analysis,
PassInfo(StringRef name, StringRef arg, const void *pi, NormalCtor_t normal,
bool isCFGOnly, bool is_analysis,
TargetMachineCtor_t machine = nullptr)
: PassName(name), PassArgument(arg), PassID(pi), IsCFGOnlyPass(isCFGOnly),
IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal),
@ -63,13 +65,13 @@ public:
/// getPassName - Return the friendly name for the pass, never returns null
///
const char *getPassName() const { return PassName; }
StringRef getPassName() const { return PassName; }
/// getPassArgument - Return the command line option that may be passed to
/// 'opt' that will cause this pass to be run. This will return null if there
/// is no argument.
///
const char *getPassArgument() const { return PassArgument; }
StringRef getPassArgument() const { return PassArgument; }
/// getTypeInfo - Return the id object for the pass...
/// TODO : Rename

View File

@ -67,9 +67,7 @@ public:
Info.setPreservesAll();
}
const char *getPassName() const override {
return "CallGraph Pass Manager";
}
StringRef getPassName() const override { return "CallGraph Pass Manager"; }
PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }

View File

@ -48,7 +48,7 @@ namespace {
initializeWriteBitcodePassPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override { return "Bitcode Writer"; }
StringRef getPassName() const override { return "Bitcode Writer"; }
bool runOnModule(Module &M) override {
const ModuleSummaryIndex *Index =

View File

@ -164,7 +164,7 @@ class TypePromotionTransaction;
}
bool runOnFunction(Function &F) override;
const char *getPassName() const override { return "CodeGen Prepare"; }
StringRef getPassName() const override { return "CodeGen Prepare"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
// FIXME: When we can selectively preserve passes, preserve the domtree.

View File

@ -63,7 +63,7 @@ public:
static char ID;
DetectDeadLanes() : MachineFunctionPass(ID) {}
const char *getPassName() const override { return "Detect Dead Lanes"; }
StringRef getPassName() const override { return "Detect Dead Lanes"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -71,7 +71,7 @@ namespace {
void getAnalysisUsage(AnalysisUsage &AU) const override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "Exception handling preparation";
}
};

View File

@ -602,7 +602,7 @@ public:
EarlyIfConverter() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override { return "Early If-Conversion"; }
StringRef getPassName() const override { return "Early If-Conversion"; }
private:
bool tryConvertIf(MachineBasicBlock*);

View File

@ -175,9 +175,7 @@ public:
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
return "Execution dependency fix";
}
StringRef getPassName() const override { return "Execution dependency fix"; }
private:
iterator_range<SmallVectorImpl<int>::const_iterator>

View File

@ -32,7 +32,7 @@ class Printer : public FunctionPass {
public:
explicit Printer(raw_ostream &OS) : FunctionPass(ID), OS(OS) {}
const char *getPassName() const override;
StringRef getPassName() const override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;
@ -87,7 +87,7 @@ FunctionPass *llvm::createGCInfoPrinter(raw_ostream &OS) {
return new Printer(OS);
}
const char *Printer::getPassName() const {
StringRef Printer::getPassName() const {
return "Print Garbage Collector Information";
}

View File

@ -45,7 +45,7 @@ public:
static char ID;
LowerIntrinsics();
const char *getPassName() const override;
StringRef getPassName() const override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool doInitialization(Module &M) override;
@ -93,7 +93,7 @@ LowerIntrinsics::LowerIntrinsics() : FunctionPass(ID) {
initializeLowerIntrinsicsPass(*PassRegistry::getPassRegistry());
}
const char *LowerIntrinsics::getPassName() const {
StringRef LowerIntrinsics::getPassName() const {
return "Lower Garbage Collection Instructions";
}

View File

@ -182,9 +182,7 @@ namespace {
bool runOnFunction(Function &F) override;
bool doFinalization(Module &M) override;
const char *getPassName() const override {
return "Merge internal globals";
}
StringRef getPassName() const override { return "Merge internal globals"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -70,7 +70,7 @@ public:
initializeInterleavedAccessPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override { return "Interleaved Access Pass"; }
StringRef getPassName() const override { return "Interleaved Access Pass"; }
bool runOnFunction(Function &F) override;

View File

@ -33,7 +33,7 @@ struct MIRPrintingPass : public MachineFunctionPass {
MIRPrintingPass() : MachineFunctionPass(ID), OS(dbgs()) {}
MIRPrintingPass(raw_ostream &OS) : MachineFunctionPass(ID), OS(OS) {}
const char *getPassName() const override { return "MIR Printing Pass"; }
StringRef getPassName() const override { return "MIR Printing Pass"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();

View File

@ -56,7 +56,7 @@ public:
}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override { return "Machine InstCombiner"; }
StringRef getPassName() const override { return "Machine InstCombiner"; }
private:
bool doSubstitute(unsigned NewSize, unsigned OldSize);

View File

@ -34,7 +34,7 @@ struct MachineFunctionPrinterPass : public MachineFunctionPass {
MachineFunctionPrinterPass(raw_ostream &os, const std::string &banner)
: MachineFunctionPass(ID), OS(os), Banner(banner) {}
const char *getPassName() const override { return "MachineFunction Printer"; }
StringRef getPassName() const override { return "MachineFunction Printer"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();

View File

@ -76,9 +76,7 @@ public:
RABasic();
/// Return the pass name.
const char* getPassName() const override {
return "Basic Register Allocator";
}
StringRef getPassName() const override { return "Basic Register Allocator"; }
/// RABasic analysis usage.
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -149,9 +149,7 @@ namespace {
spillImpossible = ~0u
};
public:
const char *getPassName() const override {
return "Fast Register Allocator";
}
StringRef getPassName() const override { return "Fast Register Allocator"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -318,9 +318,7 @@ public:
RAGreedy();
/// Return the pass name.
const char* getPassName() const override {
return "Greedy Register Allocator";
}
StringRef getPassName() const override { return "Greedy Register Allocator"; }
/// RAGreedy analysis usage.
void getAnalysisUsage(AnalysisUsage &AU) const override;

View File

@ -99,9 +99,7 @@ public:
}
/// Return the pass name.
const char* getPassName() const override {
return "PBQP Register Allocator";
}
StringRef getPassName() const override { return "PBQP Register Allocator"; }
/// PBQP analysis usage.
void getAnalysisUsage(AnalysisUsage &au) const override;

View File

@ -48,7 +48,7 @@ public:
initializeRegUsageInfoCollectorPass(Registry);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Register Usage Information Collector Pass";
}

View File

@ -52,7 +52,7 @@ public:
initializeRegUsageInfoPropagationPassPass(Registry);
}
const char *getPassName() const override { return RUIP_NAME; }
StringRef getPassName() const override { return RUIP_NAME; }
bool runOnMachineFunction(MachineFunction &MF) override;

View File

@ -48,7 +48,7 @@ public:
static char ID;
RenameIndependentSubregs() : MachineFunctionPass(ID) {}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Rename Disconnected Subregister Components";
}

View File

@ -36,9 +36,7 @@ namespace {
ResetMachineFunction(bool EmitFallbackDiag = false)
: MachineFunctionPass(ID), EmitFallbackDiag(EmitFallbackDiag) {}
const char *getPassName() const override {
return "ResetMachineFunction";
}
StringRef getPassName() const override { return "ResetMachineFunction"; }
bool runOnMachineFunction(MachineFunction &MF) override {
if (MF.getProperties().hasProperty(

View File

@ -199,9 +199,7 @@ public:
MachineFunctionPass::getAnalysisUsage(AU);
}
const char *getPassName() const override {
return "Shrink Wrapping analysis";
}
StringRef getPassName() const override { return "Shrink Wrapping analysis"; }
/// \brief Perform the shrink-wrapping analysis and update
/// the MachineFrameInfo attached to \p MF with the results.

View File

@ -58,7 +58,7 @@ public:
bool runOnFunction(Function &F) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {}
const char *getPassName() const override {
StringRef getPassName() const override {
return "SJLJ Exception Handling preparation";
}

View File

@ -62,7 +62,7 @@ public:
void getAnalysisUsage(AnalysisUsage &AU) const override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "Windows exception handling preparation";
}

View File

@ -193,9 +193,7 @@ public:
PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }
const char *getPassName() const override {
return "BasicBlock Pass Manager";
}
StringRef getPassName() const override { return "BasicBlock Pass Manager"; }
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) override {
@ -340,9 +338,7 @@ public:
/// its runOnFunction() for function F.
Pass* getOnTheFlyPass(Pass *MP, AnalysisID PI, Function &F) override;
const char *getPassName() const override {
return "Module Pass Manager";
}
StringRef getPassName() const override { return "Module Pass Manager"; }
PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }
@ -684,7 +680,7 @@ void PMTopLevelManager::schedulePass(Pass *P) {
if (PI && !PI->isAnalysis() && ShouldPrintBeforePass(PI)) {
Pass *PP = P->createPrinterPass(
dbgs(), std::string("*** IR Dump Before ") + P->getPassName() + " ***");
dbgs(), ("*** IR Dump Before " + P->getPassName() + " ***").str());
PP->assignPassManager(activeStack, getTopLevelPassManagerType());
}
@ -693,7 +689,7 @@ void PMTopLevelManager::schedulePass(Pass *P) {
if (PI && !PI->isAnalysis() && ShouldPrintAfterPass(PI)) {
Pass *PP = P->createPrinterPass(
dbgs(), std::string("*** IR Dump After ") + P->getPassName() + " ***");
dbgs(), ("*** IR Dump After " + P->getPassName() + " ***").str());
PP->assignPassManager(activeStack, getTopLevelPassManagerType());
}
}

View File

@ -64,7 +64,7 @@ void Pass::dumpPassStructure(unsigned Offset) {
/// implemented in terms of the name that is registered by one of the
/// Registration templates, but can be overloaded directly.
///
const char *Pass::getPassName() const {
StringRef Pass::getPassName() const {
AnalysisID AID = getPassID();
const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(AID);
if (PI)

View File

@ -93,7 +93,7 @@ public:
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Workaround A53 erratum 835769 pass";
}

View File

@ -125,7 +125,7 @@ public:
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "A57 FP Anti-dependency breaker";
}

View File

@ -68,9 +68,7 @@ public:
initializeAArch64AddressTypePromotionPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override {
return AARCH64_TYPE_PROMO_NAME;
}
StringRef getPassName() const override { return AARCH64_TYPE_PROMO_NAME; }
/// Iterate over the functions and promote the computation of interesting
// sext instructions.

View File

@ -90,9 +90,7 @@ public:
bool runOnMachineFunction(MachineFunction &F) override;
const char *getPassName() const override {
return AARCH64_ADVSIMD_NAME;
}
StringRef getPassName() const override { return AARCH64_ADVSIMD_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -56,9 +56,7 @@ public:
: AsmPrinter(TM, std::move(Streamer)), MCInstLowering(OutContext, *this),
SM(*this), AArch64FI(nullptr) {}
const char *getPassName() const override {
return "AArch64 Assembly Printer";
}
StringRef getPassName() const override { return "AArch64 Assembly Printer"; }
/// \brief Wrapper for MCInstLowering.lowerOperand() for the
/// tblgen'erated pseudo lowering.

View File

@ -88,9 +88,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return AARCH64_BR_RELAX_NAME;
}
StringRef getPassName() const override { return AARCH64_BR_RELAX_NAME; }
};
char AArch64BranchRelaxation::ID = 0;
}

View File

@ -132,7 +132,7 @@ struct LDTLSCleanup : public MachineFunctionPass {
return Copy;
}
const char *getPassName() const override { return TLSCLEANUP_PASS_NAME; }
StringRef getPassName() const override { return TLSCLEANUP_PASS_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -184,9 +184,7 @@ struct AArch64CollectLOH : public MachineFunctionPass {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
return AARCH64_COLLECT_LOH_NAME;
}
StringRef getPassName() const override { return AARCH64_COLLECT_LOH_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();

View File

@ -105,7 +105,7 @@ public:
bool adjustTo(MachineInstr *CmpMI, AArch64CC::CondCode Cmp, MachineInstr *To,
int ToImm);
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "AArch64 Condition Optimizer";
}
};

View File

@ -737,7 +737,7 @@ public:
}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "AArch64 Conditional Compares";
}

View File

@ -49,7 +49,7 @@ public:
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override { return AARCH64_DEAD_REG_DEF_NAME; }
StringRef getPassName() const override { return AARCH64_DEAD_REG_DEF_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -37,9 +37,7 @@ public:
bool runOnMachineFunction(MachineFunction &Fn) override;
const char *getPassName() const override {
return AARCH64_EXPAND_PSEUDO_NAME;
}
StringRef getPassName() const override { return AARCH64_EXPAND_PSEUDO_NAME; }
private:
bool expandMBB(MachineBasicBlock &MBB);

View File

@ -47,7 +47,7 @@ public:
: SelectionDAGISel(tm, OptLevel), Subtarget(nullptr),
ForCodeSize(false) {}
const char *getPassName() const override {
StringRef getPassName() const override {
return "AArch64 Instruction Selection";
}

View File

@ -165,9 +165,7 @@ struct AArch64LoadStoreOpt : public MachineFunctionPass {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
return AARCH64_LOAD_STORE_OPT_NAME;
}
StringRef getPassName() const override { return AARCH64_LOAD_STORE_OPT_NAME; }
};
char AArch64LoadStoreOpt::ID = 0;
} // namespace

View File

@ -105,7 +105,7 @@ public:
initializeAArch64PromoteConstantPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override { return "AArch64 Promote Constant"; }
StringRef getPassName() const override { return "AArch64 Promote Constant"; }
/// Iterate over the functions and promote the interesting constants into
/// global variables with module scope.

View File

@ -56,7 +56,7 @@ public:
return MachineFunctionProperties().set(
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "AArch64 Redundant Copy Elimination";
}
};

View File

@ -42,7 +42,7 @@ public:
initializeAArch64StorePairSuppressPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override { return STPSUPPRESS_PASS_NAME; }
StringRef getPassName() const override { return STPSUPPRESS_PASS_NAME; }
bool runOnMachineFunction(MachineFunction &F) override;

View File

@ -27,7 +27,7 @@ class AMDGPUAlwaysInline : public ModulePass {
public:
AMDGPUAlwaysInline() : ModulePass(ID) { }
bool runOnModule(Module &M) override;
const char *getPassName() const override { return "AMDGPU Always Inline Pass"; }
StringRef getPassName() const override { return "AMDGPU Always Inline Pass"; }
};
} // End anonymous namespace

View File

@ -36,7 +36,7 @@ public:
AMDGPUAnnotateKernelFeatures() : ModulePass(ID) { }
bool runOnModule(Module &M) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "AMDGPU Annotate Kernel Features";
}

View File

@ -37,7 +37,9 @@ public:
FunctionPass(ID) { }
bool doInitialization(Module &M) override;
bool runOnFunction(Function &F) override;
const char *getPassName() const override { return "AMDGPU Annotate Uniform Values"; }
StringRef getPassName() const override {
return "AMDGPU Annotate Uniform Values";
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<DivergenceAnalysis>();
AU.setPreservesAll();

View File

@ -95,7 +95,7 @@ AMDGPUAsmPrinter::AMDGPUAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer)) {}
const char *AMDGPUAsmPrinter::getPassName() const {
StringRef AMDGPUAsmPrinter::getPassName() const {
return "AMDGPU Assembly Printer";
}

View File

@ -118,7 +118,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override;
StringRef getPassName() const override;
/// Implemented in AMDGPUMCInstLower.cpp
void EmitInstruction(const MachineInstr *MI) override;

View File

@ -114,9 +114,7 @@ public:
bool doInitialization(Module &M) override;
bool runOnFunction(Function &F) override;
const char *getPassName() const override {
return "AMDGPU IR optimizations";
}
StringRef getPassName() const override { return "AMDGPU IR optimizations"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<DivergenceAnalysis>();

View File

@ -50,7 +50,7 @@ public:
virtual ~AMDGPUDAGToDAGISel();
bool runOnMachineFunction(MachineFunction &MF) override;
void Select(SDNode *N) override;
const char *getPassName() const override;
StringRef getPassName() const override;
void PostprocessISelDAG() override;
private:
@ -494,7 +494,7 @@ bool AMDGPUDAGToDAGISel::isUniformBr(const SDNode *N) const {
Term->getMetadata("structurizecfg.uniform");
}
const char *AMDGPUDAGToDAGISel::getPassName() const {
StringRef AMDGPUDAGToDAGISel::getPassName() const {
return "AMDGPU DAG->DAG Pattern Instruction Selection";
}

View File

@ -358,7 +358,7 @@ class AMDGPUOpenCLImageTypeLoweringPass : public ModulePass {
return transformKernels(M);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "AMDGPU OpenCL Image Type Pass";
}
};

View File

@ -76,9 +76,7 @@ public:
bool doInitialization(Module &M) override;
bool runOnFunction(Function &F) override;
const char *getPassName() const override {
return "AMDGPU Promote Alloca";
}
StringRef getPassName() const override { return "AMDGPU Promote Alloca"; }
void handleAlloca(AllocaInst &I);

View File

@ -138,7 +138,7 @@ public:
initializeAMDGPUCFGStructurizerPass(*PassRegistry::getPassRegistry());
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "AMDGPU Control Flow Graph structurizer Pass";
}

View File

@ -66,7 +66,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override;
StringRef getPassName() const override;
};
char R600ClauseMergePass::ID = 0;
@ -201,7 +201,7 @@ bool R600ClauseMergePass::runOnMachineFunction(MachineFunction &MF) {
return false;
}
const char *R600ClauseMergePass::getPassName() const {
StringRef R600ClauseMergePass::getPassName() const {
return "R600 Merge Clause Markers Pass";
}

View File

@ -684,7 +684,7 @@ public:
return false;
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "R600 Control Flow Finalizer Pass";
}
};

View File

@ -319,7 +319,7 @@ public:
return false;
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "R600 Emit Clause Markers Pass";
}
};

View File

@ -42,7 +42,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "R600 Expand special instructions pass";
}
};

View File

@ -121,7 +121,7 @@ public:
MachineFunctionPass::getAnalysisUsage(AU);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "R600 Vector Registers Merge Pass";
}

View File

@ -47,9 +47,7 @@ public:
MachineFunctionPass::getAnalysisUsage(AU);
}
const char *getPassName() const override {
return "R600 Packetizer";
}
StringRef getPassName() const override { return "R600 Packetizer"; }
bool runOnMachineFunction(MachineFunction &Fn) override;
};

View File

@ -102,9 +102,7 @@ public:
bool runOnFunction(Function &F) override;
const char *getPassName() const override {
return "SI annotate control flow";
}
StringRef getPassName() const override { return "SI annotate control flow"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<LoopInfoWrapperPass>();

View File

@ -38,7 +38,7 @@ public:
static char ID;
SIDebuggerInsertNops() : MachineFunctionPass(ID) { }
const char *getPassName() const override { return PASS_NAME; }
StringRef getPassName() const override { return PASS_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -37,9 +37,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Fix CF Live Intervals";
}
StringRef getPassName() const override { return "SI Fix CF Live Intervals"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<LiveIntervals>();

View File

@ -89,9 +89,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Fix SGPR copies";
}
StringRef getPassName() const override { return "SI Fix SGPR copies"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -36,9 +36,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Fold Operands";
}
StringRef getPassName() const override { return "SI Fold Operands"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -60,7 +60,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "SI insert s_cbranch_execz instructions";
}

View File

@ -148,7 +148,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "SI insert wait instructions";
}

View File

@ -98,9 +98,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Load / Store Optimizer";
}
StringRef getPassName() const override { return "SI Load / Store Optimizer"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -92,7 +92,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "SI Lower control flow pseudo instructions";
}

View File

@ -41,9 +41,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Lower i1 Copies";
}
StringRef getPassName() const override { return "SI Lower i1 Copies"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -33,7 +33,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "SI optimize exec mask operations";
}

View File

@ -45,9 +45,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Shrink Instructions";
}
StringRef getPassName() const override { return "SI Shrink Instructions"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();

View File

@ -42,9 +42,7 @@ public:
SITypeRewriter() : FunctionPass(ID) { }
bool doInitialization(Module &M) override;
bool runOnFunction(Function &F) override;
const char *getPassName() const override {
return "SI Type Rewriter";
}
StringRef getPassName() const override { return "SI Type Rewriter"; }
void visitLoadInst(LoadInst &I);
void visitCallInst(CallInst &I);
void visitBitCast(BitCastInst &I);

View File

@ -153,9 +153,7 @@ public:
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
return "SI Whole Quad Mode";
}
StringRef getPassName() const override { return "SI Whole Quad Mode"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<LiveIntervals>();

View File

@ -52,9 +52,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &Fn) override;
const char *getPassName() const override {
return "ARM A15 S->D optimizer";
}
StringRef getPassName() const override { return "ARM A15 S->D optimizer"; }
private:
const ARMBaseInstrInfo *TII;

View File

@ -70,7 +70,7 @@ public:
explicit ARMAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer);
const char *getPassName() const override {
StringRef getPassName() const override {
return "ARM Assembly / Object Emitter";
}

View File

@ -200,7 +200,7 @@ namespace {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "ARM constant island placement and branch shortening pass";
}

View File

@ -56,7 +56,7 @@ namespace {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "ARM pseudo instruction expansion pass";
}

View File

@ -70,9 +70,7 @@ public:
return true;
}
const char *getPassName() const override {
return "ARM Instruction Selection";
}
StringRef getPassName() const override { return "ARM Instruction Selection"; }
void PreprocessISelDAG() override;

View File

@ -98,9 +98,7 @@ namespace {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
return ARM_LOAD_STORE_OPT_NAME;
}
StringRef getPassName() const override { return ARM_LOAD_STORE_OPT_NAME; }
private:
/// A set of load/store MachineInstrs with same base register sorted by
@ -1953,7 +1951,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &Fn) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return ARM_PREALLOC_LOAD_STORE_OPT_NAME;
}

View File

@ -32,9 +32,7 @@ public:
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
return "optimise barriers pass";
}
StringRef getPassName() const override { return "optimise barriers pass"; }
};
char ARMOptimizeBarriersPass::ID = 0;
}

View File

@ -43,7 +43,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &Fn) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "ARM MLA / MLS expansion pass";
}

View File

@ -41,7 +41,7 @@ namespace {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Thumb IT blocks insertion pass";
}

View File

@ -151,7 +151,7 @@ namespace {
MachineFunctionProperties::Property::NoVRegs);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Thumb2 instruction size reduction pass";
}

View File

@ -38,7 +38,7 @@ public:
explicit BPFAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer)) {}
const char *getPassName() const override { return "BPF Assembly Printer"; }
StringRef getPassName() const override { return "BPF Assembly Printer"; }
void EmitInstruction(const MachineInstr *MI) override;
};

View File

@ -38,7 +38,7 @@ class BPFDAGToDAGISel : public SelectionDAGISel {
public:
explicit BPFDAGToDAGISel(BPFTargetMachine &TM) : SelectionDAGISel(TM) {}
const char *getPassName() const override {
StringRef getPassName() const override {
return "BPF DAG->DAG Pattern Instruction Selection";
}

View File

@ -33,7 +33,7 @@ namespace llvm {
return AsmPrinter::runOnMachineFunction(Fn);
}
const char *getPassName() const override {
StringRef getPassName() const override {
return "Hexagon Assembly Printer";
}

View File

@ -144,7 +144,7 @@ namespace {
HexagonBitSimplify() : MachineFunctionPass(ID), MDT(0) {
initializeHexagonBitSimplifyPass(*PassRegistry::getPassRegistry());
}
virtual const char *getPassName() const {
virtual StringRef getPassName() const {
return "Hexagon bit simplification";
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {

View File

@ -44,7 +44,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
StringRef getPassName() const override {
return "Hexagon Branch Relaxation";
}

Some files were not shown because too many files have changed in this diff Show More