[all-commits] [llvm/llvm-project] 94865e: [Reland][InstCombine] Iterative replacement in Ptr...
Anshil Gandhi via All-commits
all-commits at lists.llvm.org
Fri Jun 20 15:04:16 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94865edfa85a61dd4ad985d2fb86990a1bba357b
https://github.com/llvm/llvm-project/commit/94865edfa85a61dd4ad985d2fb86990a1bba357b
Author: Anshil Gandhi <95053726+gandhi56 at users.noreply.github.com>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
A llvm/test/Transforms/InstCombine/AMDGPU/ptr-replace-alloca.ll
Log Message:
-----------
[Reland][InstCombine] Iterative replacement in PtrReplacer (#144626)
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 simpletraversal over the collected users. This reordering ensures that the uses 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.
This is a reland of https://github.com/llvm/llvm-project/pull/137215.
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