9#ifndef LLVM_CODEGEN_REGALLOCPRIORITYADVISOR_H
10#define LLVM_CODEGEN_REGALLOCPRIORITYADVISOR_H
58 unsigned getPriority(
const LiveInterval &LI)
const override;
70 unsigned getPriority(
const LiveInterval &LI)
const override;
90 virtual std::unique_ptr<RegAllocPriorityAdvisor>
113 return !PAC.preservedWhenStateless() ||
124 std::unique_ptr<RegAllocPriorityAdvisorProvider> Provider;
147 std::unique_ptr<RegAllocPriorityAdvisorProvider>
Provider;
#define LLVM_ATTRIBUTE_RETURNS_NONNULL
This header defines various interfaces for pass management in LLVM.
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
SI optimize exec mask operations pre RA
API to communicate dependencies between analyses during invalidation.
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Trigger the invalidation of some other analysis pass if not already handled and return whether it was...
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
DefaultPriorityAdvisor(const MachineFunction &MF, const RAGreedy &RA, SlotIndexes *const Indexes)
Stupid priority advisor which just enqueues in virtual register number order, for debug purposes only...
DummyPriorityAdvisor(const MachineFunction &MF, const RAGreedy &RA, SlotIndexes *const Indexes)
ImmutablePass class - This class is used to provide information that does not need to be run.
This is an important class for using LLVM in a threaded context.
LiveInterval - This class represents the liveness of a register, or stack slot.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Pass interface - Implemented by all 'passes'.
A set of analyses that are preserved following a run of a transformation pass.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
RegAllocPriorityAdvisorProvider & getProvider()
Get an advisor for the given context (i.e. machine function, etc)
AdvisorMode getAdvisorMode() const
virtual void logRewardIfNeeded(const MachineFunction &MF, llvm::function_ref< float()> GetReward)
std::unique_ptr< RegAllocPriorityAdvisorProvider > Provider
RegAllocPriorityAdvisorAnalysisLegacy(AdvisorMode Mode)
Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Common provider for getting the priority advisor and logging rewards.
virtual ~RegAllocPriorityAdvisorProvider()=default
virtual void logRewardIfNeeded(const MachineFunction &MF, function_ref< float()> GetReward)
AdvisorMode getAdvisorMode() const
virtual std::unique_ptr< RegAllocPriorityAdvisor > getAdvisor(const MachineFunction &MF, const RAGreedy &RA, SlotIndexes &SI)=0
RegAllocPriorityAdvisorProvider(AdvisorMode Mode)
Interface to the priority advisor, which is responsible for prioritizing live ranges.
const RegisterClassInfo & RegClassInfo
MachineRegisterInfo *const MRI
RegAllocPriorityAdvisor(const RegAllocPriorityAdvisor &)=delete
const bool RegClassPriorityTrumpsGlobalness
RegAllocPriorityAdvisor(RegAllocPriorityAdvisor &&)=delete
const bool ReverseLocalAssignment
virtual ~RegAllocPriorityAdvisor()=default
SlotIndexes *const Indexes
virtual unsigned getPriority(const LiveInterval &LI) const =0
Find the priority value for a live range.
const TargetRegisterInfo *const TRI
StringRef - Represent a constant reference to a string, i.e.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
RegAllocPriorityAdvisorAnalysisLegacy * createReleaseModePriorityAdvisorAnalysis()
RegAllocPriorityAdvisorAnalysisLegacy * createDevelopmentModePriorityAdvisorAnalysis()
Pass * callDefaultCtor< RegAllocPriorityAdvisorAnalysisLegacy >()
Specialization for the API used by the analysis infrastructure to create an instance of the priority ...
LLVM_ATTRIBUTE_RETURNS_NONNULL RegAllocPriorityAdvisorProvider * createDevelopmentModePriorityAdvisorProvider(LLVMContext &Ctx)
LLVM_ATTRIBUTE_RETURNS_NONNULL RegAllocPriorityAdvisorProvider * createReleaseModePriorityAdvisorProvider()
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
RegAllocPriorityAdvisorProvider * Provider
bool invalidate(MachineFunction &MF, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &Inv)