commit | c8b5bafa375ae393776d9fc3f874afd6851b83e1 | [log] [tgz] |
---|---|---|
author | Aditya Nandakumar <aditya_nandakumar@apple.com> | Fri Feb 08 03:32:46 2019 +0000 |
committer | Aditya Nandakumar <aditya_nandakumar@apple.com> | Fri Feb 08 03:32:46 2019 +0000 |
tree | dec56ad7a94627d2291f3b0ac8a51e2fa1d9d58f | |
parent | e6576d59f133bb5c9f705499fa67d4420ef937b0 [diff] |
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353498 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/CodeGen/GlobalISel/GISelWorkList.h b/include/llvm/CodeGen/GlobalISel/GISelWorkList.h index 227b0a2..626a666 100644 --- a/include/llvm/CodeGen/GlobalISel/GISelWorkList.h +++ b/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
@@ -33,7 +33,7 @@ DenseMap<MachineInstr *, unsigned> WorklistMap; public: - GISelWorkList() {} + GISelWorkList() : WorklistMap(N) {} bool empty() const { return WorklistMap.empty(); }