Skip to content

Commit d4ed72c

Browse files
vladimirradosavljevicakiramenai
authored andcommitted
[EraVM] Fix EraVMIndexedMemOpsPrepare pass dependencies
We don't need TargetPassConfig and TargetTransformInfo analyses and initialize pass dependencies. Signed-off-by: Vladimir Radosavljevic <[email protected]>
1 parent eb57f97 commit d4ed72c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Target/EraVM/EraVMIndexedMemOpsPrepare.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@
7171
#include "llvm/Analysis/LoopPass.h"
7272
#include "llvm/Analysis/ScalarEvolution.h"
7373
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
74-
#include "llvm/Analysis/TargetLibraryInfo.h"
75-
#include "llvm/Analysis/TargetTransformInfo.h"
76-
#include "llvm/CodeGen/TargetInstrInfo.h"
77-
#include "llvm/CodeGen/TargetPassConfig.h"
7874
#include "llvm/IR/IRBuilder.h"
7975
#include "llvm/InitializePasses.h"
8076
#include "llvm/Support/CommandLine.h"
@@ -108,8 +104,6 @@ class EraVMIndexedMemOpsPrepare : public LoopPass {
108104
void getAnalysisUsage(AnalysisUsage &AU) const override {
109105
AU.addRequired<ScalarEvolutionWrapperPass>();
110106
AU.addRequired<LoopInfoWrapperPass>();
111-
AU.addRequired<TargetPassConfig>();
112-
AU.addRequired<TargetTransformInfoWrapperPass>();
113107
AU.addPreserved<LoopInfoWrapperPass>();
114108
AU.setPreservesCFG();
115109
}
@@ -279,5 +273,7 @@ char EraVMIndexedMemOpsPrepare::ID = 0;
279273

280274
INITIALIZE_PASS_BEGIN(EraVMIndexedMemOpsPrepare, DEBUG_TYPE,
281275
ERAVM_PREPARE_INDEXED_MEMOPS_NAME, false, false)
276+
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
277+
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
282278
INITIALIZE_PASS_END(EraVMIndexedMemOpsPrepare, DEBUG_TYPE,
283279
ERAVM_PREPARE_INDEXED_MEMOPS_NAME, false, false)

0 commit comments

Comments
 (0)