The vast majority of LiveRanges (ie, 4/5) have exactly 1 segment and 1
value number, and a good chunk of the rest have 2 of each, so
allocating space for 4 is wasteful. This is especially noticeable when
dealing with a very large number of vregs, and I have an internal case
where dropping this to 2 shaves over 5% off of peak memory when
compiling a particularly large function.
llvm-svn: 262681
void dump() const;
};
- typedef SmallVector<Segment,4> Segments;
- typedef SmallVector<VNInfo*,4> VNInfoList;
+ typedef SmallVector<Segment, 2> Segments;
+ typedef SmallVector<VNInfo *, 2> VNInfoList;
Segments segments; // the liveness segments
VNInfoList valnos; // value#'s