#
2f9bdd8c |
| 27-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
There is only one current section.
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 ine
There is only one current section.
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
show more ...
|
#
a32d0e9e |
| 27-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delete MCSectionData.
llvm-svn: 238331
|
#
8c05c6e2 |
| 27-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move getSubsectionInsertionPoint to MCSection.
llvm-svn: 238320
|
#
bb9a71c1 |
| 26-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Replace getOrCreateSectionData with registerSection.
There is now no SectionData to be created.
llvm-svn: 238208
|
#
3d2aeb2e |
| 26-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Have getCurrentSectionData return a MCSection.
I will fix the name shortly.
llvm-svn: 238204
|
#
8324c2f8 |
| 25-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Store a MCSection in MCFragment.
Part of the work to merge MCSectionData into MCSection.
llvm-svn: 238160
|
#
cd625183 |
| 25-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move HasInstructions to MCSection.
llvm-svn: 238150
|
#
b028cc80 |
| 25-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move bundle info from MCSectionData to MCSection.
llvm-svn: 238143
|
#
967d6a69 |
| 21-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Stop forwarding (get|set)Aligment from MCSectionData to MCSection.
llvm-svn: 237956
|
#
0709a7bd |
| 21-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move alignment from MCSectionData to MCSection.
This starts merging MCSection and MCSectionData.
There are a few issues with the current split between MCSection and MCSectionData.
* It optimizes t
Move alignment from MCSectionData to MCSection.
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
show more ...
|
#
0b73d71a |
| 21-May-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
AsmPrinter: Compute absolute label difference directly
Create a low-overhead path for `EmitLabelDifference()` that emits a emits an absolute number when (1) the output is an object stream and (2) th
AsmPrinter: Compute absolute label difference directly
Create a low-overhead path for `EmitLabelDifference()` that emits a emits an absolute number when (1) the output is an object stream and (2) the two symbols are in the same data fragment.
This drops memory usage on Mach-O from 975 MB down to 919 MB (5.8%). The only call is when `!doesDwarfUseRelocationsAcrossSections()` -- i.e., on Mach-O -- since otherwise an absolute offset from the start of the section needs a relocation. (`EmitLabelDifference()` is cheaper on ELF anyway, since it creates 1 fewer temp symbol, and it gets called far less often. It's not clear to me if this is even a bottleneck there.)
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.)
llvm-svn: 237876
show more ...
|
#
6f482000 |
| 18-May-2015 |
Jim Grosbach <grosbach@apple.com> |
MC: Clean up method names in MCContext.
The naming was a mish-mash of old and new style. Update to be consistent with the new. NFC.
llvm-svn: 237594
|
#
91df21f7 |
| 15-May-2015 |
Jim Grosbach <grosbach@apple.com> |
MC: Update MCCodeEmitter naming. NFC.
s/EncodeInstruction/encodeInstruction/
llvm-svn: 237469
|
#
63661f8d |
| 15-May-2015 |
Jim Grosbach <grosbach@apple.com> |
MC: Update MCFixup naming. NFC.
s/MCFixup::Create/MCFixup::create/
llvm-svn: 237468
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
#
5560a4cf |
| 14-Apr-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use raw_pwrite_stream in the object writer/streamer.
The ELF object writer will take advantage of that in the next commit.
llvm-svn: 234950
|
#
9e0c890f |
| 12-Apr-2015 |
Petr Hosek <phosek@chromium.org> |
[MC] Write padding into fragments when -mc-relax-all flag is used
Summary: When instruction bundling is enabled and the -mc-relax-all flag is set, we can write bundle padding directly into fragments
[MC] Write padding into fragments when -mc-relax-all flag is used
Summary: When instruction bundling is enabled and the -mc-relax-all flag is set, we can write bundle padding directly into fragments and avoid creating large number of fragments significantly reducing LLVM MC memory usage.
Test Plan: Regression test attached
Reviewers: eliben
Subscribers: jfb, mseaborn
Differential Revision: http://reviews.llvm.org/D8072
llvm-svn: 234714
show more ...
|
#
78aa3452 |
| 07-Apr-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove dead code. NFC.
llvm-svn: 234352
|
#
36a15cb9 |
| 20-Mar-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't declare all text sections at the start of the .s
The code this patch removes was there to make sure the text sections went before the dwarf sections. That is necessary because MachO uses offse
Don't declare all text sections at the start of the .s
The code this patch removes was there to make sure the text sections went before the dwarf sections. That is necessary because MachO uses offsets relative to the start of the file, so adding a section can change relaxations.
The dwarf sections were being printed at the start just to produce symbols pointing at the start of those sections.
The underlying issue was fixed in r231898. The dwarf sections are now printed when they are about to be used, which is after we printed the text sections.
To make sure we don't regress, the patch makes the MachO streamer assert if CodeGen puts anything unexpected after the DWARF sections.
llvm-svn: 232842
show more ...
|
#
cd584a80 |
| 19-Mar-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Split the object streamer callback in one per file format.
There are two main advantages to doing this
* Targets that only need to handle one of the formats specially don't have to worry about th
Split the object streamer callback in one per file format.
There are two main advantages to doing this
* Targets that only need to handle one of the formats specially don't have to worry about the others. For example, x86 now only registers a constructor for the COFF streamer.
* Changes to the arguments passed to one format constructor will not impact the other formats.
llvm-svn: 232699
show more ...
|
#
105270f6 |
| 18-Mar-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a default implementation of createObjectStreamer.
This removes duplicated code from backends that don't need to do anything fancy.
llvm-svn: 232658
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
#
9f380a3c |
| 16-Mar-2015 |
David Blaikie <dblaikie@gmail.com> |
Fix uses of reserved identifiers starting with an underscore followed by an uppercase letter
This covers essentially all of llvm's headers and libs. One or two weird cases I wasn't sure were worth/a
Fix uses of reserved identifiers starting with an underscore followed by an uppercase letter
This covers essentially all of llvm's headers and libs. One or two weird cases I wasn't sure were worth/appropriate to fix.
llvm-svn: 232394
show more ...
|
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
5be22a12 |
| 12-Dec-2014 |
Michael Ilseman <milseman@apple.com> |
Clean up static analyzer warnings.
Clang's static analyzer found several potential cases of undefined behavior, use of un-initialized values, and potentially null pointer dereferences in tablegen, S
Clean up static analyzer warnings.
Clang's static analyzer found several potential cases of undefined behavior, use of un-initialized values, and potentially null pointer dereferences in tablegen, Support, MC, and ADT. This cleans them up with specific assertions on the assumptions of the code.
llvm-svn: 224154
show more ...
|
Revision tags: llvmorg-3.5.1-rc1 |
|
#
cf6bfb1d |
| 03-Nov-2014 |
Oliver Stannard <oliver.stannard@arm.com> |
Revert r221150, as it broke sanitizer tests
llvm-svn: 221151
|
#
652ec6ee |
| 03-Nov-2014 |
Oliver Stannard <oliver.stannard@arm.com> |
Emit .eh_frame with relocations to functions, rather than sections
When LLVM emits DWARF call frame information, it currently creates a local, section-relative symbol in the code section, which is p
Emit .eh_frame with relocations to functions, rather than sections
When LLVM emits DWARF call frame information, it currently creates a local, section-relative symbol in the code section, which is pointed to by a relocation on the .eh_frame section. However, for C++ we emit some functions in section groups, and the SysV ABI has some rules to make it easier to remove these sections (http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_group_rules):
A symbol table entry with STB_LOCAL binding that is defined relative to one of a group's sections, and that is contained in a symbol table section that is not part of the group, must be discarded if the group members are discarded. References to this symbol table entry from outside the group are not allowed.
This means that we need to use the function symbol for the relocation, not a temporary symbol.
There was a comment in the code claiming that the local symbol was used to avoid creating a relocation, but a relocation must be created anyway as the code and CFI are in different sections.
llvm-svn: 221150
show more ...
|
#
ac7dc6e7 |
| 22-Oct-2014 |
David Majnemer <david.majnemer@gmail.com> |
Attempt to fix the build after r220439
llvm-svn: 220440
|