diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-21 01:33:03 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-21 01:33:03 +0000 |
commit | 5435aa464a62f4d82fbe643ade6fdcc40acbd141 (patch) | |
tree | e4b63a1eee625e6606856387309007a191e6337c /llvm/lib/MC/MCAssembler.cpp | |
parent | e520293c8b45ceddee022af2cec0a16724d1c526 (diff) | |
download | bcm5719-llvm-5435aa464a62f4d82fbe643ade6fdcc40acbd141.tar.gz bcm5719-llvm-5435aa464a62f4d82fbe643ade6fdcc40acbd141.zip |
MC: Simplify MCSymbolData initialization and remove MCSymbol pointer
Finally remove the `MCSymbolData::Symbol` pointer. It was still being
used to track whether `MCSymbolData` had been initialized, but this is
better tracked by the bitfield in `MCSymbol`.
The only caller of `MCSymbolData::initialize()` was `MCAssembler`, which
(other than `Symbol`) passed in all-0 values. Replace all that
indirection with a default constructor.
The main point is a cleanup (and there's more cleanup to do), but there
are also some small memory savings. I measured ~989 MB down to ~975 MB,
cutting a little over 1% off the top of `llc`.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 237873
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index c8ed7d1b1f6..8f9320af2b1 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -352,23 +352,6 @@ void MCSectionData::setBundleLockState(BundleLockStateType NewState) { /* *** */ -MCSymbolData::MCSymbolData() : Symbol(nullptr) {} - -void MCSymbolData::initialize(const MCSymbol &Symbol, MCFragment *Fragment, - uint64_t Offset) { - assert(!isInitialized() && "Expected uninitialized symbol"); - - this->Symbol = &Symbol; - this->Fragment.setPointer(Fragment); - this->Offset = Offset; - this->SymbolSize = nullptr; - this->CommonAlign = -1U; - this->Flags = 0; - this->Index = 0; -} - -/* *** */ - MCAssembler::MCAssembler(MCContext &Context_, MCAsmBackend &Backend_, MCCodeEmitter &Emitter_, MCObjectWriter &Writer_, raw_ostream &OS_) |