[PATCH] D123993: [MachineSink][NFC] delete some useless code

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 03:06:38 PDT 2022


shchenz created this revision.
shchenz added reviewers: qcolombet, efriedma, MatzeB, jsji.
Herald added a subscriber: hiraditya.
Herald added a project: All.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`SuccToSinkTo` dominates all users of MI, so `MI->getParent()` must dominate `SuccToSinkTo`, otherwise there will be use without def issue?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123993

Files:
  llvm/lib/CodeGen/MachineSink.cpp


Index: llvm/lib/CodeGen/MachineSink.cpp
===================================================================
--- llvm/lib/CodeGen/MachineSink.cpp
+++ llvm/lib/CodeGen/MachineSink.cpp
@@ -1400,13 +1400,6 @@
       TryBreak = true;
     }
 
-    // We don't want to sink across a critical edge if we don't dominate the
-    // successor. We could be introducing calculations to new code paths.
-    if (!TryBreak && !DT->dominates(ParentBlock, SuccToSinkTo)) {
-      LLVM_DEBUG(dbgs() << " *** NOTE: Critical edge found\n");
-      TryBreak = true;
-    }
-
     // Don't sink instructions into a loop.
     if (!TryBreak && LI->isLoopHeader(SuccToSinkTo)) {
       LLVM_DEBUG(dbgs() << " *** NOTE: Loop header found\n");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123993.423571.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220419/fa095253/attachment.bin>


More information about the llvm-commits mailing list