| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 238480
|
|
|
|
| |
llvm-svn: 238479
|
|
|
|
| |
llvm-svn: 238477
|
|
|
|
| |
llvm-svn: 238471
|
|
|
|
| |
llvm-svn: 238465
|
|
|
|
| |
llvm-svn: 238463
|
|
|
|
| |
llvm-svn: 238461
|
|
|
|
| |
llvm-svn: 238446
|
|
|
|
|
|
|
| |
For now this just saves a few loops, but it will allow more simplifications
in the future.
llvm-svn: 238444
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 238331
|
|
|
|
| |
llvm-svn: 238317
|
|
|
|
| |
llvm-svn: 238172
|
|
|
|
| |
llvm-svn: 238170
|
|
|
|
|
|
| |
Another step in merging MCSectionData and MCSection.
llvm-svn: 238162
|
|
|
|
|
|
|
| |
This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.
llvm-svn: 238159
|
|
|
|
|
|
| |
This just reduces the noise from another patch.
llvm-svn: 238156
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Lift `MCSymbolData::Index` up a level to `MCSymbol`, as preparation for
packing it into the bitfield in `MCSymbol`.
llvm-svn: 238001
|
|
|
|
| |
llvm-svn: 237956
|
|
|
|
|
|
|
| |
Now is is just its use of MCSymbolData that requires it to take a non const
MCAssembler.
llvm-svn: 237951
|
|
|
|
|
|
| |
It used to use an MCAssembler just to record the alignment of the sections.
llvm-svn: 237944
|
|
|
|
|
|
|
| |
It never creates sections, so it can use Asm.getSectionData instead of
Asm.getOrCreateSectionData.
llvm-svn: 237943
|
|
|
|
| |
llvm-svn: 237940
|
|
|
|
| |
llvm-svn: 237938
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This starts merging MCSection and MCSectionData.
There are a few issues with the current split between MCSection and
MCSectionData.
* It optimizes the the not as important case. We want the production
of .o files to be really fast, but the split puts the information used
for .o emission in a separate data structure.
* The ELF/COFF/MachO hierarchy is not represented in MCSectionData,
leading to some ad-hoc ways to represent the various flags.
* It makes it harder to remember where each item is.
The attached patch starts merging the two by moving the alignment from
MCSectionData to MCSection.
Most of the patch is actually just dropping 'const', since
MCSectionData is mutable, but MCSection was not.
llvm-svn: 237936
|
|
|
|
|
|
| |
Continue to prefer `MCSymbol` when we need both.
llvm-svn: 237798
|
|
|
|
|
|
| |
Stop using MCSymbolData where we also need MCSymbol.
llvm-svn: 237770
|
|
|
|
|
|
|
| |
Continue to canonicalize on MCSymbol instead of MCSymbolData when both
are needed.
llvm-svn: 237749
|
|
|
|
|
|
|
| |
The naming was a mish-mash of old and new style. Update to be consistent
with the new. NFC.
llvm-svn: 237594
|
|
|
|
|
|
|
|
| |
Transition one API from `MCSymbolData` to `MCSymbol`. The function
needs both, and the backpointer from `MCSymbolData` to `MCSymbol` is
going away.
llvm-svn: 237498
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 237261
|
|
|
|
| |
llvm-svn: 236275
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 236261
|
|
|
|
| |
llvm-svn: 236260
|
|
|
|
|
|
| |
Add string to the section header string table as we add sections.
llvm-svn: 236257
|
|
|
|
|
|
|
| |
This avoids passing it around and lets us build a small helper to add
a section to the table.
llvm-svn: 236255
|
|
|
|
| |
llvm-svn: 236253
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
warning; NFC.
llvm-svn: 236234
|
|
|
|
|
|
| |
Saves finding the MCSectionData just to do a map lookup.
llvm-svn: 236189
|
|
|
|
| |
llvm-svn: 236187
|
|
|
|
| |
llvm-svn: 236158
|
|
|
|
|
|
| |
There is no need to first accumulate it in fragments.
llvm-svn: 236157
|
|
|
|
|
|
|
| |
This avoids having to compute the number upfront, which will be used in the
next patch.
llvm-svn: 236153
|
|
|
|
|
|
| |
There is no need to accumulate it in fragments first.
llvm-svn: 236148
|
|
|
|
|
|
|
|
|
|
| |
Instead of accumulating the content in a fragment first, just write it
to the output stream.
Also put it first in the section table, so that we never have to worry
about its index being >= SHN_LORESERVE.
llvm-svn: 236145
|