[PATCH] D88256: [NFC][regalloc] Separate iteration from AllocationOrder

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 16:13:38 PDT 2020


mtrofin added a comment.

In D88256#2295887 <https://reviews.llvm.org/D88256#2295887>, @qcolombet wrote:

> Hi,
>
> I like that we take the iterator path, but I don't think the current patch is clearer than the previous implementation.
>
> First we duplicate some logic from `AllocationOrder` to `AllocationOrder::Iterator` (see my inline comment), second, I found the `AllocationOrder::getIterator` not iterator friendly.
> What I mean here is that I would have expected a `AllocationOrder::begin` and  `AllocationOrder::end`, so that we can use range based loop and so on.
>
> As is I don't really see the value of that refactoring.
>
> Cheers,
> -Quentin

SGTM - I'll send first another patch with unittests for the current behavior; then refresh this one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88256



More information about the llvm-commits mailing list