[PATCH] D114832: [SROA] Improve SROA to prevent generating redundant coalescing operations.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 09:23:08 PST 2021
luna added a comment.
In D114832#3163500 <https://reviews.llvm.org/D114832#3163500>, @lebedev.ri wrote:
> That's a lot of complexity. It sounds like we are missing some cleanup transforms in some other passes?
> Can you please post a standalone example of the "bad" codegen (via a godbolt link) that you are trying to avoid?
To compare the LLVM and GCC codegen, tail call is generated in GCC but not LLVM.
- (LLVM) https://godbolt.org/z/qTY6MfMGa
- (GCC) https://godbolt.org/z/srh5fG6nW
`test_struct_of_two_int` (from llvm/test/Transforms/SROA/alloca-struct.ll) shows the diff in IR level before and after this change, and run clang with this patch (`clang -S -O3 file.cpp`) would generate a tail call.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114832/new/
https://reviews.llvm.org/D114832
More information about the llvm-commits
mailing list