[PATCH] D92309: [LegacyPM] Update InversedLastUser on the fly. NFC.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 06:10:04 PST 2020


foad added a comment.

In D92309#2422720 <https://reviews.llvm.org/D92309#2422720>, @serge-sans-paille wrote:

> As the state of `LastUser` are closely tied, it would make sense to encapsulate the two members in a class that would maintain the consistency of these two states, so that the two new operations `recordNewUser(Pass, User)` and `updatelastUser(Pass, User)` become explicit ?

I think the best way to do that would be using a generic bidirectional map like https://theboostcpplibraries.com/boost.bimap. But there is no bimap in include/llvm/ADT/ yet and I'm not sure my C++ is good enough to write it myself.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92309



More information about the llvm-commits mailing list