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

weiwei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:02:18 PDT 2022


wwei added 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"));
----------------
reames wrote:
> This should default to more like 30 to be in sync with other such cutoffs.  
modify the default value to 32


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:4063
+
+	if (NumUsers == 0) {
+          // Try sinking to another block. If that block is unreachable, then do
----------------
reames wrote:
> The flow of this bit makes no sense to me, but that might be because I'm misreading due to the indentation issues.  
In order to run these checks only once, don't need to check them every iterations. So I add `if(NumUsers == 0)` here. 


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

https://reviews.llvm.org/D121585



More information about the llvm-commits mailing list