aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
diff options
context:
space:
mode:
authorAkshat Oke <Akshat.Oke@amd.com>2025-01-10 12:23:07 +0530
committerGitHub <noreply@github.com>2025-01-10 12:23:07 +0530
commit089555095b91d693ab68d039cb5fda4b7b8e45bc (patch)
treeaa1e5aaf732148279f5d3fd68a9884f3eb87edf9 /llvm/lib/CodeGen/RegAllocBasic.cpp
parent01a7d4e26b9bac27e282b113209f53c4c1d290b2 (diff)
downloadllvm-089555095b91d693ab68d039cb5fda4b7b8e45bc.zip
llvm-089555095b91d693ab68d039cb5fda4b7b8e45bc.tar.gz
llvm-089555095b91d693ab68d039cb5fda4b7b8e45bc.tar.bz2
Revert "Spiller: Detach legacy pass and supply analyses instead (#119… (#122426)
…181)" This reverts commit a531800344dc54e9c197a13b22e013f919f3f5e1.
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBasic.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index f3f34f8..c05aa1e 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -22,7 +22,6 @@
#include "llvm/CodeGen/LiveRegMatrix.h"
#include "llvm/CodeGen/LiveStacks.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
-#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/Passes.h"
@@ -188,7 +187,6 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<ProfileSummaryInfoWrapperPass>();
AU.addRequired<MachineBlockFrequencyInfoWrapperPass>();
AU.addPreserved<MachineBlockFrequencyInfoWrapperPass>();
- AU.addRequired<MachineDominatorTreeWrapperPass>();
AU.addRequiredID(MachineDominatorsID);
AU.addPreservedID(MachineDominatorsID);
AU.addRequired<MachineLoopInfoWrapperPass>();
@@ -312,20 +310,16 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) {
<< "********** Function: " << mf.getName() << '\n');
MF = &mf;
- auto &MBFI = getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI();
- auto &LiveStks = getAnalysis<LiveStacksWrapperLegacy>().getLS();
- auto &MDT = getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
-
RegAllocBase::init(getAnalysis<VirtRegMapWrapperLegacy>().getVRM(),
getAnalysis<LiveIntervalsWrapperPass>().getLIS(),
getAnalysis<LiveRegMatrixWrapperLegacy>().getLRM());
- VirtRegAuxInfo VRAI(*MF, *LIS, *VRM,
- getAnalysis<MachineLoopInfoWrapperPass>().getLI(), MBFI,
- &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI());
+ VirtRegAuxInfo VRAI(
+ *MF, *LIS, *VRM, getAnalysis<MachineLoopInfoWrapperPass>().getLI(),
+ getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI(),
+ &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI());
VRAI.calculateSpillWeightsAndHints();
- SpillerInstance.reset(
- createInlineSpiller({*LIS, LiveStks, MDT, MBFI}, *MF, *VRM, VRAI));
+ SpillerInstance.reset(createInlineSpiller(*this, *MF, *VRM, VRAI));
allocatePhysRegs();
postOptimization();