Skip to content

Commit e54f2e5

Browse files
committed
Apply suggestions
1 parent 2783683 commit e54f2e5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,11 @@ class RegAllocEvictionAdvisorAnalysisLegacy : public ImmutablePass {
206206
static char ID;
207207

208208
/// Get an advisor for the given context (i.e. machine function, etc)
209-
std::unique_ptr<RegAllocEvictionAdvisorProvider> &getProvider() {
210-
return Provider;
211-
}
209+
RegAllocEvictionAdvisorProvider &getProvider() { return *Provider; }
212210

213211
AdvisorMode getAdvisorMode() const { return Mode; }
214212
virtual void logRewardIfNeeded(const MachineFunction &MF,
215-
llvm::function_ref<float()> GetReward) {};
213+
function_ref<float()> GetReward) {};
216214

217215
protected:
218216
// This analysis preserves everything, and subclasses may have additional

llvm/lib/CodeGen/RegAllocGreedy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2768,7 +2768,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
27682768

27692769
auto &EvictAdvisorProvider =
27702770
getAnalysis<RegAllocEvictionAdvisorAnalysisLegacy>().getProvider();
2771-
EvictAdvisor = EvictAdvisorProvider->getAdvisor(*MF, *this, MBFI, Loops);
2771+
EvictAdvisor = EvictAdvisorProvider.getAdvisor(*MF, *this, MBFI, Loops);
27722772

27732773
PriorityAdvisor =
27742774
getAnalysis<RegAllocPriorityAdvisorAnalysis>().getAdvisor(*MF, *this);

0 commit comments

Comments
 (0)