[PATCH] D76467: [LiveDebugValues] Speed up collectIDsForRegs, NFC

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 11:55:32 PDT 2020


vsk marked an inline comment as done.
vsk added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues.cpp:801
+
+    if (It == End)
+      return;
----------------
aprantl wrote:
> This looks redundant? No, the formatting in phabricator was weird. this belongs to the outer loop. I guess you could pull this into the inner loop and then get rid of the `It != End &&`. Not sure if that is a big improvement.
Yeah, this is just trying to return early if there aren't any more IDs to find. `It` may be at `End` before we enter the inner loop, so I'm not sure it's safe to sink the check from the loop condition.


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

https://reviews.llvm.org/D76467





More information about the llvm-commits mailing list