[PATCH] D102721: [CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 13:22:08 PDT 2021


wlei created this revision.
Herald added subscribers: hoy, wenlei, lxfind, hiraditya.
wlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102721

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
===================================================================
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1325,6 +1325,10 @@
     DTU->applyUpdates(Updates);
   }
 
+  // Here the BB is not a dead block but folded into its predecessors, so move
+  // the probe and mark it as dangling.
+  moveAndDanglePseudoProbes(BB, NewSI);
+
   ++NumFoldValueComparisonIntoPredecessors;
   return true;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102721.346259.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/e13ceba8/attachment.bin>


More information about the llvm-commits mailing list