Revision tags: llvmorg-3.4.1-rc1 |
|
#
9ec32128 |
| 10-Apr-2014 |
David Blaikie <dblaikie@gmail.com> |
Remove lazy-initialization of section caches in MCContext
This seems to have been a cargo-culted habit from the very first such cache which didn't have any specific justification (but might've been
Remove lazy-initialization of section caches in MCContext
This seems to have been a cargo-culted habit from the very first such cache which didn't have any specific justification (but might've been a layering constraint at the time).
llvm-svn: 206003
show more ...
|
#
8019bf81 |
| 10-Apr-2014 |
David Blaikie <dblaikie@gmail.com> |
Reimplement debug info compression by compressing the whole section, rather than a fragment.
To support compressing the debug_line section that contains multiple fragments (due, I believe, to variat
Reimplement debug info compression by compressing the whole section, rather than a fragment.
To support compressing the debug_line section that contains multiple fragments (due, I believe, to variation in choices of line table encoding depending on the size of instruction ranges in the actual program code) we needed to support compressing multiple MCFragments in a single pass.
This patch implements that behavior by mutating the post-relaxed and relocated section to be the compressed form of its former self, including renaming the section.
This is a more flexible (and less invasive, to a degree) implementation that will allow for other features such as "use compression only if it's smaller than the uncompressed data".
Compressing debug_frame would be a possible further extension to this work, but I've left it for now. The hurdle there is alignment sections - which might require going as far as to refactor MCAssembler.cpp:writeFragment to handle writing to a byte buffer or an MCObjectWriter (there's already a virtual call there, so it shouldn't add substantial compile-time cost) which could in turn involve refactoring MCAsmBackend::writeNopData to use that same abstraction... which involves touching all the backends. This would remove the limited handling of fragment writing seen in ELFObjectWriter.cpp:getUncompressedData which would be nice - but it's more invasive.
I did discover that I (perhaps obviously) don't need to handle relocations when I rewrite the fragments - since the relocations have already been applied and computed (and stored into ELFObjectWriter::Relocations) by this stage (necessarily, because we need to have written any immediate values or assembly-time relocations into the data already before we compress it, which we have). The test case doesn't necessarily cover that in detail - I can add more test coverage if that's preferred.
llvm-svn: 205990
show more ...
|
#
4d3b0435 |
| 10-Apr-2014 |
David Blaikie <dblaikie@gmail.com> |
Revert debug info compression support.
To support compression for debug_line and debug_frame a different approach is required. To simplify review, revert the old implementation and XFAIL the test ca
Revert debug info compression support.
To support compression for debug_line and debug_frame a different approach is required. To simplify review, revert the old implementation and XFAIL the test case. New implementation to follow shortly.
Reverts r205059 and r204958.
llvm-svn: 205989
show more ...
|
#
c3988b4a |
| 29-Mar-2014 |
Tim Northover <tnorthover@apple.com> |
MachO: allow each section to have a linker-private symbol
The upcoming ARM64 backend doesn't have section-relative relocations, so we give each section its own symbol to provide this functionality.
MachO: allow each section to have a linker-private symbol
The upcoming ARM64 backend doesn't have section-relative relocations, so we give each section its own symbol to provide this functionality. Of course, it doesn't need to appear in the final executable, so linker-private is the best kind for this purpose.
llvm-svn: 205081
show more ...
|
#
dca7c7c5 |
| 28-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
Debug Compression: Avoid compression debug_frame for now
Turns out debug_frame does use multiple fragments, so it doesn't compress correctly with the current approach. Disable compressing it for now
Debug Compression: Avoid compression debug_frame for now
Turns out debug_frame does use multiple fragments, so it doesn't compress correctly with the current approach. Disable compressing it for now while I figure out what's the best solution for it.
llvm-svn: 205059
show more ...
|
#
7400a979 |
| 27-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
DebugInfo: Support for compressed debug info sections
1) When creating a .debug_* section and instead create a .zdebug_ section. 2) When creating a fragment in a .zdebug_* section, make it a comp
DebugInfo: Support for compressed debug info sections
1) When creating a .debug_* section and instead create a .zdebug_ section. 2) When creating a fragment in a .zdebug_* section, make it a compressed fragment. 3) When computing the size of a compressed section, compress the data and use the size of the compressed data. 4) Emit the compressed bytes.
Also, check that only if a section has a compressed fragment, then that is the only fragment in the section.
Assert-fail if the fragment's data is modified after it is compressed.
Initial review on llvm-commits by Eric Christopher and Rafael Espindola.
llvm-svn: 204958
show more ...
|
#
9a3284fb |
| 14-Mar-2014 |
Jim Grosbach <grosbach@apple.com> |
MC: don't create a backtrace for diagnostics.
For better or worse, this is currently the normal error reporting path when dealing with backend errors from inline assembly. It's not just internal com
MC: don't create a backtrace for diagnostics.
For better or worse, this is currently the normal error reporting path when dealing with backend errors from inline assembly. It's not just internal compiler issues that come through here, so we shouldn't be creating a backtrace on this path.
rdar://16329947
llvm-svn: 203979
show more ...
|
#
bfdb81dc |
| 14-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCContext: Remove redundant assignment
The member variable is not initialized in the ctor so it's already empty. No need to empty it again.
llvm-svn: 203963
|
#
d9012ba1 |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Rename MCDwarfFileTable to MCDwarfLineTable
This type now represents all the data for the DWARF line table: directory names, file names, and the line table proper.
llvm-svn: 203858
|
#
498589c3 |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Sink file/directory creation down into MCDwarfFileTable form MCContext
llvm-svn: 203836
|
#
533490de |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Oh, and move the directory string over to std::string as well
(see r203831 for similar stuff)
llvm-svn: 203833
|
#
a55ddad1 |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Simplify MCDwarfFile to just use std::string instead of cunning use of MCContext's allocator.
There aren't /that/ many files, and we are already using various maps and other standard contai
MCDwarf: Simplify MCDwarfFile to just use std::string instead of cunning use of MCContext's allocator.
There aren't /that/ many files, and we are already using various maps and other standard containers that don't use MCContext's allocator to store these values, so this doesn't seem to be critical and simplifies the design (I'll be moving construction out of MCContext shortly so it'd be annoying to have to pass the allocator around to allocate these things... and we'll have non-MCContext users (debug_line.dwo) shortly)
llvm-svn: 203831
show more ...
|
#
639f8ea3 |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Simply MCDwarfFile since it really is just a StringRef and unsigned.
llvm-svn: 203827
|
#
4269b9ee |
| 13-Mar-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use printable names to implement directional labels.
This changes the implementation of local directional labels to use a dedicated map. With that it can then just use CreateTempSymbol, which is wha
Use printable names to implement directional labels.
This changes the implementation of local directional labels to use a dedicated map. With that it can then just use CreateTempSymbol, which is what the rest of MC uses.
CreateTempSymbol doesn't do a great job at making sure the names are unique (or being efficient when the names are not needed), but that should probably be fixed in a followup patch.
This fixes pr18928.
llvm-svn: 203826
show more ...
|
#
f4a640ea |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
Remove stale comment
llvm-svn: 203823
|
#
11765bce |
| 13-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Refactor line table handling into a single data structure
This replaces several "compile unit ID -> thing" mappings in favor of one mapping from CUID to the whole line table structure (file
MCDwarf: Refactor line table handling into a single data structure
This replaces several "compile unit ID -> thing" mappings in favor of one mapping from CUID to the whole line table structure (files, directories, and lines).
This is another step along the way to refactoring out reusable components of line table handling for use when generating debug_line.dwo for fission type units.
Also, might be a good basis to fold some of this handling down into MCStreamers to avoid the special case of "One line table when doing asm printing, line table per CU otherwise" by building it into the different MCStreamer implementations.
llvm-svn: 203821
show more ...
|
#
a55e64f8 |
| 12-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
MCDwarf: Invert the Section+CU->LineEntries mapping so the CU is the primary dimension
This makes the mapping consistent with other CU->X mappings in the MCContext, helping pave the way to refactor
MCDwarf: Invert the Section+CU->LineEntries mapping so the CU is the primary dimension
This makes the mapping consistent with other CU->X mappings in the MCContext, helping pave the way to refactor all these values into a single data structure per CU and thus a single map.
I haven't renamed the data structure as that would make the patch churn even higher (the MCLineSection name no longer makes sense, as this structure now contains lines for multiple sections covered by a single CU, rather than lines for a single section in multiple CUs) and further refactorings will follow that may remove this type entirely.
For convenience, I also gave the MCLineSection value semantics so we didn't have to do the lazy construction, manual delete, etc.
(& for those playing at home, refactoring the line printing into a single data structure will eventually alow that data structure to be reused to own the debug_line.dwo line table used for type unit file name resolution)
llvm-svn: 203726
show more ...
|
#
c47d0846 |
| 12-Mar-2014 |
David Blaikie <dblaikie@gmail.com> |
Correct typo ("a entry" -> "an entry")
llvm-svn: 203678
|
#
8a8cd2ba |
| 07-Jan-2014 |
Chandler Carruth <chandlerc@gmail.com> |
Re-sort all of the includes with ./utils/sort_includes.py so that subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn.
Also com
Re-sort all of the includes with ./utils/sort_includes.py so that subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn.
Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc.
llvm-svn: 198685
show more ...
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3 |
|
#
32591d31 |
| 10-Dec-2013 |
Andrew Trick <atrick@apple.com> |
Fix a crash that occurs when PWD is invalid.
MCJIT needs to be able to run in hostile environments, even when PWD is invalid. There's no need to crash MCJIT in this case.
The obvious fix is to simp
Fix a crash that occurs when PWD is invalid.
MCJIT needs to be able to run in hostile environments, even when PWD is invalid. There's no need to crash MCJIT in this case.
The obvious fix is to simply leave MCContext's CompilationDir empty when PWD can't be determined. This way, MCJIT clients, and other clients that link with LLVM don’t need a valid working directory.
If we do want to guarantee valid CompilationDir, that should be done only for clients of getCompilationDir(). This is as simple as checking for an empty string.
The only current use of getCompilationDir is EmitGenDwarfInfo, which won’t conceivably run with an invalid working dir. However, in the purely hypothetically and untestable case that this happens, the AT_comp_dir will be omitted from the compilation_unit DIE.
llvm-svn: 196874
show more ...
|
#
1c6a4c3d |
| 10-Dec-2013 |
Andrew Trick <atrick@apple.com> |
whitespace
llvm-svn: 196873
|
#
f907b891 |
| 05-Dec-2013 |
Alp Toker <alp@nuanti.com> |
Correct word hyphenations
This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines.
llvm-svn: 196471
|
#
8e5283ad |
| 03-Dec-2013 |
David Blaikie <dblaikie@gmail.com> |
Avoid buffer copies when a Twine already is a StringRef.
llvm-svn: 196301
|
Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
#
60ec3836 |
| 19-Nov-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918.
It extends the .section directive a bit, inspired by what the ELF one looks like. The
Support multiple COFF sections with the same name but different COMDAT.
This is the first step to fix pr17918.
It extends the .section directive a bit, inspired by what the ELF one looks like. The problem with using linkonce is that given
.section foo .linkonce....
.section foo .linkonce
we would already have switched sections when getting to .linkonce. The cleanest solution seems to be to add the comdat information in the .section itself.
llvm-svn: 195148
show more ...
|
#
15b25dff |
| 22-Oct-2013 |
David Blaikie <dblaikie@gmail.com> |
MC: Support multiple sections with the same name in the same comdat group
Code review by Eric Christopher and Rafael Espindola.
llvm-svn: 193209
|