[PATCH] D149348: RFD: Do not CSE convergent calls in different basic blocks

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 09:14:47 PDT 2023


arsenm added a comment.

In D149348#4302261 <https://reviews.llvm.org/D149348#4302261>, @foad wrote:

>> How confident are we in our ability to strip the convergent attribute off of functions that don't need it?  Seems like this could cause performance regressions.
>
> I don't know. I guess that is an Attributor question? @arsenm @jdoerfert

Removing convergent is easy. It



================
Comment at: llvm/lib/IR/Instruction.cpp:578
+    // different basic blocks.
+    if (CI->isConvergent() && CI->getParent() != I->getParent())
+      return false;
----------------
I’m questioning whether it’s worth or correct to allow CSE of convergent operations in the same block


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149348



More information about the llvm-commits mailing list