[PATCH] D86661: Use properlyDominates in RDFLiveness when sorting on dominance.

Pranav Bhandarkar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 13:55:12 PDT 2020


pranavb created this revision.
pranavb added reviewers: asbirlea, kparzysz.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
pranavb requested review of this revision.

When looking for all reaching definitions, we sort basic blocks on dominance. When sorting looking for properlyDominates() handles the case A == B.


https://reviews.llvm.org/D86661

Files:
  llvm/lib/CodeGen/RDFLiveness.cpp


Index: llvm/lib/CodeGen/RDFLiveness.cpp
===================================================================
--- llvm/lib/CodeGen/RDFLiveness.cpp
+++ llvm/lib/CodeGen/RDFLiveness.cpp
@@ -235,7 +235,7 @@
 
   // Sort the blocks with respect to dominance.
   std::sort(TmpBB.begin(), TmpBB.end(), [this](auto A, auto B) {
-    return MDT.dominates(A, B);
+    return MDT.properlyDominates(A, B);
   });
 
   std::vector<NodeId> TmpInst;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86661.288109.patch
Type: text/x-patch
Size: 434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200826/1c26c1b6/attachment.bin>


More information about the llvm-commits mailing list