Revision tags: llvmorg-3.8.0-rc1 |
|
#
c49ac5e7 |
| 16-Dec-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use std::unique_ptr. NFC.
llvm-svn: 255852
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2 |
|
#
07b43d39 |
| 17-Nov-2015 |
Oliver Stannard <oliver.stannard@arm.com> |
[Assembler] Allow non-fatal errors after parsing
This adds reportError to MCContext, which can be used as an alternative to reportFatalError when the assembler wants to try to continue processing th
[Assembler] Allow non-fatal errors after parsing
This adds reportError to MCContext, which can be used as an alternative to reportFatalError when the assembler wants to try to continue processing the rest of the file after the error is reported, so that all of the errors ina file can be reported. It records the fact that an error was encountered, so we can avoid emitting an object file if any errors occurred.
This patch doesn't add any uses of this function (a later patch will convert most uses of reportFatalError to use it), but there is a small functional change: we use the SourceManager to print the error message, even if we have a null SMLoc. This means that we get a SourceManager-style message, with the file and line information shown as <unknown>, rather than the "LLVM ERROR" style used by report_fatal_error.
llvm-svn: 253327
show more ...
|
Revision tags: llvmorg-3.7.1-rc1 |
|
#
b11ef089 |
| 14-Nov-2015 |
Akira Hatanaka <ahatanaka@apple.com> |
Reduce the size of MCRelaxableFragment.
MCRelaxableFragment previously kept a copy of MCSubtargetInfo and MCInst to enable re-encoding the MCInst later during relaxation. A copy of MCSubtargetInfo (
Reduce the size of MCRelaxableFragment.
MCRelaxableFragment previously kept a copy of MCSubtargetInfo and MCInst to enable re-encoding the MCInst later during relaxation. A copy of MCSubtargetInfo (instead of a reference or pointer) was needed because the feature bits could be modified by the parser.
This commit replaces the MCSubtargetInfo copy in MCRelaxableFragment with a constant reference to MCSubtargetInfo. The copies of MCSubtargetInfo are kept in MCContext, and the target parsers are now responsible for asking MCContext to provide a copy whenever the feature bits of MCSubtargetInfo have to be toggled. With this patch, I saw a 4% reduction in peak memory usage when I compiled verify-uselistorder.lto.bc using llc.
rdar://problem/21736951
Differential Revision: http://reviews.llvm.org/D14346
llvm-svn: 253127
show more ...
|
#
21a7f236 |
| 09-Oct-2015 |
Keno Fischer <kfischer@college.harvard.edu> |
Clear SectionSymbols in MCContext::Reset
This was just forgotten when SectionSymbols was introduced and could cause corruption if the MCContext was reused after Reset.
Reviewers: rafael
Subscriber
Clear SectionSymbols in MCContext::Reset
This was just forgotten when SectionSymbols was introduced and could cause corruption if the MCContext was reused after Reset.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13547
llvm-svn: 249854
show more ...
|
#
4264e2d5 |
| 07-Oct-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use SpecificBumpPtrAllocator to simplify the MCSeciton destruction.
llvm-svn: 249589
|
#
1f13d478 |
| 03-Sep-2015 |
Reid Kleckner <rnk@google.com> |
Sink COFF.h MC include into .cpp files
This prevents MC clients from getting COFF.h, which conflicts with winnt.h macros. Also a minor IWYU cleanup. Now the only public headers including COFF.h are
Sink COFF.h MC include into .cpp files
This prevents MC clients from getting COFF.h, which conflicts with winnt.h macros. Also a minor IWYU cleanup. Now the only public headers including COFF.h are in Object, and they actually need it.
llvm-svn: 246784
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3 |
|
#
dbaf0498 |
| 14-Aug-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "Centralize the information about which object format we are using."
This reverts commit r245047.
It was failing on the darwin bots. The problem was that when running
./bin/llc -march=msp43
Revert "Centralize the information about which object format we are using."
This reverts commit r245047.
It was failing on the darwin bots. The problem was that when running
./bin/llc -march=msp430
llc gets to
if (TheTriple.getTriple().empty()) TheTriple.setTriple(sys::getDefaultTargetTriple());
Which means that we go with an arch of msp430 but a triple of x86_64-apple-darwin14.4.0 which fails badly.
That code has to be updated to select a triple based on the value of march, but that is not a trivial fix.
llvm-svn: 245062
show more ...
|
#
90eb70c8 |
| 14-Aug-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Centralize the information about which object format we are using.
Other than some places that were handling unknown as ELF, this should have no change. The test updates are because we were detectin
Centralize the information about which object format we are using.
Other than some places that were handling unknown as ELF, this should have no change. The test updates are because we were detecting arm-coff or x86_64-win64-coff as ELF targets before.
It is not clear if the enum should live on the Triple. At least now it lives in a single location and should be easier to move somewhere else.
llvm-svn: 245047
show more ...
|
Revision tags: studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
41de8027 |
| 23-Jun-2015 |
Daniel Jasper <djasper@google.com> |
Revert r240302 ("Bring r240130 back.").
This causes errors like:
ld: error: blah.o: requires dynamic R_X86_64_PC32 reloc against '' which may overflow at runtime; recompile with -fPIC blah.cc
Revert r240302 ("Bring r240130 back.").
This causes errors like:
ld: error: blah.o: requires dynamic R_X86_64_PC32 reloc against '' which may overflow at runtime; recompile with -fPIC blah.cc:function f(): error: undefined reference to '' blah.o:g(): error: undefined reference to ''
I have not yet come up with an appropriate reproduction.
llvm-svn: 240394
show more ...
|
#
2d6bae2e |
| 22-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Bring r240130 back.
Now that pr23900 is fixed, we can bring it back with no changes.
Original message:
Make all temporary symbols unnamed.
What this does is make all symbols that would otherwise
Bring r240130 back.
Now that pr23900 is fixed, we can bring it back with no changes.
Original message:
Make all temporary symbols unnamed.
What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed.
Some of these symbols still show up in the symbol table, but we can just make them unnamed.
In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed.
Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB.
llvm-svn: 240302
show more ...
|
#
67e715ff |
| 19-Jun-2015 |
Nico Weber <nicolasweber@gmx.de> |
Revert 240130, it caused crashes (repro in PR23900).
llvm-svn: 240193
|
#
284a750c |
| 19-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make all temporary symbols unnamed.
What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed.
Some of these symbols still show up in the symbol table, but we
Make all temporary symbols unnamed.
What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed.
Some of these symbols still show up in the symbol table, but we can just make them unnamed.
In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed.
Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB.
llvm-svn: 240130
show more ...
|
#
f27fa2bb |
| 17-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use named temporaries for directional labels.
Directional labels can show up in symbol tables (and we have a llvm-mc test for that). Given that, we need to make sure they are named.
With that out o
Use named temporaries for directional labels.
Directional labels can show up in symbol tables (and we have a llvm-mc test for that). Given that, we need to make sure they are named.
With that out of the way, use setUseNamesOnTempLabels in llvm-mc so that it too benefits from the memory saving.
llvm-svn: 239914
show more ...
|
#
234b8756 |
| 09-Jun-2015 |
Pete Cooper <peter_cooper@apple.com> |
Allocate space for MCSymbol::Name only if required.
Similarly to User which allocates a number of Use's prior to the this pointer, allocate space for the Name* for MCSymbol only when we need a name.
Allocate space for MCSymbol::Name only if required.
Similarly to User which allocates a number of Use's prior to the this pointer, allocate space for the Name* for MCSymbol only when we need a name.
Given that an MCSymbol is 48-bytes on 64-bit systems, this saves a decent % of space.
Given the verify_uselistorder test case with debug info and llc, 50k symbols have names out of 700k so this optimises for the common case of temporary unnamed symbols.
Reviewed by David Blaikie.
llvm-svn: 239423
show more ...
|
#
eb012fa7 |
| 08-Jun-2015 |
Pete Cooper <peter_cooper@apple.com> |
Add MCSymbolMachO which will be used to hide the MCSymbolMachO flags.
Reviewed by Rafael Espíndola.
llvm-svn: 239315
|
#
ad9f9c35 |
| 08-Jun-2015 |
Pete Cooper <peter_cooper@apple.com> |
Add MCSymbolCOFF class and use it to get and set the COFF type field.
Reviewed by Rafael Espíndola.
llvm-svn: 239312
|
#
a3ab3841 |
| 08-Jun-2015 |
Pete Cooper <peter_cooper@apple.com> |
Change MCSymbol IsELF to an enum to support future MCSymbolCOFF and MCSymbolMachO.
Reviewed by Rafael Espíndola.
llvm-svn: 239311
|
#
3e9e72a5 |
| 02-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Clarify when we can avoid creating names for temp symbols.
Some temporary symbols are created by MC itself. These symbols are never used for lookup and are never included in the object symbol table,
Clarify when we can avoid creating names for temp symbols.
Some temporary symbols are created by MC itself. These symbols are never used for lookup and are never included in the object symbol table, so we can avoid creating a name for them.
Other temporaries are created by CodeGen or by the user by explicitly asking for a name starting with .L (or L on MachO).
These temporaries behave like regular symbols, we just try to avoid including them in the object symbol table, but sometimes they end up there:
const char *foo() { return "abc" + 3; }
will have a relocation pointing to a .L symbol.
It just so happens that almost all MC created temporary has the AlwaysAddSuffix option and CodeGen/user created ones don't.
One interesting future optimization would be to use unnamed symbols for all temporaries, but that would require use an st_name of 0 or having the object writer create the names if a symbol does end up in the symbol table.
No testcase since this just avoid creating a few extra names for MC created temporaries.
llvm-svn: 238887
show more ...
|
#
0ccf9b71 |
| 02-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Pass a MCSymbolELF to a few ELF only functions. NFC.
llvm-svn: 238868
|
#
a8695760 |
| 02-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Create a MCSymbolELF.
This create a MCSymbolELF class and moves SymbolSize since only ELF needs a size expression.
This reduces the size of MCSymbol from 56 to 48 bytes.
llvm-svn: 238801
|
#
412c4dbb |
| 31-May-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
[MC] Simplify code. No functionality change intended.
llvm-svn: 238676
|
#
ed34d58c |
| 26-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move MCSection destruction to MCContext::reset.
Fixes the leaks when running llc.
Also found by an asan bot.
llvm-svn: 238167
|
#
24d285d3 |
| 26-May-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Call the destructors of the MCSections.
They now contain the fragments. If we don't call the destructors the fragments leak.
Found by an asan bot.
llvm-svn: 238161
|
#
03656162 |
| 22-May-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
MC: Shave a pointer off of MCSymbol::Name
Shave a pointer off of `MCSymbolName` by storing `StringMapEntry<bool>*` instead of `StringRef`. This brings `sizeof(MCSymbol)` down to 64 on 64-bit platfo
MC: Shave a pointer off of MCSymbol::Name
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
show more ...
|
#
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 ...
|