]> granicus.if.org Git - llvm/commitdiff
[GISel]: While constructing the GISelWorklist make sure we reserve at least the requi...
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Fri, 8 Feb 2019 03:32:46 +0000 (03:32 +0000)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Fri, 8 Feb 2019 03:32:46 +0000 (03:32 +0000)
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

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