[PATCH] D57931: [GISel]: While constructing the GISelWorklist make sure we reserve at least the required size to the underlying dense map.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 17:01:16 PST 2019
arsenm added inline comments.
================
Comment at: include/llvm/CodeGen/GlobalISel/GISelWorkList.h:32
class GISelWorkList {
SmallVector<MachineInstr *, N> Worklist;
DenseMap<MachineInstr *, unsigned> WorklistMap;
----------------
aditya_nandakumar wrote:
> arsenm wrote:
> > If this matters, should this even be a SmallVector?
> Could you elaborate? Are you implying we replace this with something else (std::vector) or implying that the template parameter is probably not needed and we can always runtime reserve the size once..
Yes, if this is is big, there's no reason for the reserved small size so std::vector
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57931/new/
https://reviews.llvm.org/D57931
More information about the llvm-commits
mailing list