[PATCH] D80847: [NFC, StackSafety] Change type of internal container

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 18:02:37 PDT 2020


vitalybuka marked an inline comment as done.
vitalybuka added inline comments.


================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:143
 struct FunctionInfo {
-  SmallVector<UseInfo, 4> Allocas;
+  std::map<const AllocaInst *, UseInfo> Allocas;
   SmallVector<UseInfo, 4> Params;
----------------
eugenis wrote:
> Why not DenseMap, do you expect this to use less memory at very small sizes?
> 
DenseMap is good for small vales, key, here values are quite fat.
Also allocates container are iterated 1-2 times  so they are not critical for performance.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80847/new/

https://reviews.llvm.org/D80847





More information about the llvm-commits mailing list