[PATCH] D81540: [MemCpyOptimizer] Simplify API of processStore and processMem* functions

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 01:36:09 PDT 2020


foad created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
foad added reviewers: serge-sans-paille, nikic.

Previously these functions either returned a "changed" flag or a "repeat
instruction" flag, and could also modify an iterator to control which
instruction would be processed next.

Simplify this by always returning a "changed" flag, and handling all of
the "repeat instruction" functionality by modifying the iterator.

No functional change intended except in this case:
// If the source and destination of the memcpy are the same, then zap it.
... where the previous code failed to process the instruction after the
zapped memcpy.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81540

Files:
  llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81540.269756.patch
Type: text/x-patch
Size: 14701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200610/cfd5a973/attachment.bin>


More information about the llvm-commits mailing list