summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge redundant loops. NFC.Rafael Espindola2015-05-281-18/+11
| | | | llvm-svn: 238471
* Simplify LastLocalSymbolIndex computation. NFC.Rafael Espindola2015-05-281-4/+2
| | | | llvm-svn: 238465
* Use range loops. NFC.Rafael Espindola2015-05-281-7/+3
| | | | llvm-svn: 238463
* Remove temporary FileSymbolData. NFC.Rafael Espindola2015-05-281-12/+8
| | | | llvm-svn: 238461
* [llvm] Parameterizing the output stream for dumpbytes and outputting ↵Colin LeMahieu2015-05-281-0/+9
| | | | | | directly to stream. llvm-svn: 238453
* Use range loops for accessing file names. NFC.Rafael Espindola2015-05-282-10/+9
| | | | llvm-svn: 238446
* Merge computeSymbolTable and writeSymbolTable.Rafael Espindola2015-05-281-94/+80
| | | | | | | For now this just saves a few loops, but it will allow more simplifications in the future. llvm-svn: 238444
* Don't create an unused _GLOBAL_OFFSET_TABLE_.Rafael Espindola2015-05-281-43/+1
| | | | | | | | This was a bug for bug compatibility with gas that is completely unnecessary. If a _GLOBAL_OFFSET_TABLE_ symbol is used, it will already be created by the time we get to the ELF writer. llvm-svn: 238432
* [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.Daniel Sanders2015-05-281-3/+10
| | | | | | | | | | | | | | | | | | Summary: Following on from r209907 which made personality encodings indirect, do the same for TType encodings. This fixes the case where a try/catch block needs to generate references to, for example, std::exception in the .gcc_except_table. Reviewers: petarj Reviewed By: petarj Subscribers: srhines, joerg, tberghammer, llvm-commits Differential Revision: http://reviews.llvm.org/D9669 llvm-svn: 238427
* [MC] Replace custom string join function with the one from StringExtras.Benjamin Kramer2015-05-281-22/+2
| | | | | | NFC. llvm-svn: 238414
* Don't call utostr in Twine/raw_ostream contexts.Benjamin Kramer2015-05-281-3/+2
| | | | | | Creating temporary std::strings there is unnecessary. llvm-svn: 238412
* Rename and move getCurrentSectionData.Rafael Espindola2015-05-273-12/+12
| | | | | | I think this concludes the merge of MCSectionData and MCSection. llvm-svn: 238358
* There is only one current section.Rafael Espindola2015-05-277-22/+30
| | | | | | | | | | | | | | | | | Both MCStreamer and MCObjectStreamer were maintaining a current section variable and they were slightly out of sync. I don't think this was observable, but was inefficient and error prone. Changing this requires a few cascading changes: * SwitchSection has to call ChangeSection earlier for ChangeSection to see the old section. * With that change, ChangeSection cannot call EmitLabel, since during ChangeSection we are still in the old section. * When the object streamer requires a begin label, just reused the existing generic support for begin labels instead of calling EmitLabel directly. llvm-svn: 238357
* Fix NDEBUG build.Rafael Espindola2015-05-271-0/+2
| | | | llvm-svn: 238332
* Delete MCSectionData.Rafael Espindola2015-05-275-54/+37
| | | | llvm-svn: 238331
* Delete dead code. NFC.Rafael Espindola2015-05-271-4/+0
| | | | llvm-svn: 238330
* Stop using MCSectionData in WinCOFFObjectWriter.cpp.Rafael Espindola2015-05-271-15/+8
| | | | llvm-svn: 238329
* clang-format WinCOFFObjectWriter.cpp. NFC.Rafael Espindola2015-05-271-82/+102
| | | | llvm-svn: 238328
* Remove uses of MCSectionData from MachObjectWriter.cpp.Rafael Espindola2015-05-271-6/+4
| | | | llvm-svn: 238327
* Move getSubsectionInsertionPoint to MCSection.Rafael Espindola2015-05-273-33/+33
| | | | llvm-svn: 238320
* Remove uses of MCSectionData from ELFObjectWriter. NFC.Rafael Espindola2015-05-271-9/+7
| | | | llvm-svn: 238317
* Use operator<< instead of print in a few more places.Rafael Espindola2015-05-273-6/+4
| | | | llvm-svn: 238315
* We always have an InstPrinter.Rafael Espindola2015-05-271-8/+6
| | | | llvm-svn: 238311
* Revert r238190 and r238197: [mips] Make TTypeEncoding indirect to allow ↵Daniel Sanders2015-05-271-14/+3
| | | | | | | | | | .eh_frame to be read-only. This broke the llvm-mips-linux builder and several of our out-of-tree builders. Initial investigations show that the commit probably isn't the problem but reverting anyway while I investigate. llvm-svn: 238302
* MCSymbol: Make print() robust against empty namesMatthias Braun2015-05-271-0/+4
| | | | | | | This shouldn't happen, but it's nice not to abort when printing broken machine functions. llvm-svn: 238287
* Replace getOrCreateSectionData with registerSection.Rafael Espindola2015-05-264-13/+10
| | | | | | There is now no SectionData to be created. llvm-svn: 238208
* Have getCurrentSectionData return a MCSection.Rafael Espindola2015-05-263-21/+16
| | | | | | I will fix the name shortly. llvm-svn: 238204
* Pass a MCSection to getCurrentSectionData.Rafael Espindola2015-05-261-9/+11
| | | | | | A step towards merging MCSection and MCSectionData. llvm-svn: 238203
* Use std::bitset for SubtargetFeatures.Michael Kuperstein2015-05-263-14/+20
| | | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first several times this was committed (e.g. r229831, r233055), it caused several buildbot failures. Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables. This should now be fixed. llvm-svn: 238192
* [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.Daniel Sanders2015-05-261-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Following on from r209907 which made personality encodings indirect, do the same for TType encodings. This fixes the case where a try/catch block needs to generate references to, for example, std::exception in the .gcc_except_table. This commit uses DW_EH_PE_sdata8 for N64 as far as is possible at the moment. However, it is possible to end up with DW_EH_PE_sdata4 when a TargetMachine is not available. There's no risk of issues with inconsistency here since the tables are self describing but it does mean there is a small chance of the PC-relative offset being out of range for particularly large programs. Reviewers: petarj Reviewed By: petarj Subscribers: srhines, joerg, tberghammer, llvm-commits Differential Revision: http://reviews.llvm.org/D9669 llvm-svn: 238190
* Remove most uses of MCSectionData from MCAssembler.Rafael Espindola2015-05-266-32/+26
| | | | llvm-svn: 238172
* Stop using MCSectionData in MCAsmLayout.h.Rafael Espindola2015-05-265-48/+45
| | | | llvm-svn: 238170
* Move MCSection destruction to MCContext::reset.Rafael Espindola2015-05-261-8/+8
| | | | | | | | Fixes the leaks when running llc. Also found by an asan bot. llvm-svn: 238167
* Stop using MCSectionData in MCMachObjectWriter.h.Rafael Espindola2015-05-261-19/+19
| | | | llvm-svn: 238165
* Stop using MCSectionData in MCExpr.h.Rafael Espindola2015-05-262-11/+10
| | | | llvm-svn: 238163
* Return a MCSection from MCFragment::getParent().Rafael Espindola2015-05-266-23/+21
| | | | | | Another step in merging MCSectionData and MCSection. llvm-svn: 238162
* Call the destructors of the MCSections.Rafael Espindola2015-05-261-0/+8
| | | | | | | | | They now contain the fragments. If we don't call the destructors the fragments leak. Found by an asan bot. llvm-svn: 238161
* Store a MCSection in MCFragment.Rafael Espindola2015-05-255-11/+13
| | | | | | Part of the work to merge MCSectionData into MCSection. llvm-svn: 238160
* Turn MCSectionData into a field of MCSection.Rafael Espindola2015-05-255-27/+40
| | | | | | | This also changes MCAssembler to store a vector of MCSections instead of an iplist of MCSectionData. llvm-svn: 238159
* Move MCSectionData to MCSection.h.Rafael Espindola2015-05-251-0/+17
| | | | | | Another step in merging MCSectionData and MCSection. llvm-svn: 238158
* Make a few MCSectionELF& variables const. NFC.Rafael Espindola2015-05-251-8/+9
| | | | | | This just reduces the noise from another patch. llvm-svn: 238156
* Insert MCSectionData into the section list directly in getOrCreateSectionData.Rafael Espindola2015-05-251-5/+1
| | | | | | | Removing the logic from the constructor will make it easier to merge MCSectionData and MCSection. llvm-svn: 238155
* Move HasInstructions to MCSection.Rafael Espindola2015-05-254-8/+15
| | | | llvm-svn: 238150
* Move bundle info from MCSectionData to MCSection.Rafael Espindola2015-05-254-34/+34
| | | | llvm-svn: 238143
* Add a isBundleLocked helper to MCELFStreamer.Rafael Espindola2015-05-251-14/+17
| | | | llvm-svn: 238142
* Move LayoutOrder to MCSection.Rafael Espindola2015-05-252-2/+2
| | | | llvm-svn: 238141
* Stop forwarding getOrdinal and setOrdinal.Rafael Espindola2015-05-251-4/+1
| | | | llvm-svn: 238139
* Move Ordinal from MCSectionData to MCSection. NFC.Rafael Espindola2015-05-251-3/+6
| | | | | | Part of the work to merge MCSectionData and MCSection. llvm-svn: 238137
* Produce a single string table in a ELF .oRafael Espindola2015-05-221-43/+39
| | | | | | | | | | | | | | | | | | | | Normally an ELF .o has two string tables, one for symbols, one for section names. With the scheme of naming sections like ".text.foo" where foo is a symbol, there is a big potential saving in using a single one. Building llvm+clang+lld with master and with this patch the results were: master: 193,267,008 bytes patch: 186,107,952 bytes master non unique section names: 183,260,192 bytes patch non unique section names: 183,118,632 bytes So using non usique saves 10,006,816 bytes, and the patch saves 7,159,056 while still using distinct names for the sections. llvm-svn: 238073
* MC: Shave a pointer off of MCSymbol::NameDuncan P. N. Exon Smith2015-05-221-4/+3
| | | | | | | | | | | | | Shave a pointer off of `MCSymbolName` by storing `StringMapEntry<bool>*` instead of `StringRef`. This brings `sizeof(MCSymbol)` down to 64 on 64-bit platforms, a nice round number. My profile showed memory dropping from 914 MB down to 908 MB, roughly 0.7%. Other than memory usage, no functionality change here. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238005
OpenPOWER on IntegriCloud