[PATCH] D81229: Correctly report modified status for MemCpyOptimizer

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 07:06:11 PDT 2020


serge-sans-paille added a comment.

In D81229#2082217 <https://reviews.llvm.org/D81229#2082217>, @foad wrote:

> Sorry for the late review, but I think the code is getting really confusing now: processMemCpy returns a "repeat instruction" flag, but sometimes returns true, but also increments BI so that the instruction is not repeated at al???
>
> How about changing all of processMemSet/Cpy/Move so that they return a simple "changed" flag, and set BI to the next instruction to be processed (i.e. either the current instruction if we want to repeat it, otherwise the next instruction).


Well, I landed the patch... The extra iterator is also passed for other `processMem*` functions, in order to adjust current iterator, so I used it in `processMemCpy`. I agree it's non-ideal, but at least it's consistent ;-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81229





More information about the llvm-commits mailing list