[PATCH] D101430: [AMDGPU] Refactor hazard recognition IsHazardFn and IsExpiredFn

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 02:18:05 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp:431
     MinWaitStates = Found ? std::min(MinWaitStates, W) : W;
-    if (IsExpired(nullptr, MinWaitStates))
-      return MinWaitStates;
----------------
Isn' t this dead code? We can only get here if one of the recursive calls to getWaitStatesSince returned a finite value, but then the recursive call will already have done the IsExpired test and returned INTMAX if it failed.

In any case, how about just deleting these three lines as a first patch, and then all the other NFC changes can be done as follow ups?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101430/new/

https://reviews.llvm.org/D101430



More information about the llvm-commits mailing list