[PATCH] D118674: [nfc][mlgo][regalloc] Cache live interval feature components
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 2 18:56:27 PST 2022
MatzeB added inline comments.
================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:252-255
+ void calculateSpillWeightAndHint(LiveInterval &LI) override {
+ VirtRegAuxInfo::calculateSpillWeightAndHint(LI);
+ CachedFeatures.erase(LI.reg().id());
+ }
----------------
Isn't this only ever computed once per live interval? I don't see any code computing this a 2nd time making it necessary to invalidate a cache...
The only user of this function is `VirtRegAuxInfo::calculateSpillWeightsAndHints` computing the initial spill weights when initializing the regalloc; and `LiveRangeEdit::calculateRegClassAndHint` which calls this function only for the newly created live intervals.
Why would you need to invalidate a cache then?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118674/new/
https://reviews.llvm.org/D118674
More information about the llvm-commits
mailing list