[PATCH] D111768: [IPT] Restructure cache to allow lazy update following invalidation [NFC]
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 11:36:01 PDT 2021
nikic added a comment.
Not seeing any practical impact from this, but the change generally looks reasonable to me.
================
Comment at: llvm/lib/Analysis/InstructionPrecedenceTracking.cpp:52
+ // Seed the lazy scan
+ FirstSpecialInsts[BB] = &*BB->begin();
+
----------------
To avoid doing the BB lookup three times, use something like this?
```
auto It = FirstSpecialInsts.try_emplace(BB, &BB->front()).first;
Instruction *CurI = It->second;
// ...
It->second = Res;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111768/new/
https://reviews.llvm.org/D111768
More information about the llvm-commits
mailing list