[llvm] r353498 - [GISel]: While constructing the GISelWorklist make sure we reserve at least the required size to the underlying dense map.
Aditya Nandakumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 19:32:47 PST 2019
Author: aditya_nandakumar
Date: Thu Feb 7 19:32:46 2019
New Revision: 353498
URL: http://llvm.org/viewvc/llvm-project?rev=353498&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelWorkList.h?rev=353498&r1=353497&r2=353498&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelWorkList.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/GISelWorkList.h Thu Feb 7 19:32:46 2019
@@ -33,7 +33,7 @@ class GISelWorkList {
DenseMap<MachineInstr *, unsigned> WorklistMap;
public:
- GISelWorkList() {}
+ GISelWorkList() : WorklistMap(N) {}
bool empty() const { return WorklistMap.empty(); }
More information about the llvm-commits
mailing list