[PATCH] D47437: [PowerPC] Fix the incorrect iterator inside peephole

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 28 20:32:02 PDT 2018


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D47437#1113899, @nemanjai wrote:

> I'll let Hal chime in here, but I'd prefer if we just refactor this code to use a range-for instead of this while loop (in all 3 cases).


I would as well, but I don't think that we can here. The range over which we're iterating is being modified as we do it. In any case, if we're going to try to change this, I'd do it in two stages. First, this change (so we know that we're hitting everything). Then look at trying to simplify the iteration structure. This LGTM.


https://reviews.llvm.org/D47437





More information about the llvm-commits mailing list