Skip to content

Commit 272243d

Browse files
committed
[CodeGen][MachineCSE] Remove unused AA results(NFC)
Alias Analysis result is never used in this pass and hence removing it.
1 parent f119151 commit 272243d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

llvm/lib/CodeGen/MachineCSE.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "llvm/ADT/SmallSet.h"
1919
#include "llvm/ADT/SmallVector.h"
2020
#include "llvm/ADT/Statistic.h"
21-
#include "llvm/Analysis/AliasAnalysis.h"
2221
#include "llvm/Analysis/CFG.h"
2322
#include "llvm/CodeGen/MachineBasicBlock.h"
2423
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
@@ -73,7 +72,6 @@ namespace {
7372
class MachineCSE : public MachineFunctionPass {
7473
const TargetInstrInfo *TII = nullptr;
7574
const TargetRegisterInfo *TRI = nullptr;
76-
AliasAnalysis *AA = nullptr;
7775
MachineDominatorTree *DT = nullptr;
7876
MachineRegisterInfo *MRI = nullptr;
7977
MachineBlockFrequencyInfo *MBFI = nullptr;
@@ -90,7 +88,6 @@ namespace {
9088
void getAnalysisUsage(AnalysisUsage &AU) const override {
9189
AU.setPreservesCFG();
9290
MachineFunctionPass::getAnalysisUsage(AU);
93-
AU.addRequired<AAResultsWrapperPass>();
9491
AU.addPreservedID(MachineLoopInfoID);
9592
AU.addRequired<MachineDominatorTreeWrapperPass>();
9693
AU.addPreserved<MachineDominatorTreeWrapperPass>();
@@ -167,7 +164,6 @@ char &llvm::MachineCSEID = MachineCSE::ID;
167164
INITIALIZE_PASS_BEGIN(MachineCSE, DEBUG_TYPE,
168165
"Machine Common Subexpression Elimination", false, false)
169166
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
170-
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
171167
INITIALIZE_PASS_END(MachineCSE, DEBUG_TYPE,
172168
"Machine Common Subexpression Elimination", false, false)
173169

@@ -943,7 +939,6 @@ bool MachineCSE::runOnMachineFunction(MachineFunction &MF) {
943939
TII = MF.getSubtarget().getInstrInfo();
944940
TRI = MF.getSubtarget().getRegisterInfo();
945941
MRI = &MF.getRegInfo();
946-
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
947942
DT = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
948943
MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI();
949944
LookAheadLimit = TII->getMachineCSELookAheadLimit();

0 commit comments

Comments
 (0)