[PATCH] D121585: [InstCombine] Sink instructions with multiple users in a successor block.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 08:50:16 PDT 2022


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

Fix the indentation so that the code is readable + inline comments.



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:142
+static cl::opt<unsigned> MaxSinkNumUsers(
+    "instcombine-max-sink-users", cl::init(1024),
+    cl::desc("Maximum number of undroppable users for instruction sinking"));
----------------
This should default to more like 30 to be in sync with other such cutoffs.  


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:4063
+
+	if (NumUsers == 0) {
+          // Try sinking to another block. If that block is unreachable, then do
----------------
The flow of this bit makes no sense to me, but that might be because I'm misreading due to the indentation issues.  


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

https://reviews.llvm.org/D121585



More information about the llvm-commits mailing list