[PATCH] D78775: [MC] Fix quadratic behavior in addPendingLabel

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 25 20:10:53 PDT 2020


skan accepted this revision.
skan added a comment.

LGTM (with one comment)



================
Comment at: llvm/include/llvm/MC/MCObjectStreamer.h:42
   SmallVector<MCSymbol *, 2> PendingLabels;
-  SmallVector<MCSection*, 2> PendingLabelSections;
+  SmallSetVector<MCSection *, 4> PendingLabelSections;
   unsigned CurSubsectionIdx;
----------------
Update this in description. 

> The proposed fix simply replaces the SmallVector by a (Small)DenseSet SmallPtrSet.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78775





More information about the llvm-commits mailing list