aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorAnshil Gandhi <95053726+gandhi56@users.noreply.github.com>2025-06-16 12:46:54 -0400
committerGitHub <noreply@github.com>2025-06-16 12:46:54 -0400
commit8bbef3d1c9115b3c64365e9b8e4ee84275a4d001 (patch)
tree07bec45bfaaff133828462fbaad7e3ac2662a50c /clang/lib/CodeGen/ModuleBuilder.cpp
parent22d9ea1b636d2c72a24fb0a8ce5216d609164635 (diff)
downloadllvm-8bbef3d1c9115b3c64365e9b8e4ee84275a4d001.zip
llvm-8bbef3d1c9115b3c64365e9b8e4ee84275a4d001.tar.gz
llvm-8bbef3d1c9115b3c64365e9b8e4ee84275a4d001.tar.bz2
[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.
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions