Aaron Ballman [Tue, 26 May 2015 16:12:07 +0000 (16:12 +0000)]
Going out on a limb and guessing that someone viewing the 3.7 release notes may instead want to view 3.6 instead of 3.5.
llvm-svn: 238212
Tom Stellard [Tue, 26 May 2015 15:55:52 +0000 (15:55 +0000)]
R600/SI: Add assembler support for all CI and VI VOP2 instructions
llvm-svn: 238211
Tom Stellard [Tue, 26 May 2015 15:55:50 +0000 (15:55 +0000)]
AsmMatcherEmitter: Add an option to override custom converters for InstAlias
If there is an InstAlias defined for an instruction that had a custom
converter (AsmMatchConverter), then when the alias is matched,
the custom converter will be used rather than the converter generated
by the InstAlias.
This patch adds the UseInstAsmMatchConverter field to the InstAlias
class, which allows you to override this behavior and force the
converter generated by the InstAlias to be used.
This is required for some future improvemnts to the R600 assembler.
Differential Revision: http://reviews.llvm.org/D9083
llvm-svn: 238210
Rafael Espindola [Tue, 26 May 2015 15:07:25 +0000 (15:07 +0000)]
Replace getOrCreateSectionData with registerSection.
There is now no SectionData to be created.
llvm-svn: 238208
Marshall Clow [Tue, 26 May 2015 14:58:05 +0000 (14:58 +0000)]
Mark N4366 as complete. libc++ has done this since 2012
llvm-svn: 238207
Rafael Espindola [Tue, 26 May 2015 14:51:03 +0000 (14:51 +0000)]
Remove dead forward declaration.
llvm-svn: 238205
Rafael Espindola [Tue, 26 May 2015 14:48:11 +0000 (14:48 +0000)]
Have getCurrentSectionData return a MCSection.
I will fix the name shortly.
llvm-svn: 238204
Rafael Espindola [Tue, 26 May 2015 14:42:52 +0000 (14:42 +0000)]
Pass a MCSection to getCurrentSectionData.
A step towards merging MCSection and MCSectionData.
llvm-svn: 238203
Alexander Kornienko [Tue, 26 May 2015 14:35:09 +0000 (14:35 +0000)]
[clang-tidy] misc-noexcept-move-ctors should ignore implicit constructors and assignments.
llvm-svn: 238202
Luke Cheeseman [Tue, 26 May 2015 13:40:31 +0000 (13:40 +0000)]
Re-commit changes in r237579 with fix for bug breaking windows builds.
llvm-svn: 238201
Petar Jovanovic [Tue, 26 May 2015 13:30:54 +0000 (13:30 +0000)]
[MIPS] fix extension of integer types (function calls)
On MIPS unsigned int type should not be zero extended but sign-extended.
Patch by Strahinja Petrovic.
Differential Revision: http://reviews.llvm.org/D9198
llvm-svn: 238200
Luke Cheeseman [Tue, 26 May 2015 13:10:35 +0000 (13:10 +0000)]
Test Commit
llvm-svn: 238199
Elena Demikhovsky [Tue, 26 May 2015 12:37:17 +0000 (12:37 +0000)]
AVX-512: fixed a bug in arithmetic operations lowering for i1 type
https://llvm.org/bugs/show_bug.cgi?id=23630
llvm-svn: 238198
Daniel Sanders [Tue, 26 May 2015 12:25:36 +0000 (12:25 +0000)]
Fix warning introduced in r238190 about lack of virtual destructor in MCObjectFileInfo.
llvm-svn: 238197
Tamas Berghammer [Tue, 26 May 2015 11:58:52 +0000 (11:58 +0000)]
Move register reading form NativeProcessLinux to NativeRegisterContextLinux*
This change reorganize the register read/write code inside lldb-server on Linux
with moving the architecture independent code into a new class called
NativeRegisterContextLinux and all of the architecture dependent code into the
appropriate NativeRegisterContextLinux_* class. As part of it the compilation of
the architecture specific register contexts are only compiled on the specific
architecture because they can't be used in other cases.
The purpose of this change is to remove a lot of duplicated code from the different
register contexts and to remove the architecture dependent codes from the global
NativeProcessLinux class.
Differential revision: http://reviews.llvm.org/D9935
llvm-svn: 238196
Elena Demikhovsky [Tue, 26 May 2015 11:32:39 +0000 (11:32 +0000)]
AVX-512: fixed a bug in lowering VSELECT for 512-bit vector
https://llvm.org/bugs/show_bug.cgi?id=23634
llvm-svn: 238195
Denis Protivensky [Tue, 26 May 2015 11:13:09 +0000 (11:13 +0000)]
[ARM] Fix enum type cast in switch
It caused warning in clang assuming the default
branch would never be reached with the given
switch key type.
llvm-svn: 238194
Alexander Kornienko [Tue, 26 May 2015 10:47:48 +0000 (10:47 +0000)]
[clang-tidy] Don't issue most google-readability-casting warnings on .c files included in other files.
This is done sometimes for testing purposes, and the check needs to handle this
consistently.
llvm-svn: 238193
Michael Kuperstein [Tue, 26 May 2015 10:47:10 +0000 (10:47 +0000)]
Use std::bitset for SubtargetFeatures.
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 several times this was committed (e.g. r229831, r233055), it caused several buildbot failures.
Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables.
This should now be fixed.
llvm-svn: 238192
Denis Protivensky [Tue, 26 May 2015 10:26:15 +0000 (10:26 +0000)]
[ARM] Move out .ARM.exidx related things to ARM backend
llvm-svn: 238191
Daniel Sanders [Tue, 26 May 2015 10:19:18 +0000 (10:19 +0000)]
[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.
This commit uses DW_EH_PE_sdata8 for N64 as far as is possible at the moment.
However, it is possible to end up with DW_EH_PE_sdata4 when a TargetMachine is
not available. There's no risk of issues with inconsistency here since the
tables are self describing but it does mean there is a small chance of the
PC-relative offset being out of range for particularly large programs.
Reviewers: petarj
Reviewed By: petarj
Subscribers: srhines, joerg, tberghammer, llvm-commits
Differential Revision: http://reviews.llvm.org/D9669
llvm-svn: 238190
Simon Atanasyan [Tue, 26 May 2015 08:48:33 +0000 (08:48 +0000)]
[Mips] Use structures declared in the llvm/Object/ELFTypes.h
No functional changes.
llvm-svn: 238189
Simon Atanasyan [Tue, 26 May 2015 08:48:14 +0000 (08:48 +0000)]
[mips] Move some structures represent MIPS specific ELF sections from LLD to LLVM
That allows to reuse the code in other tools like llvm-readobj etc.
No functional changes.
llvm-svn: 238188
Craig Topper [Tue, 26 May 2015 08:07:56 +0000 (08:07 +0000)]
[TableGen] Fix line wrapping logic for the autogenerated header to use math that makes more sense (at least to me).
The old code had a bug if the description was between 75 and 85 characters or so as it substracted PSLen from Desc.size() instead of MAX_LINE_LEN in the compare. It also calculated odd values for PosE on the last split and just let StringRef::slice take care of it being larger than the description string.
llvm-svn: 238187
Craig Topper [Tue, 26 May 2015 08:07:49 +0000 (08:07 +0000)]
[TableGen] Rewrite an assert to not do a bunch unsigned math and then try to ensure the result is a positive number.
I think the fact that it was explicitly excluding 0 kept this from being a tautology. The exclusion of 0 for the old math was also a bug that's easily hit if the description gets split into multiple lines.
llvm-svn: 238186
Craig Topper [Tue, 26 May 2015 08:07:45 +0000 (08:07 +0000)]
[TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code.
llvm-svn: 238185
Daniel Jasper [Tue, 26 May 2015 07:26:26 +0000 (07:26 +0000)]
clang-format: Guard the bin-packing in braced lists on BinPackArguments
instead of BinPackParameters. Braced lists are used as constructor
calls in many places and so the bin-packing should follow what is done
for other calls and not what is done for function declarations.
llvm-svn: 238184
Daniel Jasper [Tue, 26 May 2015 07:18:56 +0000 (07:18 +0000)]
clang-format: [JS] Support ES6 spread operator.
Specifically, don't add a space before it.
Before:
someFunction(... a);
var x = [1, 2, ... a];
After:
someFunction(...a);
var x = [1, 2, ...a];
llvm-svn: 238183
Daniel Jasper [Tue, 26 May 2015 07:03:42 +0000 (07:03 +0000)]
clang-format: Fix child-formatting in macros.
This fixes a case where the column limit was incorrectly calculated
leading to a macro like this:
#define A \
[] { \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx( \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); \
}
exceeding the column limit.
llvm-svn: 238182
Craig Topper [Tue, 26 May 2015 06:48:47 +0000 (06:48 +0000)]
[TableGen] Fix indentation. NFC
llvm-svn: 238181
Craig Topper [Tue, 26 May 2015 06:48:46 +0000 (06:48 +0000)]
[TableGen] Include header for each cpp file first. NFC
llvm-svn: 238180
Craig Topper [Tue, 26 May 2015 06:48:43 +0000 (06:48 +0000)]
[TableGen] Remove unnecessary include and just forward declare. NFC
llvm-svn: 238179
Craig Topper [Tue, 26 May 2015 06:48:41 +0000 (06:48 +0000)]
[TableGen] Remove unneeded namespace around a function. Just put llvm:: on the definition since it's already declared in a header file.
llvm-svn: 238178
Craig Topper [Tue, 26 May 2015 06:48:38 +0000 (06:48 +0000)]
[TableGen] Use 'static' instead of an anonymous namespace.
llvm-svn: 238177
Simon Atanasyan [Tue, 26 May 2015 06:05:07 +0000 (06:05 +0000)]
[Mips] Add Elf_Mips_Options::getRegInfoDesc() function to retrieve an ODK_REGINFO descriptor
No functional changes.
llvm-svn: 238176
Simon Atanasyan [Tue, 26 May 2015 06:05:01 +0000 (06:05 +0000)]
[Mips] Make the code shorter - use LLVM_ELF_IMPORT_TYPES_ELFT macro
No functional changes.
llvm-svn: 238175
Vince Harron [Tue, 26 May 2015 03:10:41 +0000 (03:10 +0000)]
revert files unintentionally checked in
llvm-svn: 238174
Vince Harron [Tue, 26 May 2015 03:08:05 +0000 (03:08 +0000)]
Print port number that lldb-server binds to in platform mode
If binding to port 0 is selected, the actual port is printed.
This improves the reliability of platform startup by ensuring that
a free port can be found.
TEST PLAN
./lldb-server platform --listen *:0
Listening for a connection from <port-number>...
Will appear on stdout (with other stuff potentially)
llvm-svn: 238173
Rafael Espindola [Tue, 26 May 2015 02:17:21 +0000 (02:17 +0000)]
Remove most uses of MCSectionData from MCAssembler.
llvm-svn: 238172
Rafael Espindola [Tue, 26 May 2015 02:00:36 +0000 (02:00 +0000)]
Stop using MCSectionData in MCAsmLayout.h.
llvm-svn: 238170
Davide Italiano [Tue, 26 May 2015 01:57:32 +0000 (01:57 +0000)]
[ELF] Add support for -z origin/now options.
Differential Revision: http://reviews.llvm.org/D9963
llvm-svn: 238169
Rafael Espindola [Tue, 26 May 2015 01:56:56 +0000 (01:56 +0000)]
Delete dead code.
llvm-svn: 238168
Rafael Espindola [Tue, 26 May 2015 01:52:19 +0000 (01:52 +0000)]
Move MCSection destruction to MCContext::reset.
Fixes the leaks when running llc.
Also found by an asan bot.
llvm-svn: 238167
David Majnemer [Tue, 26 May 2015 01:30:45 +0000 (01:30 +0000)]
[MS ABI] Implement restrict qualified references
MSVC 2015 supports '__restrict' qualified reference types.
llvm-svn: 238166
Rafael Espindola [Tue, 26 May 2015 01:15:30 +0000 (01:15 +0000)]
Stop using MCSectionData in MCMachObjectWriter.h.
llvm-svn: 238165
Rafael Espindola [Tue, 26 May 2015 00:55:28 +0000 (00:55 +0000)]
Remove dead forward declaration.
llvm-svn: 238164
Rafael Espindola [Tue, 26 May 2015 00:52:18 +0000 (00:52 +0000)]
Stop using MCSectionData in MCExpr.h.
llvm-svn: 238163
Rafael Espindola [Tue, 26 May 2015 00:36:57 +0000 (00:36 +0000)]
Return a MCSection from MCFragment::getParent().
Another step in merging MCSectionData and MCSection.
llvm-svn: 238162
Rafael Espindola [Tue, 26 May 2015 00:32:28 +0000 (00:32 +0000)]
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
Rafael Espindola [Mon, 25 May 2015 23:48:22 +0000 (23:48 +0000)]
Store a MCSection in MCFragment.
Part of the work to merge MCSectionData into MCSection.
llvm-svn: 238160
Rafael Espindola [Mon, 25 May 2015 23:14:17 +0000 (23:14 +0000)]
Turn MCSectionData into a field of MCSection.
This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.
llvm-svn: 238159
Rafael Espindola [Mon, 25 May 2015 22:57:48 +0000 (22:57 +0000)]
Move MCSectionData to MCSection.h.
Another step in merging MCSectionData and MCSection.
llvm-svn: 238158
Rafael Espindola [Mon, 25 May 2015 22:07:33 +0000 (22:07 +0000)]
Remove dead code. NFC.
llvm-svn: 238157
Rafael Espindola [Mon, 25 May 2015 21:56:55 +0000 (21:56 +0000)]
Make a few MCSectionELF& variables const. NFC.
This just reduces the noise from another patch.
llvm-svn: 238156
Rafael Espindola [Mon, 25 May 2015 20:39:23 +0000 (20:39 +0000)]
Insert MCSectionData into the section list directly in getOrCreateSectionData.
Removing the logic from the constructor will make it easier to merge
MCSectionData and MCSection.
llvm-svn: 238155
Craig Topper [Mon, 25 May 2015 20:01:18 +0000 (20:01 +0000)]
Use range-based for loops. NFC.
llvm-svn: 238154
Andrey Churbanov [Mon, 25 May 2015 20:01:16 +0000 (20:01 +0000)]
fixed missed arch renaming (from C.Bergstrom)
llvm-svn: 238153
Bjorn Steinbrink [Mon, 25 May 2015 19:46:38 +0000 (19:46 +0000)]
Remove conflicting attributes before adding deduced readonly/readnone
Summary:
In case of functions that have a pointer argument and only pass it to
each other, the function attributes pass deduces that the pointer should
get the readnone attribute, but fails to remove a readonly attribute
that may already have been present.
Reviewers: nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9995
llvm-svn: 238152
Davide Italiano [Mon, 25 May 2015 19:12:18 +0000 (19:12 +0000)]
[llvm-readobj/ELF] Teach how to decode DF_1_XXX flags
llvm-readobj -dynamic-table output.
Before:
0x000000006FFFFFFB unknown
After:
0x000000006FFFFFFB FLAGS_1 NOW ORIGIN
Differential Revision: http://reviews.llvm.org/D9958
llvm-svn: 238151
Rafael Espindola [Mon, 25 May 2015 18:34:26 +0000 (18:34 +0000)]
Move HasInstructions to MCSection.
llvm-svn: 238150
Simon Pilgrim [Mon, 25 May 2015 17:49:13 +0000 (17:49 +0000)]
[X86][AVX2] Vectorized i16 shift operators
Part of D9474, this patch extends AVX2 v16i16 types to 2 x 8i32 vectors and uses i32 shift variable shifts before packing back to i16.
Adds AVX2 tests for v8i16 and v16i16
llvm-svn: 238149
Tom Stellard [Mon, 25 May 2015 16:15:56 +0000 (16:15 +0000)]
R600/SI: Remove some unnecessary patterns from VINTRP multiclass
DisableEncoding and Constraints can be set using let statements around
the multiclass defs.
llvm-svn: 238148
Tom Stellard [Mon, 25 May 2015 16:15:54 +0000 (16:15 +0000)]
R600/SI: Fix bug with v_interp_p1_f32 instructions on 16 bank lds chips
The src and dst register cannot be the same on chips with 16 lds banks.
llvm-svn: 238147
Tom Stellard [Mon, 25 May 2015 16:15:50 +0000 (16:15 +0000)]
R600/SI: Use NAME rather than opName as the key to the MCOpcode tables
This lets us drop a parameter the opName parameter to the VINTRP
multiclass and makes it possible to create multiple VINTRP defs
with the same asm mnemonic.
llvm-svn: 238146
Kit Barton [Mon, 25 May 2015 15:52:45 +0000 (15:52 +0000)]
This patch adds support for the vector quadword add/sub instructions introduced
in POWER8.
These are the Clang-related changes for http://reviews.llvm.org/D9081
vadduqm
vaddeuqm
vaddcuq
vaddecuq
vsubuqm
vsubeuqm
vsubcuq
vsubecuq
All builtins are added in altivec.h, and guarded with the POWER8_VECTOR and
powerpc64 macros.
http://reviews.llvm.org/D9903
llvm-svn: 238145
Kit Barton [Mon, 25 May 2015 15:49:26 +0000 (15:49 +0000)]
This patch adds support for the vector quadword add/sub instructions introduced
in POWER8:
vadduqm
vaddeuqm
vaddcuq
vaddecuq
vsubuqm
vsubeuqm
vsubcuq
vsubecuq
In addition to adding the instructions themselves, it also adds support for the
v1i128 type for intrinsics (Intrinsics.td, Function.cpp, and
IntrinsicEmitter.cpp).
http://reviews.llvm.org/D9081
llvm-svn: 238144
Rafael Espindola [Mon, 25 May 2015 15:04:26 +0000 (15:04 +0000)]
Move bundle info from MCSectionData to MCSection.
llvm-svn: 238143
Rafael Espindola [Mon, 25 May 2015 14:57:35 +0000 (14:57 +0000)]
Add a isBundleLocked helper to MCELFStreamer.
llvm-svn: 238142
Rafael Espindola [Mon, 25 May 2015 14:25:28 +0000 (14:25 +0000)]
Move LayoutOrder to MCSection.
llvm-svn: 238141
Rafael Espindola [Mon, 25 May 2015 14:18:24 +0000 (14:18 +0000)]
Use a simple initial value for the ordinal.
The odd value was only used by the ELF writer to check if the section was one
that it had created.
llvm-svn: 238140
Rafael Espindola [Mon, 25 May 2015 14:12:48 +0000 (14:12 +0000)]
Stop forwarding getOrdinal and setOrdinal.
llvm-svn: 238139
Rafael Espindola [Mon, 25 May 2015 14:04:31 +0000 (14:04 +0000)]
Use default member initializes. NFC.
llvm-svn: 238138
Rafael Espindola [Mon, 25 May 2015 14:00:56 +0000 (14:00 +0000)]
Move Ordinal from MCSectionData to MCSection. NFC.
Part of the work to merge MCSectionData and MCSection.
llvm-svn: 238137
Rafael Espindola [Mon, 25 May 2015 13:50:21 +0000 (13:50 +0000)]
Simplify boolean conditional return statements.
Patch by Richard <legalize@xmission.com>
llvm-svn: 238134
Benjamin Kramer [Mon, 25 May 2015 13:28:03 +0000 (13:28 +0000)]
Refactor: Simplify boolean conditional return statements in llvm/lib/DebugInfo/DWARF
Use clang-tidy to simplify boolean conditional return statements. Patch by
Richard Thomson <legalize@xmission.com>!
Differential Revision: http://reviews.llvm.org/D9972
llvm-svn: 238132
Michael Kuperstein [Mon, 25 May 2015 12:35:25 +0000 (12:35 +0000)]
[X86] When pattern-matching scalar FMA3 intrinsics, don't re-arrange the first and second operands.
The semantics of the scalar FMA intrinsics are that the high vector elements are copied from the first source.
The existing pattern switches src1 and src2 around, to match the "213" order, which ends up tying the original src2 to the dest. Since the actual scalar fma3 instructions copy the high elements from the dest register, the wrong values are copied.
This modifies the pattern to leave src1 and src2 in their original order.
Differential Revision: http://reviews.llvm.org/D9908
llvm-svn: 238131
Elena Demikhovsky [Mon, 25 May 2015 11:33:13 +0000 (11:33 +0000)]
Added promotion to EXTRACT_SUBVECTOR operand.
I encountered with this case in one of KNL tests for i1 vectors.
v16i1 = EXTRACT_SUBVECTOR v32i1, x
llvm-svn: 238130
Alexander Musman [Mon, 25 May 2015 11:21:20 +0000 (11:21 +0000)]
Bug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0).
"1-4" specifiers are returned as numeric constants, not identifiers,
and should be treated as such. Currently pragma handler incorrectly
assumes that they are returned as identifiers.
Patch by Andrey Bokhanko.
Differential Revision: http://reviews.llvm.org/D9856
llvm-svn: 238129
Greg Clayton [Mon, 25 May 2015 02:58:29 +0000 (02:58 +0000)]
Quiet compiler warnings about virtual and override not being consistent.
llvm-svn: 238128
Greg Clayton [Mon, 25 May 2015 02:55:21 +0000 (02:55 +0000)]
Fix compiler warnings regarding size_t not always being 64 bit in the printf.
llvm-svn: 238127
NAKAMURA Takumi [Mon, 25 May 2015 01:43:34 +0000 (01:43 +0000)]
Reformat.
llvm-svn: 238126
NAKAMURA Takumi [Mon, 25 May 2015 01:43:23 +0000 (01:43 +0000)]
Prune CRLFs.
llvm-svn: 238125
Chandler Carruth [Mon, 25 May 2015 01:00:46 +0000 (01:00 +0000)]
[Unroll] Switch from an eagerly populated SCEV cache to one that is
lazily built.
Also, make it a much more generic SCEV cache, which today exposes only
a reduced GEP model description but could be extended in the future to
do other profitable caching of SCEV information.
llvm-svn: 238124
Duncan P. N. Exon Smith [Sun, 24 May 2015 17:03:15 +0000 (17:03 +0000)]
AsmPrinter: Make DIEValue::Ty private, NFC
llvm-svn: 238123
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:58:59 +0000 (16:58 +0000)]
AsmPrinter: Avoid creating symbols in DwarfStringPool
Stop creating symbols we don't need in `DwarfStringPool`. The consumers
only call `DwarfStringPoolEntryRef::getSymbol()` when DWARF is
relocatable, so this just stops creating the unused symbols when it's
not. This drops memory usage from 851 MB to 845 MB, around 0.7%.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 238122
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:54:59 +0000 (16:54 +0000)]
AsmPrinter: Prune an include, NFC
llvm-svn: 238121
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:51:29 +0000 (16:51 +0000)]
AsmPrinter: Remove dead code, NFC
llvm-svn: 238120
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:48:54 +0000 (16:48 +0000)]
AsmPrinter: Avoid EmitLabelDifference() in DwarfAccelTable
Mint a new function, `AsmPrinter::emitDwarfStringOffset()`, which takes
a `DwarfStringPoolEntryRef`. When DWARF is relocatable across sections,
this defers to `emitSectionOffset()` and emits the `MCSymbol`;
otherwise, just emit the offset directly, without using any intermediate
symbols.
`EmitLabelDifference()` is already optimized to emit absolute label
differences cheaply when possible, so there aren't any major memory
savings here (853 MB down to 851 MB, or 0.2%). However, it prepares for
making the `MCSymbol`s in the `DwarfStringPool` optional.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 238119
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:44:32 +0000 (16:44 +0000)]
AsmPrinter: Use DwarfStringPoolEntry in DwarfAccelTable, NFC
This is just an API change, but it prepares to stop using
`EmitLabelDifference()` when possible.
llvm-svn: 238118
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:40:47 +0000 (16:40 +0000)]
AsmPrinter: Make DIEString small
Expose the `DwarfStringPool` entry in a header, and store a pointer to
it directly in `DIEString`. Instead of choosing at creation time how to
emit it, use the `dwarf::Form` to determine that at emission time.
Besides avoiding the other `DIEValue`, this shaves two pointers off of
`DIEString`; the data is now a single pointer. This is a nice cleanup
on its own -- and drops memory usage from 861 MB down to 853 MB, around
0.9% -- but it's also preparation for passing `DIEValue`s by value.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 238117
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:33:33 +0000 (16:33 +0000)]
AsmPrinter: Extract DwarfStringPoolEntry from DwarfStringPool, NFC
Extract out `DwarfStringPoolEntry` and `DwarfStringPoolRef` from
`DwarfStringPool` so that downstream users can start using
`DwarfStringPool::getEntry()` directly. This will allow users to delay
the decision between emitting a symbol or an offset until later.
llvm-svn: 238116
Simon Atanasyan [Sun, 24 May 2015 16:19:27 +0000 (16:19 +0000)]
[ELF] Fix lld when no unique sections is used
Original patch of Shankar Easwaran with additional test case.
The yaml2obj does not allow to create an object file with non-unique
sections names so the fix uses a binary input object file in the test
case.
llvm-svn: 238115
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:14:59 +0000 (16:14 +0000)]
AsmPrinter: Emit the DwarfStringPool offset directly when possible
Change `DwarfStringPool` to calculate byte offsets on-the-fly, and
update `DwarfUnit::getLocalString()` to use a `DIEInteger` instead of a
`DIEDelta` when Dwarf doesn't use relocations (i.e., Mach-O). This
eliminates another call to `EmitLabelDifference()`, and drops memory
usage from 865 MB down to 861 MB, around 0.5%.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 238114
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:10:35 +0000 (16:10 +0000)]
DebugInfo: Clarify test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
This test was relying on the numbering of preceding .set directives, but
an upcoming commit is going to remove some of them. Make the CHECKs
more nuanced.
llvm-svn: 238113
Duncan P. N. Exon Smith [Sun, 24 May 2015 16:06:08 +0000 (16:06 +0000)]
AsmPrinter: Refactor DwarfStringPool::getEntry(), NFC
Move `DwarfStringPool`'s `getEntry()` to the header (and make it a
member function) in preparation for calculating symbol offsets
on-the-fly.
llvm-svn: 238112
Vince Harron [Sun, 24 May 2015 13:24:31 +0000 (13:24 +0000)]
Remove log2 dependency when building against Android API-9 SDK
Android's API-9 SDK is missing log2 builtins. A previous commit added
support for building against this API revision but this requires log2l
to be present. (And it doesn't seem to be defined, despite being in
the headers.)
Author: pasaulais (Pierre-Andre Saulais)
Differential Revision: http://reviews.llvm.org/D9884
llvm-svn: 238111
Renato Golin [Sun, 24 May 2015 11:18:44 +0000 (11:18 +0000)]
Move parseSubArch to ARMTargetParser. NFC
Using getCanonicalArchName() is the right way to parse ARM arch names.
Mapping ARMTargetParser IDs to Triple Arch IDs is temporary, until they
are merged into a TargetDescription class.
This was the last LLVM FIXME to move things to ARMTargetParser. Now on
to Clang and beyond.
llvm-svn: 238110
Evgeniy Stepanov [Sun, 24 May 2015 02:47:59 +0000 (02:47 +0000)]
[msan] Mprotect all inaccessible memory regions.
Fix 2 bugs in memory mapping setup:
- the invalid region at offset 0 was not protected because mmap at
address 0 fails with EPERM on most Linux systems. We did not
notice this because the check condition was flipped: the code was
checking that mprotect has failed. And the test that was supposed
to catch this was weakened by the mitigations in the mmap
interceptor.
- when running without origins, the origin shadow range was left
unprotected.
The new test ensures that mmap w/o MAP_FIXED always returns valid
application addresses.
llvm-svn: 238109
Matt Arsenault [Sun, 24 May 2015 00:51:27 +0000 (00:51 +0000)]
Add target hook to allow merging stores of nonzero constants
On GPU targets, materializing constants is cheap and stores are
expensive, so only doing this for zero vectors was silly.
Most of the new testcases aren't optimally merged, and are for
later improvements.
llvm-svn: 238108
Davide Italiano [Sat, 23 May 2015 23:08:28 +0000 (23:08 +0000)]
[Support/ELF] Add missing DF_1_XXX bits.
In preparation for adding support for decoding DF_FLAGS_1 to
llvm-readobj.
Differential Revision: http://reviews.llvm.org/D9955
Reviewed by: echristo
llvm-svn: 238107