Skip to content

Commit cee6509

Browse files
[ARM] Avoid repeated hash lookups (NFC) (#109602)
1 parent 3e0d37f commit cee6509

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ namespace {
144144
void ProcessLoop() {
145145
std::function<void(MachineBasicBlock *)> Search =
146146
[this, &Search](MachineBasicBlock *MBB) -> void {
147-
if (Visited.count(MBB))
147+
if (!Visited.insert(MBB).second)
148148
return;
149149

150-
Visited.insert(MBB);
151150
for (auto *Succ : MBB->successors()) {
152151
if (!ML.contains(Succ))
153152
continue;

0 commit comments

Comments
 (0)