[PATCH] D81943: [SROA] Teach SROA to perform no-op pointer conversion.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 09:21:55 PDT 2020
hliao created this revision.
hliao added reviewers: arsenm, chandlerc, lebedev.ri.
Herald added subscribers: llvm-commits, hiraditya, wdng.
Herald added a project: LLVM.
- When promoting a pointer from memory to register, SROA skips pointers from different address spaces. However, as `ptrtoint` and `inttoptr` are defined as no-op casts if that integer type has the same as the pointer value, generate the pair of `ptrtoint`/`inttoptr` (no-op cast) sequence to convert pointers from different address spaces if they have the same size.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81943
Files:
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/address-spaces.ll
llvm/test/Transforms/SROA/alloca-address-space.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81943.271114.patch
Type: text/x-patch
Size: 5602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200616/916edf50/attachment.bin>
More information about the llvm-commits
mailing list