[Lldb-commits] [lldb] [lldb] Keep L1 memory cache chunks disjoint (PR #208347)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 9 03:14:17 PDT 2026
felipepiovezan wrote:
My main concern with this is that it can lead to quadratic complexity under certain insertion patterns, and that it is making the L1 cache much more complicated. We probably need to use some better data structures to keep track of overlapping ranges and allow fast invalidation of all ranges mutated by a given write.
A side note about the commenting style: if we were to keep this patch, I wanted to highlight that we are adding a new invariant to the L1 cache ("ranges are non overlapping"), and there are _many_ comments in the PR repeating this and using it to justify algorithmic decisions. IMO we would be better off having a single line in the header file stating that "the L1 consists of non-overlapping segments", and virtually no comments inside the functions themselves.
All that said, I still believe the better way to attack this problem is to keep the L1 cache simple, and just find a faster way to invalidate multiple ranges.
https://github.com/llvm/llvm-project/pull/208347
More information about the lldb-commits
mailing list