[PATCH] D128073: [SROA] Try harder to find a vector promotion viable type when rewriting

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 10:48:01 PDT 2022


vangthao created this revision.
Herald added subscribers: kosarev, kerbowa, hiraditya, jvesely.
Herald added a project: All.
vangthao requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We are seeing significant performance loss when an alloca fails to get promoted
to register. I have observed that this is due to the common type found when
attempting to rewrite partition users being unviable for promotion. While if we
would have continue looking for a type, we would have found a subtype in the
original allocated type that would have enabled promotion. Thus first check if
the initial common type found is promotion viable and if not then continue
looking instead of stopping with the initial common type found.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128073

Files:
  llvm/lib/Transforms/Scalar/SROA.cpp
  llvm/test/CodeGen/AMDGPU/sroa-common-type-fail-promotion.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128073.437969.patch
Type: text/x-patch
Size: 7246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220617/5d6cc57a/attachment.bin>


More information about the llvm-commits mailing list