[PATCH] D125776: [llvm-dva] 01 - Interval tree
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 02:28:25 PDT 2022
CarlosAlbertoEnciso added inline comments.
================
Comment at: llvm/include/llvm/ADT/IntervalTree.h:208
+ IntervalData(PointType Left, PointType Right, ValueType Value)
+ : Left(Left), Right(Right), Value(Value) {}
+ virtual ~IntervalData() = default;
----------------
psamolysov wrote:
>
Addressed by enforcing the allowed types (fundamental/pointer) when creating the IntervalTree.
================
Comment at: llvm/include/llvm/ADT/IntervalTree.h:261
+ IntervalNode(PointType Point, unsigned Start)
+ : MiddlePoint(Point), BucketIntervalsStart(Start) {}
+
----------------
psamolysov wrote:
> We have no idea what the type will be used for the `PointType`, theoretically it can be heavy, so `move` could make sense.
Addressed by enforcing the allowed types (fundamental/pointer) when creating the IntervalTree.
================
Comment at: llvm/include/llvm/ADT/IntervalTree.h:521
+ : AscendingBuckets(Left), DescendingBuckets(Right), Node(Node),
+ Point(Point), Index(0) {
+ initNode();
----------------
psamolysov wrote:
>
Addressed by enforcing the allowed types (fundamental/pointer) when creating the IntervalTree.
================
Comment at: llvm/include/llvm/ADT/IntervalTree.h:657
+ ? find_end()
+ : find_iterator(&IntervalsLeft, &IntervalsRight, Root, Point);
+ }
----------------
psamolysov wrote:
>
Addressed by enforcing the allowed types (fundamental/pointer) when creating the IntervalTree.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125776/new/
https://reviews.llvm.org/D125776
More information about the llvm-commits
mailing list