summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* [WinEH] Store pointers to the LSDA in the exception registration objectReid Kleckner2015-05-201-0/+5
| | | | | | | We aren't yet emitting the LSDA yet, so this will still fail to assemble. llvm-svn: 237852
* MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFCDuncan P. N. Exon Smith2015-05-201-4/+4
| | | | | | | Remove most remaining calls to `MCSymbolData::getSymbol()`, instead using the already available `MCSymbol` directly. llvm-svn: 237829
* MC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFCDuncan P. N. Exon Smith2015-05-201-26/+23
| | | | | | Move APIs over from `MCSymbolData` to `MCSymbol`. llvm-svn: 237826
* Use a SmallString buffer instead of a std::string for debug info path ↵Pete Cooper2015-05-201-1/+3
| | | | | | | | | | | | lookup. NFC. This code appends the filename to the directory then looks that up in a StringMap. We should be using the existing Twine::toStringRef method instead of Twine::str() as most times we'll succeed in the lookup. Its possible that we should also consider allowing StringMap to lookup a key using a Twine in addition to a StringRef but that would complicate the code with little known benefit above and beyond this change. This saves 170k temporary allocations when running llc on the verify_use_list_order bitcode with debug info for x86. llvm-svn: 237823
* MC: Use MCSymbol in LocalCommon, NFCDuncan P. N. Exon Smith2015-05-201-4/+3
| | | | | | Switch from MCSymbolData to MCSymbol in LocalCommon. llvm-svn: 237816
* MC: Add MCSymbolData back to MCAssembler dumpDuncan P. N. Exon Smith2015-05-201-1/+5
| | | | | | | | | r237490 accidentally dropped MCSymbolData from the MCAssembler dump. Add it back underneath the MCSymbol dump. Remove the MCSymbol dump from MCSymbolData, since this would cause an infinite co-recursion, and besides, that back pointer is going away. llvm-svn: 237807
* MC: Update MCAssembler to use MCSymbol, NFCDuncan P. N. Exon Smith2015-05-201-15/+12
| | | | | | Use `MCSymbol` over `MCSymbolData` where both are needed. llvm-svn: 237803
* MC: Use MCSymbol in MachObjectWriter, NFCDuncan P. N. Exon Smith2015-05-201-16/+14
| | | | | | | Replace uses of `MCSymbolData` with `MCSymbol` where both are needed, so we can remove the backpointer. llvm-svn: 237799
* MC: Use MCSymbol in MCObjectWriter::isWeak(), NFCDuncan P. N. Exon Smith2015-05-204-9/+8
| | | | | | Continue to prefer `MCSymbol` when we need both. llvm-svn: 237798
* MC: Use MCSymbol in most of ELFObjectWriter, NFCDuncan P. N. Exon Smith2015-05-201-36/+36
| | | | | | Stop using MCSymbolData where we also need MCSymbol. llvm-svn: 237770
* MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFCDuncan P. N. Exon Smith2015-05-202-18/+10
| | | | | | | Pass through an `MCSymbol` instead of an `MCSymbolData` so we can get rid of the back pointer. llvm-svn: 237750
* MC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFCDuncan P. N. Exon Smith2015-05-195-23/+19
| | | | | | | Continue to canonicalize on MCSymbol instead of MCSymbolData when both are needed. llvm-svn: 237749
* MC: clang-format MCContext. NFC.Jim Grosbach2015-05-181-8/+9
| | | | llvm-svn: 237595
* MC: Clean up method names in MCContext.Jim Grosbach2015-05-1818-102/+102
| | | | | | | The naming was a mish-mash of old and new style. Update to be consistent with the new. NFC. llvm-svn: 237594
* MC: Use MCSymbol in RelAndSymbol, NFCDuncan P. N. Exon Smith2015-05-161-1/+1
| | | | | | Switch from `MCSymbolData` to `MCSymbol`. llvm-svn: 237502
* MC: Use MCSymbol in MCObject::IsSymbolRefDifferenceFullyResolvedImpl()Duncan P. N. Exon Smith2015-05-165-21/+20
| | | | | | | | Transition one API from `MCSymbolData` to `MCSymbol`. The function needs both, and the backpointer from `MCSymbolData` to `MCSymbol` is going away. llvm-svn: 237498
* MC: Change MCFragment::Atom to an MCSymbol, NFCDuncan P. N. Exon Smith2015-05-163-10/+5
| | | | | | | Change `MCFragment::Atom` from an `MCSymbolData` to an `MCSymbol`, moving in the direction of removing the back-pointer. llvm-svn: 237497
* MC: Change MCAssembler::Symbols to store MCSymbol, NFCDuncan P. N. Exon Smith2015-05-164-16/+15
| | | | | | | | Instead of storing a list of the `MCSymbolData` in use, store the `MCSymbol`s. Churning in the direction of removing the back pointer from `MCSymbolData`. llvm-svn: 237496
* MC: Merge MCSymbol and MCSymbolDataDuncan P. N. Exon Smith2015-05-161-5/+12
| | | | | | | | | | | | | | | | Turn `MCSymbolData` into a field inside of `MCSymbol`. Keep all the old API alive for now, so that consumers can be updated in a later commit. This means we still temporarily need the back pointer from `MCSymbolData` to `MCSymbol`, but I'll remove it in a follow-up. This optimizes for object emission over assembly emission. By removing the `DenseMap` in `MCAssembler`, llc memory usage drops from around 1040 MB to 1001 MB (3.8%). (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 237490
* MC: Reduce MCAssembler::Symbols API exposure, NFCDuncan P. N. Exon Smith2015-05-151-5/+2
| | | | | | | | | Stop exposing the storage for `MCAssembler::Symbols`, and have `MCAssembler` add symbols directly to its list instead of using a hook in `MCSymbolData`. This opens up room for a follow-up commit to switch from a linked list to a vector. llvm-svn: 237486
* Remove MCAssembler.h include from MCStreamer.h and fix users of MCStreamer.hPete Cooper2015-05-151-0/+1
| | | | llvm-svn: 237483
* Remove 3 includes from MCInstrDesc.h and explicitly include them where neededPete Cooper2015-05-151-0/+2
| | | | llvm-svn: 237481
* Move some methods to a new MCInstrDesc.cpp file to allow includes to be ↵Pete Cooper2015-05-152-0/+69
| | | | | | | | | | trimmed. NFC. MCInstrDesc.h includes things like MCInst.h which i can now remove after this. That will be a future commit. Reviewed by Jim Grosbach. llvm-svn: 237478
* MC: MCCodeGenInfo naming update. NFC.Jim Grosbach2015-05-151-1/+1
| | | | | | s/InitMCCodeGenInfo/initMCCodeGenInfo/ llvm-svn: 237471
* MC: Update MCCodeEmitter naming. NFC.Jim Grosbach2015-05-156-6/+6
| | | | | | s/EncodeInstruction/encodeInstruction/ llvm-svn: 237469
* MC: Update MCFixup naming. NFC.Jim Grosbach2015-05-152-5/+5
| | | | | | s/MCFixup::Create/MCFixup::create/ llvm-svn: 237468
* MC: Avoid some UB caused by left shifting a negative value. NFCJustin Bogner2015-05-141-1/+1
| | | | llvm-svn: 237408
* Don't omit the constant when computing a cross-section relative relocation.Andy Ayers2015-05-141-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D9692 llvm-svn: 237327
* MC: Modernize MCOperand API naming. NFC.Jim Grosbach2015-05-131-1/+1
| | | | | | MCOperand::Create*() methods renamed to MCOperand::create*(). llvm-svn: 237275
* Update ELFObjectWriter::reset() following r236255.Yaron Keren2015-05-131-0/+2
| | | | llvm-svn: 237261
* Reverting r237234, "Use std::bitset for SubtargetFeatures"Michael Kuperstein2015-05-132-19/+13
| | | | | | | The buildbots are still not satisfied. MIPS and ARM are failing (even though at least MIPS was expected to pass). llvm-svn: 237245
* Use std::bitset for SubtargetFeaturesMichael Kuperstein2015-05-132-13/+19
| | | | | | | | | | | 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 two times this was committed (r229831, r233055), it caused several buildbot failures. At least some of the ARM and MIPS ones were due to gcc/binutils issues, and should now be fixed. llvm-svn: 237234
* [DWARF] Add CIE header fields address_size and segment_size when generating ↵Keith Walker2015-05-121-0/+8
| | | | | | | | | | | | | dwarf-4 The DWARF-4 specification added 2 new fields in the CIE header called address_size and segment_size. Create these 2 new fields when generating dwarf-4 CIE entries, print out the new fields when dumping the CIE and update tests Differential Revision: http://reviews.llvm.org/D9558 llvm-svn: 237145
* MC: Skip names of temporary symbols in object streamerDuncan P. N. Exon Smith2015-05-061-0/+3
| | | | | | | | | | | | | | Don't create names for temporary symbols when using an object streamer. The names never make it to the output anyway. From the starting point of r236629, my heap profile says this drops peak memory usage from 1100 MB to 1058 MB for CodeGen of `verify-uselistorder`, a savings of almost 4% on peak memory, and removes `StringMap<bool, BumpPtrAllocator...>` from the profile entirely. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 236642
* Respect object format choice on DarwinKeno Fischer2015-05-041-1/+1
| | | | | | | | | | | | | | | Summary: The object format can be set to something other than MachO, e.g. to use ELF-on-Darwin for MCJIT. This already works on Windows, so there's no reason it shouldn't on Darwin. Reviewers: lhames, grosbach Subscribers: rafael, grosbach, t.p.northover, llvm-commits Differential Revision: http://reviews.llvm.org/D6185 llvm-svn: 236455
* [Hexagon] Adding expression MC emission and removing XFAIL from test that ↵Colin LeMahieu2015-05-011-0/+12
| | | | | | hits this code path. llvm-svn: 236348
* Remove unnecessary break.Rafael Espindola2015-04-301-1/+0
| | | | llvm-svn: 236275
* Simplify the creation of compressed debug sections.Rafael Espindola2015-04-301-106/+33
| | | | | | | | | | This is actually fairly simple in the current code layout: Check if we should compress just before writing out and everything else just works. This removes the last case in which the object writer was creating a fragment. llvm-svn: 236267
* Replace unreachable code with llvm_unreachable.Rafael Espindola2015-04-301-1/+1
| | | | llvm-svn: 236261
* Don't create a MCSectionData when we don't have to.Rafael Espindola2015-04-301-11/+7
| | | | llvm-svn: 236260
* Avoid an extra loop over the sections.Rafael Espindola2015-04-301-7/+1
| | | | | | Add string to the section header string table as we add sections. llvm-svn: 236257
* Make the section table a member of ELFObjectWriter.Rafael Espindola2015-04-301-52/+43
| | | | | | | This avoids passing it around and lets us build a small helper to add a section to the table. llvm-svn: 236255
* Nothing inherits from this, drop the protected:Rafael Espindola2015-04-301-2/+0
| | | | llvm-svn: 236253
* Write sections mostly in one pass.Rafael Espindola2015-04-301-143/+93
| | | | | | | | | | | During ELF writing, there is no need to further relax the sections, so we should not be creating fragments. This patch avoids doing so in all cases but debug section compression (that is next). Also, the ELF format is fairly simple to write. We can do a single pass over the sections to write them out and compute the section header table. llvm-svn: 236235
* Silencing an "enumeral and non-enumeral type in conditional expression" ↵Aaron Ballman2015-04-301-1/+1
| | | | | | warning; NFC. llvm-svn: 236234
* Store relocations in a map from MCSectionELF.Rafael Espindola2015-04-301-25/+21
| | | | | | Saves finding the MCSectionData just to do a map lookup. llvm-svn: 236189
* Write relocations directly to the output stream. NFC.Rafael Espindola2015-04-301-46/+29
| | | | llvm-svn: 236187
* Inline FragmentWriter into the only user.Rafael Espindola2015-04-291-18/+4
| | | | llvm-svn: 236158
* Write the symbol table directly to the output file.Rafael Espindola2015-04-291-79/+85
| | | | | | There is no need to first accumulate it in fragments. llvm-svn: 236157
* Use pwrite to write the number of sections.Rafael Espindola2015-04-291-10/+15
| | | | | | | This avoids having to compute the number upfront, which will be used in the next patch. llvm-svn: 236153
OpenPOWER on IntegriCloud