File tree 5 files changed +8
-11
lines changed
5 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -1092,7 +1092,7 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
1092
1092
SchedModel = STI.getSchedModel ();
1093
1093
MRI = &MF.getRegInfo ();
1094
1094
DomTree = &getAnalysis<MachineDominatorTree>();
1095
- Loops = getAnalysisIfAvailable <MachineLoopInfo>();
1095
+ Loops = &getAnalysis <MachineLoopInfo>();
1096
1096
Traces = &getAnalysis<MachineTraceMetrics>();
1097
1097
MinInstr = nullptr ;
1098
1098
@@ -1226,7 +1226,7 @@ bool EarlyIfPredicator::runOnMachineFunction(MachineFunction &MF) {
1226
1226
MRI = &MF.getRegInfo ();
1227
1227
SchedModel.init (&STI);
1228
1228
DomTree = &getAnalysis<MachineDominatorTree>();
1229
- Loops = getAnalysisIfAvailable <MachineLoopInfo>();
1229
+ Loops = &getAnalysis <MachineLoopInfo>();
1230
1230
MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
1231
1231
1232
1232
bool Changed = false ;
Original file line number Diff line number Diff line change @@ -1016,11 +1016,8 @@ bool TypePromotionLegacy::runOnFunction(Function &F) {
1016
1016
if (skipFunction (F))
1017
1017
return false ;
1018
1018
1019
- auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
1020
- if (!TPC)
1021
- return false ;
1022
-
1023
- auto *TM = &TPC->getTM <TargetMachine>();
1019
+ auto &TPC = getAnalysis<TargetPassConfig>();
1020
+ auto *TM = &TPC.getTM <TargetMachine>();
1024
1021
auto &TTI = getAnalysis<TargetTransformInfoWrapperPass>().getTTI (F);
1025
1022
auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo ();
1026
1023
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ bool VirtRegRewriter::runOnMachineFunction(MachineFunction &fn) {
261
261
Indexes = &getAnalysis<SlotIndexes>();
262
262
LIS = &getAnalysis<LiveIntervals>();
263
263
VRM = &getAnalysis<VirtRegMap>();
264
- DebugVars = getAnalysisIfAvailable <LiveDebugVariables>();
264
+ DebugVars = &getAnalysis <LiveDebugVariables>();
265
265
LLVM_DEBUG (dbgs () << " ********** REWRITE VIRTUAL REGISTERS **********\n "
266
266
<< " ********** Function: " << MF->getName () << ' \n ' );
267
267
LLVM_DEBUG (VRM->dump ());
Original file line number Diff line number Diff line change @@ -935,7 +935,7 @@ bool AArch64ConditionalCompares::runOnMachineFunction(MachineFunction &MF) {
935
935
SchedModel = MF.getSubtarget ().getSchedModel ();
936
936
MRI = &MF.getRegInfo ();
937
937
DomTree = &getAnalysis<MachineDominatorTree>();
938
- Loops = getAnalysisIfAvailable <MachineLoopInfo>();
938
+ Loops = &getAnalysis <MachineLoopInfo>();
939
939
MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
940
940
Traces = &getAnalysis<MachineTraceMetrics>();
941
941
MinInstr = nullptr ;
Original file line number Diff line number Diff line change @@ -3286,7 +3286,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass {
3286
3286
if (skipFunction (F))
3287
3287
return false ;
3288
3288
3289
- auto * LIWP = getAnalysisIfAvailable <LoopInfoWrapperPass>();
3289
+ auto & LIWP = getAnalysis <LoopInfoWrapperPass>();
3290
3290
3291
3291
auto *MSSAWP = getAnalysisIfAvailable<MemorySSAWrapperPass>();
3292
3292
return Impl.runImpl (
@@ -3297,7 +3297,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass {
3297
3297
Impl.isMemDepEnabled ()
3298
3298
? &getAnalysis<MemoryDependenceWrapperPass>().getMemDep ()
3299
3299
: nullptr ,
3300
- LIWP ? &LIWP-> getLoopInfo () : nullptr ,
3300
+ &LIWP. getLoopInfo (),
3301
3301
&getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE (),
3302
3302
MSSAWP ? &MSSAWP->getMSSA () : nullptr );
3303
3303
}
You can’t perform that action at this time.
0 commit comments