[PATCH] D79055: [LiveVariables] Mark PhysReg implicit-def MachineOperands of INLINEASM_BR as LiveOut

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 18:54:59 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveVariables.cpp:24
 // register is not register allocatable, it is not tracked.  This is useful for
 // things like the stack pointer and condition codes.
 //
----------------
I'm concerned about the "allowing it to do a single local analysis to resolve physical register lifetimes in each basic block" part.  Is this change enough to actually make the liveness reliable?  In particular, I'm concerned what might happens if the fallthrough successor of an INLINEASM_BR has other predecessors.  (Or is that impossible?)


================
Comment at: llvm/lib/CodeGen/LiveVariables.cpp:619
+        if (MO.isReg() && Register::isPhysicalRegister(MO.getReg()) &&
+            MO.isDef() && !MO.isDead() && !MO.isEarlyClobber())
+          LiveOuts.insert(MO.getReg());
----------------
How is EarlyClobber related to this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79055





More information about the llvm-commits mailing list