[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 8 16:10:13 PST 2021


luna added a comment.

In D114832#3181366 <https://reviews.llvm.org/D114832#3181366>, @Carrot wrote:

>> Driven by the compile-time feedback, another thing for me to consider, (probably after a preliminary convergence on the pass to add analysis info or do the transform), is to prune the existing solution so it's faster on the benchmark.
>
> Your current method is
>
>   1 collect all accesses to an alloca object, mark the access type
>   2 check the aggregated access types, if there is only <store constant> type, mark the object as unsplittable.
>
> I think in step1, if the access type is not <store constant>, you can bail out early, then for most splittable objects the check can be finished quickly.

whoops; I was typing so probably missed this suggestions just now.  Bailing out early for most splittable cases sounds reasonable. I will do a quick experiment and report back the compile time(if possible). thanks!

In D114832#3181366 <https://reviews.llvm.org/D114832#3181366>, @Carrot wrote:

>> Driven by the compile-time feedback, another thing for me to consider, (probably after a preliminary convergence on the pass to add analysis info or do the transform), is to prune the existing solution so it's faster on the benchmark.
>
> Your current method is
>
>   1 collect all accesses to an alloca object, mark the access type
>   2 check the aggregated access types, if there is only <store constant> type, mark the object as unsplittable.
>
> I think in step1, if the access type is not <store constant>, you can bail out early, then for most splittable objects the check can be finished quickly.




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