[PATCH] D59129: [SROA] WIP: Lowering alloca is not always beneficial

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 16:43:27 PDT 2019


efriedma added a comment.

> But again, I haven't looked much into MemCpyOpt, so if you think it would be better there, I will start looking into that.

The transform is more powerful working the other way: it could catch cases that were't originally written as "memcpy" in the source code.  Not sure that means we shouldn't do something in SROA, though.  Ideally, I think we want the "canonical" form to be the promoted version, and transform it to the compact version as part of lowering.  But I'm not sure how much work it would be to make the reverse transform reliable, and I don't want to block an incremental improvement.

MemCpyOpt doesn't actually merge memcpys at the moment, I think.  It does merge memsets, and it has a lot of memcpy-related transforms, but that one in particular is missing.  But it's the right sort of logic, at least...


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

https://reviews.llvm.org/D59129





More information about the llvm-commits mailing list