[PATCH] D37611: [IfConversion] More simple, correct dead/kill liveness handling

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 09:30:02 PDT 2017


kparzysz added a comment.

This seems like a reasonable way of handling it, but I'd like Matthias and Kyle to comment on this as well.



================
Comment at: lib/CodeGen/MachineBasicBlock.cpp:456
+        MO->setIsKill(false);
+      if (MO->isDead())
+        MO->setIsDead(false);
----------------
kparzysz wrote:
> Are you seeing any cases where a "dead" flag would be removed?  This is somewhat concerning.  Whether a use is a kill or not depends on the ordering relative to other uses, which can change.  Whether a def is dead or not is more closely related to the program's semantics: once a def is dead, new uses should not really appear.
I thought about it for a bit---I guess that a dead def from a side A of a diamond can appear to "reach" a use from side B of the diamond after predication, if A precedes B in the predicated code.


https://reviews.llvm.org/D37611





More information about the llvm-commits mailing list