[PATCH] D153453: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 21:41:16 PDT 2023


khei4 added a comment.

In D153453#4500670 <https://reviews.llvm.org/D153453#4500670>, @nikic wrote:

> In D153453#4500558 <https://reviews.llvm.org/D153453#4500558>, @serge-sans-paille wrote:
>
>> In D153453#4500396 <https://reviews.llvm.org/D153453#4500396>, @nikic wrote:
>>
>>> We shouldn't use dominates() in this patch, as it's not always semantically correct.
>>
>> Can you explain why?
>
> A lot of these comesBefore() are actually reachability queries. This reduces to comesBefore() within one block, but is not the same as dominates() across blocks.

Thank you for your explanation! Yes, that was precisely the reachability, and semantics will differ from domination on multi-bb. But that is at least sound and might be reasonable to restrict only dominated cases. I'm still finding the reasonable scope ;)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153453/new/

https://reviews.llvm.org/D153453



More information about the llvm-commits mailing list