[GISel]: While constructing the GISelWorklist make sure we reserve at least the required size to the underlying dense map.

https://reviews.llvm.org/D57931

This should save some unnecessary growing of the DenseMap.

llvm-svn: 353498
This commit is contained in:
Aditya Nandakumar 2019-02-08 03:32:46 +00:00
parent a8b4339c2f
commit c771675688
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class GISelWorkList {
DenseMap<MachineInstr *, unsigned> WorklistMap; DenseMap<MachineInstr *, unsigned> WorklistMap;
public: public:
GISelWorkList() {} GISelWorkList() : WorklistMap(N) {}
bool empty() const { return WorklistMap.empty(); } bool empty() const { return WorklistMap.empty(); }