[PATCH] D112731: [AMDGPU] Really preserve LiveVariables in SILowerControlFlow

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 09:34:08 PDT 2021


ruiling added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveVariables.cpp:672
 
+void LiveVariables::recomputeLivenessForSingleDef(Register Reg) {
+  VarInfo &VI = getVarInfo(Reg);
----------------
You need to re-compute `Kills` as well.


================
Comment at: llvm/lib/CodeGen/LiveVariables.cpp:686
+    if (&UseBB == &DefBB) {
+      // A use in the same BB as the single def must come after the def.
+    } else {
----------------
This sounds like true after Phi elimination? I did not do careful thinking. But it is not true when we have PHI, see the pattern described at line 148 in this file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112731



More information about the llvm-commits mailing list