[PATCH] D66190: [CodeGen] Add a pass to do block predication on SSA machine IR

Thomas Raoux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 15:36:39 PDT 2019


ThomasRaoux added inline comments.


================
Comment at: llvm/lib/CodeGen/EarlyIfConversion.cpp:296
+  // get right.
+  if (!MBB->livein_empty()) {
+    LLVM_DEBUG(dbgs() << printMBBReference(*MBB) << " has live-ins.\n");
----------------
jmolloy wrote:
> I'm not sure we should be so concerned with this case for predication, but it's sensible to keep this in for now. Erring on the side of caution is good.
Agree.


================
Comment at: llvm/lib/CodeGen/EarlyIfConversion.cpp:1057
+    Changed = true;
+    updateDomTree(RemovedBlocks);
+    updateLoops(RemovedBlocks);
----------------
jmolloy wrote:
> For my own gratification, could you please comment (in the review, not the code) why this is required for predication but not for speculation?
It is required for both. Those pass preserve the dominator and loop analysis. 


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

https://reviews.llvm.org/D66190





More information about the llvm-commits mailing list