Skip to content

Commit 7a5d1e9

Browse files
[AMDGPU] Avoid repeated hash lookups (NFC) (#127573)
1 parent 9905728 commit 7a5d1e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,14 @@ class AMDGPUWaitSGPRHazards {
384384
}
385385
}
386386

387-
bool Changed = State != BlockState[&MBB].Out;
387+
BlockHazardState &BS = BlockState[&MBB];
388+
bool Changed = State != BS.Out;
388389
if (Emit) {
389390
assert(!Changed && "Hazard state should not change on emit pass");
390391
return Emitted;
391392
}
392393
if (Changed)
393-
BlockState[&MBB].Out = State;
394+
BS.Out = State;
394395
return Changed;
395396
}
396397

0 commit comments

Comments
 (0)