@@ -187,8 +187,6 @@ void SPIRVPreLegalizerCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
187
187
AU.addPreserved <GISelKnownBitsAnalysis>();
188
188
AU.addRequired <MachineDominatorTreeWrapperPass>();
189
189
AU.addPreserved <MachineDominatorTreeWrapperPass>();
190
- AU.addRequired <GISelCSEAnalysisWrapperPass>();
191
- AU.addPreserved <GISelCSEAnalysisWrapperPass>();
192
190
MachineFunctionPass::getAnalysisUsage (AU);
193
191
}
194
192
@@ -206,11 +204,6 @@ bool SPIRVPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
206
204
return false ;
207
205
auto &TPC = getAnalysis<TargetPassConfig>();
208
206
209
- // Enable CSE.
210
- GISelCSEAnalysisWrapper &Wrapper =
211
- getAnalysis<GISelCSEAnalysisWrapperPass>().getCSEWrapper ();
212
- auto *CSEInfo = &Wrapper.get (TPC.getCSEConfig ());
213
-
214
207
const SPIRVSubtarget &ST = MF.getSubtarget <SPIRVSubtarget>();
215
208
const auto *LI = ST.getLegalizerInfo ();
216
209
@@ -229,8 +222,8 @@ bool SPIRVPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
229
222
// This is the first Combiner, so the input IR might contain dead
230
223
// instructions.
231
224
CInfo.EnableFullDCE = true ;
232
- SPIRVPreLegalizerCombinerImpl Impl (MF, CInfo, &TPC, *KB, CSEInfo, RuleConfig ,
233
- ST, MDT, LI);
225
+ SPIRVPreLegalizerCombinerImpl Impl (MF, CInfo, &TPC, *KB, /* CSEInfo*/ nullptr ,
226
+ RuleConfig, ST, MDT, LI);
234
227
return Impl.combineMachineInstrs ();
235
228
}
236
229
@@ -240,7 +233,6 @@ INITIALIZE_PASS_BEGIN(SPIRVPreLegalizerCombiner, DEBUG_TYPE,
240
233
false )
241
234
INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
242
235
INITIALIZE_PASS_DEPENDENCY(GISelKnownBitsAnalysis)
243
- INITIALIZE_PASS_DEPENDENCY(GISelCSEAnalysisWrapperPass)
244
236
INITIALIZE_PASS_END(SPIRVPreLegalizerCombiner, DEBUG_TYPE,
245
237
" Combine SPIRV machine instrs before legalization" , false ,
246
238
false )
0 commit comments