[llvm] [InstCombine] Iterative replacement in PtrReplacer (PR #137215)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 09:45:26 PDT 2025


================
@@ -260,8 +259,7 @@ class PointerReplacer {
     return (FromAS == ToAS) || IC.isValidAddrSpaceCast(FromAS, ToAS);
   }
 
-  SmallPtrSet<Instruction *, 32> ValuesToRevisit;
-  SmallSetVector<Instruction *, 4> Worklist;
+  SmallSetVector<Instruction *, 4> UsersToReplace;
----------------
shiltian wrote:

Is `4` a good base point here? The original code uses `32`.

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


More information about the llvm-commits mailing list