summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2020-04-26 10:39:30 -0400
committerFangrui Song <maskray@google.com>2020-04-27 17:30:36 -0700
commitaa97472d211df67e91e8c1dd3188a0fb2ff942c8 (patch)
treeefa0b0d810f8019d68f89931e070ac01c91a2509 /llvm/include
parentb11ecd196540d87cb7db190d405056984740d2ce (diff)
downloadbcm5719-llvm-aa97472d211df67e91e8c1dd3188a0fb2ff942c8.tar.gz
bcm5719-llvm-aa97472d211df67e91e8c1dd3188a0fb2ff942c8.zip
Re-land [MC] Fix quadratic behavior in addPendingLabel
This was discovered when compiling large unity/blob/jumbo files. Differential Revision: https://reviews.llvm.org/D78775 (cherry picked from commit fd773e8a51b82775f411061117173a21b500642a)
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/MC/MCObjectStreamer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCObjectStreamer.h b/llvm/include/llvm/MC/MCObjectStreamer.h
index 9e3f87565e2..701cdf30b47 100644
--- a/llvm/include/llvm/MC/MCObjectStreamer.h
+++ b/llvm/include/llvm/MC/MCObjectStreamer.h
@@ -9,6 +9,7 @@
#ifndef LLVM_MC_MCOBJECTSTREAMER_H
#define LLVM_MC_MCOBJECTSTREAMER_H
+#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCSection.h"
@@ -38,7 +39,7 @@ class MCObjectStreamer : public MCStreamer {
bool EmitEHFrame;
bool EmitDebugFrame;
SmallVector<MCSymbol *, 2> PendingLabels;
- SmallVector<MCSection*, 2> PendingLabelSections;
+ SmallSetVector<MCSection *, 4> PendingLabelSections;
unsigned CurSubsectionIdx;
struct PendingMCFixup {
const MCSymbol *Sym;
OpenPOWER on IntegriCloud