[PATCH] D144468: [GlobalOpt] Extend CleanupPointerRootUsers to handle CE users.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 02:53:14 PST 2023


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:247
+      } else
+        append_range(Worklist, CE->users());
     } else if (Constant *C = dyn_cast<Constant>(U)) {
----------------
nikic wrote:
> Do we know that the users here are only cast/GEP?
It could be any constant expression, but would that be a problem? I think the existing code should handle any type of constant expressions already. I added some extra tests with different constant expressions in  c34936465c56 and  7f51145b1bc2


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144468



More information about the llvm-commits mailing list