We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2438ce commit 48ecec2Copy full SHA for 48ecec2
llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
@@ -361,11 +361,13 @@ void HexagonSubtarget::CallMutation::apply(ScheduleDAGInstrs *DAGInstrs) {
361
} else if (MO.isDef() && MO.getReg().isPhysical()) {
362
for (MCRegAliasIterator AI(MO.getReg(), &TRI, true); AI.isValid();
363
++AI) {
364
- if (LastVRegUse.count(*AI) &&
365
- LastVRegUse[*AI] != &DAG->SUnits[su])
366
- // %r0 = ...
367
- DAG->addEdge(&DAG->SUnits[su], SDep(LastVRegUse[*AI], SDep::Barrier));
368
- LastVRegUse.erase(*AI);
+ if (auto It = LastVRegUse.find(*AI); It != LastVRegUse.end()) {
+ if (It->second != &DAG->SUnits[su])
+ // %r0 = ...
+ DAG->addEdge(&DAG->SUnits[su],
+ SDep(It->second, SDep::Barrier));
369
+ LastVRegUse.erase(It);
370
+ }
371
}
372
373
0 commit comments