[PATCH] D118304: [Spill2Reg][7/9] MBB live-ins are now being updated.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 16:53:35 PDT 2022


vporpo added inline comments.


================
Comment at: llvm/lib/CodeGen/Spill2Reg.cpp:328
+      if (!MBB->isLiveIn(VectorReg))
+        MBB->addLiveIn(VectorReg);
+    }
----------------
Carrot wrote:
> If the reload and spill are in the same BB, like
> ```
> bb6:
>      spill  stack.0
>      reload stack.0
> ```
> 
> does it adds VectorReg to LiveIn?
> 
No, because `ReloadData.IsLiveIn` is false (set earlier in line 224), so the code will not reach line 328  in this case.
I will add comments to explain this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118304



More information about the llvm-commits mailing list