File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1353,7 +1353,6 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
1353
1353
// For each instruction that defines a vector, compute what VL its
1354
1354
// downstream users demand.
1355
1355
for (MachineBasicBlock *MBB : post_order (&MF)) {
1356
- // Avoid unreachable blocks as they have degenerate dominance
1357
1356
assert (MDT->isReachableFromEntry (MBB));
1358
1357
for (MachineInstr &MI : reverse (*MBB)) {
1359
1358
if (!isCandidate (MI))
@@ -1363,11 +1362,15 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
1363
1362
}
1364
1363
}
1365
1364
1365
+ // Then go through and see if we can reduce the VL of any instructions to
1366
+ // only what's demanded.
1366
1367
bool MadeChange = false ;
1367
1368
for (MachineBasicBlock &MBB : MF) {
1368
- // Then go through and see if we can reduce the VL of any instructions to
1369
- // only what's demanded.
1370
- for (auto &MI : MBB) {
1369
+ // Avoid unreachable blocks as they have degenerate dominance
1370
+ if (!MDT->isReachableFromEntry (&MBB))
1371
+ continue ;
1372
+
1373
+ for (auto &MI : reverse (MBB)) {
1371
1374
if (!isCandidate (MI))
1372
1375
continue ;
1373
1376
if (!tryReduceVL (MI))
You can’t perform that action at this time.
0 commit comments