From c8b5bafa375ae393776d9fc3f874afd6851b83e1 Mon Sep 17 00:00:00 2001 From: Aditya Nandakumar Date: Fri, 8 Feb 2019 03:32:46 +0000 Subject: [PATCH] [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 --- include/llvm/CodeGen/GlobalISel/GISelWorkList.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/CodeGen/GlobalISel/GISelWorkList.h b/include/llvm/CodeGen/GlobalISel/GISelWorkList.h index 227b0a2486e..626a66620fa 100644 --- a/include/llvm/CodeGen/GlobalISel/GISelWorkList.h +++ b/include/llvm/CodeGen/GlobalISel/GISelWorkList.h @@ -33,7 +33,7 @@ class GISelWorkList { DenseMap WorklistMap; public: - GISelWorkList() {} + GISelWorkList() : WorklistMap(N) {} bool empty() const { return WorklistMap.empty(); } -- 2.50.1