[PATCH] D88799: [MemCpyOpt] Check for throwing calls during call slot optimization

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 09:13:44 PDT 2020


nikic created this revision.
nikic added reviewers: efriedma, fhahn.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
nikic requested review of this revision.

When performing call slot optimization for a non-local target, we need to check whether there may be throwing calls between the call and the copy. Otherwise, the copy may never be reached.

This was already done for call slot optimization of load/store, but not for memcpys. For the sake of clarity, I'm moving this check into the common optimization function, even if that does need an additional instruction scan for the load/store case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88799

Files:
  llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  llvm/test/Transforms/MemCpyOpt/callslot.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88799.296052.patch
Type: text/x-patch
Size: 6710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201004/4a6ba2d1/attachment.bin>


More information about the llvm-commits mailing list