summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAditya Nandakumar <aditya_nandakumar@apple.com>2019-02-08 03:32:46 +0000
committerAditya Nandakumar <aditya_nandakumar@apple.com>2019-02-08 03:32:46 +0000
commitc7716756881e9650765c8c285dfef27f7affdb36 (patch)
tree2f268fa3131922af9ecf51ba9e8d2909a79af984 /llvm/include
parenta8b4339c2f3992f94d25c61a4841c7bedff17964 (diff)
downloadbcm5719-llvm-c7716756881e9650765c8c285dfef27f7affdb36.tar.gz
bcm5719-llvm-c7716756881e9650765c8c285dfef27f7affdb36.zip
[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
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
index 227b0a2486e..626a66620fa 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GISelWorkList.h
@@ -33,7 +33,7 @@ class GISelWorkList {
DenseMap<MachineInstr *, unsigned> WorklistMap;
public:
- GISelWorkList() {}
+ GISelWorkList() : WorklistMap(N) {}
bool empty() const { return WorklistMap.empty(); }
OpenPOWER on IntegriCloud