[llvm] a3aa452 - [CodeGen] RegisterCoalescer: Remove unused AliasAnalysis dependency (#124773)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 23:57:17 PST 2025


Author: Akshat Oke
Date: 2025-01-29T13:27:14+05:30
New Revision: a3aa452a21f983237873fa85c866b9f0224789bd

URL: https://github.com/llvm/llvm-project/commit/a3aa452a21f983237873fa85c866b9f0224789bd
DIFF: https://github.com/llvm/llvm-project/commit/a3aa452a21f983237873fa85c866b9f0224789bd.diff

LOG: [CodeGen] RegisterCoalescer: Remove unused AliasAnalysis dependency (#124773)

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegisterCoalescer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 4203a75b0c70e0..62c15949e46dac 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -20,7 +20,6 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
-#include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/CodeGen/LiveInterval.h"
 #include "llvm/CodeGen/LiveIntervals.h"
 #include "llvm/CodeGen/LiveRangeEdit.h"
@@ -130,7 +129,6 @@ class RegisterCoalescer : public MachineFunctionPass,
   const TargetInstrInfo *TII = nullptr;
   LiveIntervals *LIS = nullptr;
   const MachineLoopInfo *Loops = nullptr;
-  AliasAnalysis *AA = nullptr;
   RegisterClassInfo RegClassInfo;
 
   /// Position and VReg of a PHI instruction during coalescing.
@@ -408,7 +406,6 @@ INITIALIZE_PASS_BEGIN(RegisterCoalescer, "register-coalescer",
 INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
 INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
 INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
-INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
 INITIALIZE_PASS_END(RegisterCoalescer, "register-coalescer",
                     "Register Coalescer", false, false)
 
@@ -588,7 +585,6 @@ bool CoalescerPair::isCoalescable(const MachineInstr *MI) const {
 
 void RegisterCoalescer::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesCFG();
-  AU.addRequired<AAResultsWrapperPass>();
   AU.addRequired<LiveIntervalsWrapperPass>();
   AU.addPreserved<LiveIntervalsWrapperPass>();
   AU.addPreserved<SlotIndexesWrapperPass>();
@@ -4265,7 +4261,6 @@ bool RegisterCoalescer::runOnMachineFunction(MachineFunction &fn) {
   TRI = STI.getRegisterInfo();
   TII = STI.getInstrInfo();
   LIS = &getAnalysis<LiveIntervalsWrapperPass>().getLIS();
-  AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
   Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();
   if (EnableGlobalCopies == cl::BOU_UNSET)
     JoinGlobalCopies = STI.enableJoinGlobalCopies();


        


More information about the llvm-commits mailing list