[GlobalOpt] Extend CleanupPointerRootUsers to handle CE users.
authorFlorian Hahn <flo@fhahn.com>
Thu, 2 Mar 2023 09:12:23 +0000 (10:12 +0100)
committerFlorian Hahn <flo@fhahn.com>
Thu, 2 Mar 2023 09:12:24 +0000 (10:12 +0100)
commitd94e8479fcd7cd57fa9c6f3f3aa24d2ad3e11d89
tree634a29411ea5b52a04898db69af66d93e09e2180
parentcf2d80b9a2a4ff6b53ca3c9efd5c740cd733e42d
[GlobalOpt] Extend CleanupPointerRootUsers to handle CE users.

Extend CleanupPointerRootUsers to iterate over a worklist, add users of
constant expressions to the worklist to enable additional cleanups.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D144468
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/ThinLTO/X86/import-constant.ll
llvm/test/Transforms/GlobalOpt/cleanup-pointer-root-users-gep-constexpr.ll
llvm/test/Transforms/GlobalOpt/cleanup-pointer-root-users-ptrtoint-add-constexpr.ll [new file with mode: 0644]