[PATCH] D136325: [Assignment Tracking Analysis][3/*] Memory location fragment filling

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 06:33:11 PDT 2022


StephenTozer added inline comments.


================
Comment at: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp:609
+        auto LastOverlap = FragMap.find(EndBit);
+        bool IntersectEnd = LastOverlap.valid() && LastOverlap.start() < EndBit;
+
----------------
StephenTozer wrote:
> Should this be `LastOverlap.stop() > EndBit`? I could have some misunderstandings about how this works, but to my understanding since this is a half-open interval map, if `LastOverlap.start() >= EndBit` then the interval map wouldn't consider it an overlap at all (e.g. `[0, 16)` does not overlap with `[16, 32)`).
Nevermind, I get it now - I was thinking of `LastOverlap` as "the last existing fragment that overlaps with this fragment", but it's just the existing fragment that overlaps with `EndBit` if any exists.


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

https://reviews.llvm.org/D136325



More information about the llvm-commits mailing list