[PATCH] D36864: [Profile] backward propagate profile data in jump-threading

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 13:14:03 PST 2023


davidxl added inline comments.


================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:206
+    if (!PredOutEdge.first)
+      return;
+
----------------
LukeZhuang wrote:
> Hi David, may I ask why this is a `return` instead of `continue` here? If a phi node is like `%cond = phi [true, %bb1], [true, %bb2], [%tmp, %bb3]`, then if `bb1` is not "qualified", then it will not propagate to `bb2`. While it will do if `bb1` and `bb2` is swapped. May I ask is that expected?
> And I have the same question for the newly added checker here: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/JumpThreading.cpp#L280.
> Thank you very much!
could be an oversight. If you have a test case to demonstrate the missed update, please send a patch.


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

https://reviews.llvm.org/D36864



More information about the llvm-commits mailing list