[llvm] [EarlyCSE] De-Duplicate callsites with differing attrs (PR #110929)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 09:34:20 PDT 2024


================
@@ -1632,6 +1639,18 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
           LLVM_DEBUG(dbgs() << "Skipping due to debug counter\n");
           continue;
         }
+        // We probably don't need a complete itersection of attrs between
+        // InVal.first and Inst.
+        // We only CSE readonly functions that have the same memory state and
+        // its not clear that any non-return *callsite* attribute can create
+        // side-effects. Likewise this implies when checking equality of
+        // callsite for CSEing, we can probably ignore all non-return attrs.
----------------
goldsteinn wrote:

Cleared up the comment.

https://github.com/llvm/llvm-project/pull/110929


More information about the llvm-commits mailing list