[all-commits] [llvm/llvm-project] 8bbef3: [InstCombine] Iterative replacement in PtrReplacer...
Anshil Gandhi via All-commits
all-commits at lists.llvm.org
Mon Jun 16 09:47:15 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8bbef3d1c9115b3c64365e9b8e4ee84275a4d001
https://github.com/llvm/llvm-project/commit/8bbef3d1c9115b3c64365e9b8e4ee84275a4d001
Author: Anshil Gandhi <95053726+gandhi56 at users.noreply.github.com>
Date: 2025-06-16 (Mon, 16 Jun 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
A llvm/test/Transforms/InstCombine/AMDGPU/ptr-replace-alloca.ll
Log Message:
-----------
[InstCombine] Iterative replacement in PtrReplacer (#137215)
This patch enhances the PtrReplacer as follows:
1. Users are now collected iteratively to be generous on the stack. In
the case of PHIs with incoming values which have not yet been visited,
they are pushed back into the stack for reconsideration.
2. Replace users of the pointer root in a reverse-postorder traversal,
instead of a simple traversal over the collected users. This reordering
ensures that the operands of an instruction are replaced before
replacing the instruction itself.
3. During the replacement of PHI, use the same incoming value if it does
not have a replacement.
This patch specifically fixes the case when an incoming value of a PHI
is addrspacecasted.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list