[PATCH] D107454: [ARM] Change a couple of instances of LiveRegs.contains to !LiveRegs.available

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 5 02:51:53 PDT 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/ARM/Thumb1FrameLowering.cpp:588
   for (auto Reg : GPRsNoLRSP.set_bits()) {
-    if (!UsedRegs.contains(Reg)) {
       // Remember the first pop-friendly register and exit.
----------------
I have not looked very long at this (and the context how this is used), but if we want to find an available temporary, then the check:

  "the live physical registers UsedRegs does not contain Reg"

sounds about right to me.

So can you perhaps explain the problem and why this is wrong?


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

https://reviews.llvm.org/D107454



More information about the llvm-commits mailing list