[PATCH] D23937: [MemCpyOpt] Return value `memcpy` elision.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 17:29:21 PDT 2016


efriedma added a comment.

Well, in the general case, you could treat it like a sort of coloring problem (if you can prove x and y aren't live at the same time, you can allocate them both on top of the sret parameter), but probably best to stick with the simple case for now, where the only use of the sret is the memcpy you're examining.

Beyond that, in theory there's also a problem if the memcpy writes beyond the end of the sret (it's only undefined behavior if the memcpy actually executes), but I'm not sure if you can realistically trigger that issue.


Repository:
  rL LLVM

https://reviews.llvm.org/D23937





More information about the llvm-commits mailing list