Rafael Espindola [Thu, 4 Jun 2015 15:01:05 +0000 (15:01 +0000)]
Disassemble the start of sections even if there is no symbol there.
We already handled a section with no symbols, extend that to also handle a
section with symbols that don't include the section start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239039
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 4 Jun 2015 13:48:23 +0000 (13:48 +0000)]
Don't create a MIN/MAX node if the underlying compare has more than one use.
If the compare in a select pattern has another use then it can't be removed, so we'd just
be creating repeated code if we created a min/max node.
Spotted by Matt Arsenault!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239037
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 Jun 2015 13:12:25 +0000 (13:12 +0000)]
Replace string GNU Triples with llvm::Triple in MCAsmInfo subclasses and create*AsmInfo(). NFC.
Summary:
This is the first of several patches to eliminate StringRef forms of GNU
triples from the internals of LLVM. After this is complete, GNU triples
will be replaced by a more authoratitive representation in the form of
an LLVM TargetTuple.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: ted, llvm-commits, rengolin, jholewinski
Differential Revision: http://reviews.llvm.org/D10236
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239036
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 Jun 2015 12:51:20 +0000 (12:51 +0000)]
Include BPF target in CMake builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239035
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 4 Jun 2015 11:45:32 +0000 (11:45 +0000)]
Tidy code in InstrProfiling.cpp. NFC.
Removed the redundant "llvm::" from class names in InstrProfiling.cpp
clang-format is ran on the changes.
Patch from Betul Buyukkurt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239034
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 4 Jun 2015 09:09:53 +0000 (09:09 +0000)]
[C API] Add LLVMStructGetTypeAtIndex.
Patch by deadalnix (Amaury SECHET).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239029
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 4 Jun 2015 07:49:56 +0000 (07:49 +0000)]
AVX-512: I brought back vector-shuffle-512-v8.ll test.
I re-generated it after all AVX-512 shuffle optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239026
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Jun 2015 07:40:16 +0000 (07:40 +0000)]
[TableGen] Replace a couple if/else chains with a switch. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239023
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Jun 2015 07:40:14 +0000 (07:40 +0000)]
[TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239022
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Jun 2015 07:40:12 +0000 (07:40 +0000)]
[TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239021
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 Jun 2015 07:23:38 +0000 (07:23 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239019
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 4 Jun 2015 07:21:42 +0000 (07:21 +0000)]
Make the test introduced in r239015 more targeted.
We don't need to go through LSR to trigger this bug. Instead,
hand-craft a tricky GEP and get the constant folder to hack on it when
parsing the IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239017
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 4 Jun 2015 07:07:13 +0000 (07:07 +0000)]
AVX-512: added all SKX forms of VPERMW/D/Q instructions.
Added all forms of VPERMPS/PD instrcuctions.
Added encoding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239016
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 4 Jun 2015 07:01:56 +0000 (07:01 +0000)]
[ConstantFold] Don't skip the first gep index when folding geps
We neglected to check if the first index made the GEP ineligible for
'inbounds'.
This fixes PR23753.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239015
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 4 Jun 2015 07:01:29 +0000 (07:01 +0000)]
Removed {}, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239014
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Jun 2015 05:59:23 +0000 (05:59 +0000)]
Bring back r239006 with a fix.
The fix is just that getOther had not been updated for packing the st_other
values in fewer bits and could return spurious values:
- unsigned Other = (getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift;
+ unsigned Other = (getFlags() & (0x7 << ELF_STO_Shift)) >> ELF_STO_Shift;
Original message:
Pack the MCSymbolELF bit fields into MCSymbol's Flags.
This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.
While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239012
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Jun 2015 05:51:13 +0000 (05:51 +0000)]
Add testcase that would crash before the previous revert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239011
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Jun 2015 05:00:12 +0000 (05:00 +0000)]
Revert "Pack the MCSymbolELF bit fields into MCSymbol's Flags."
This reverts commit r239006.
I am debugging the powerpc failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239010
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Jun 2015 02:32:20 +0000 (02:32 +0000)]
Pack the MCSymbolELF bit fields into MCSymbol's Flags.
This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.
While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239006
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 4 Jun 2015 02:03:15 +0000 (02:03 +0000)]
[PM/AA] Start refactoring AliasAnalysis to remove the analysis group and
port it to the new pass manager.
All this does is extract the inner "location" class used by AA into its
own full fledged type. This seems *much* cleaner as MemoryDependence and
soon MemorySSA also use this heavily, and it doesn't make much sense
being inside the AA infrastructure.
This will also make it much easier to break apart the AA infrastructure
into something that stands on its own rather than using the analysis
group design.
There are a few places where this makes APIs not make sense -- they were
taking an AliasAnalysis pointer just to build locations. I'll try to
clean those up in follow-up commits.
Differential Revision: http://reviews.llvm.org/D10228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239003
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 4 Jun 2015 01:32:35 +0000 (01:32 +0000)]
make reciprocal estimate code generation more flexible by adding command-line options (3rd try)
The first try (r238051) to land this was reverted due to ExecutionEngine build failure;
that was hopefully addressed by r238788.
The second try (r238842) to land this was reverted due to BUILD_SHARED_LIBS failure;
that was hopefully addressed by r238953.
This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.
The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.
Differential Revision: http://reviews.llvm.org/D8982
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239001
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 4 Jun 2015 01:20:04 +0000 (01:20 +0000)]
R600: Re-enable sub-reg liveness
The bug in the R600 backend that this uncovered has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238999
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Jun 2015 00:47:43 +0000 (00:47 +0000)]
Remove MCELFSymbolFlags.h. It is now internal to MCSymbolELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238996
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 3 Jun 2015 22:36:17 +0000 (22:36 +0000)]
Improve test added in r238481.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238985
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 3 Jun 2015 22:19:36 +0000 (22:19 +0000)]
[Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.
Summary:
Now users don't have to manually deal with getFirstLoadCommandInfo() /
getNextLoadCommandInfo(), calculate the number of load segments, etc.
No functionality change.
Test Plan: regression test suite
Reviewers: rafael, lhames, loladiro
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238983
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 21:52:06 +0000 (21:52 +0000)]
Remember if a weakref of a symbol has been used.
This avoids yet another last minute patching of the binding.
While at it, also simplify the weakref implementation a bit by not walking
past it in the expression evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238982
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 21:41:59 +0000 (21:41 +0000)]
Store whether a symbol is a comdat signature in MCSymbolELF.
With this getBinging can now return the correct answer for all cases not
involving a .symver and the elf writer doesn't need to patch it last minute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238980
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 21:30:10 +0000 (21:30 +0000)]
Record in a MCSymbolELF if it has been used in a relocation.
No functionality change, just saves an on the side map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238979
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 21:23:21 +0000 (21:23 +0000)]
Simplify the logic in ELFObjectWriter::isInSymtab. NFC.
_GLOBAL_OFFSET_TABLE_ is not magical and we can now directly check for a
symbol never getting an explicit binding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238978
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 21:18:03 +0000 (21:18 +0000)]
Convert BindingExplicitlySet into a MCSymbolELF field.
I will pack it better in a followup patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238975
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 3 Jun 2015 20:29:24 +0000 (20:29 +0000)]
Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.
With a couple more constructors that GCC thinks are necessary.
Original commit message:
[dsymutil] Accept a YAML debug map as input instead of a binary.
To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238959
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 3 Jun 2015 20:04:05 +0000 (20:04 +0000)]
R600/SI: Fix tests with triples in them
Only set the triple from the command line options.
Some of these were still testing SI features and using the
old r600-- triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238958
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Jun 2015 19:07:51 +0000 (19:07 +0000)]
add missing dependency on Target lib for tools
This was exposed by r238842 (which was reverted by r238900)
when doing a CMake build with -DBUILD_SHARED_LIBS=ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238953
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 19:03:11 +0000 (19:03 +0000)]
Remove getOrCreateSymbolData. There is no MCSymbolData anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238952
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 3 Jun 2015 18:26:52 +0000 (18:26 +0000)]
RuntimeDyld: override EH frame registration with trivial version.
llvm-rtdyld was relying on the default memory manager's EH frame registration,
which is host-dependent rather than target-dependent. As a result, big-endian
ELF Mips EH frames were being registered on OS X (and elsewhere). This is a
really bad idea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238951
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Jun 2015 18:00:45 +0000 (18:00 +0000)]
[Hexagon] Test doesn't work on all platforms. At any rate the uninitialized variable issue was fixed. Removing re-registering ASM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238949
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Jun 2015 17:34:16 +0000 (17:34 +0000)]
[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make sure it is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238947
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 3 Jun 2015 17:08:42 +0000 (17:08 +0000)]
Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."
This reverts commit r238941 while I figure out the bot issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238943
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 3 Jun 2015 16:57:16 +0000 (16:57 +0000)]
[dsymutil] Accept a YAML debug map as input instead of a binary.
To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238941
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 3 Jun 2015 16:57:12 +0000 (16:57 +0000)]
[dsymutil] Replace -parse-only option with -dump-debug-map
As the serialized debug map is becoming a first class citizen, a way
to cleanly dump it is required. We used -parse-only combined with
-v for that purpose before, but it dumps a lot of unrelated debug
stuff. Dumping the debug map was the only use of the -parse-only flag
anyway, so replace it with a more useful option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238940
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 3 Jun 2015 16:57:07 +0000 (16:57 +0000)]
[dsymutil] Reflow option declarations to be more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238939
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 Jun 2015 16:30:24 +0000 (16:30 +0000)]
ARM: Thumb2 LDRD/STRD supports independent input/output regs
The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.
Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.
Differential Revision: http://reviews.llvm.org/D9694
Recommiting after the revert in r238821, the buildbot still failed with
the patch removed so there seems to be another reason for the breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238935
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 3 Jun 2015 16:22:12 +0000 (16:22 +0000)]
Fix typo in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238933
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 3 Jun 2015 16:18:58 +0000 (16:18 +0000)]
[Statepoints] Mark statepoint intrinsic with Throws attribute
Differential Revision: http://reviews.llvm.org/D10215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238932
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 3 Jun 2015 14:17:18 +0000 (14:17 +0000)]
[arm] Fix r238921. We must handle Constraint_i too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238925
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Wed, 3 Jun 2015 13:41:48 +0000 (13:41 +0000)]
re-apply 238809
AVX-512: Implemented GETEXP instruction for KNL and SKX
Added rounding mode modifier for SQRTPS/PD
Added tests for encoding and intrinsics.
CR:
http://reviews.llvm.org/D9991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238923
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 3 Jun 2015 12:33:56 +0000 (12:33 +0000)]
[arm] Distinguish the /U[qytnms]/, 'Uv', 'Q', and 'm' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
Of these, /U[qytnms]/ do not have backend tests but are accepted by clang.
No functional change intended.
Reviewers: t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D8203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238921
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 3 Jun 2015 12:05:03 +0000 (12:05 +0000)]
AVX-512: More code improvements in shuffles, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238919
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 3 Jun 2015 11:21:01 +0000 (11:21 +0000)]
AVX-512: VSHUFPD instruction selection - code improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238918
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 3 Jun 2015 10:56:40 +0000 (10:56 +0000)]
AVX-512: Implemented SHUFF32x4/SHUFF64x2/SHUFI32x4/SHUFI64x2 instructions for SKX and KNL.
Added tests for encoding.
By Igor Breger (igor.breger@intel.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238917
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 3 Jun 2015 10:30:57 +0000 (10:30 +0000)]
X86: Added MPX feature and bound registers.
Intel® Memory Protection Extensions (Intel® MPX) is a new feature in Skylake.
It is a part of KNL and SKX sets. It is also a part of Skylake client.
I added definition of %bnd0 - %bnd3 registers, each register is a pair of 64-bit integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238916
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 3 Jun 2015 10:27:28 +0000 (10:27 +0000)]
Re-commit r238838, r238844 with fix for host/target endian mismatch and windows buildbot.
The windows buildbot originally failed because the check expressions are
evaluated as 64-bit values, even for 32-bit symbols. Fixed this by comparing
bottom 32-bits of the expressions.
The host/target endian mismatch issue is that it's invalid to read/write target
values using a host pointer without taking care of endian differences between
the target and host. Most (if not all) instances of
reinterpret_cast<uint32_t*>() in the RuntimeDyld are examples of this bug.
This has been fixed for Mips using the endian aware read/write functions.
The original commits were:
r238838:
[mips] Add RuntimeDyld tests for currently supported O32 relocations.
Reviewers: petarj, vkalintiris
Reviewed By: vkalintiris
Subscribers: vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D10126
r238844:
[mips][mcjit] Add support for R_MIPS_PC32.
Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.
Also fixed a nearby typo.
Reviewers: petarj, vkalintiris
Reviewed By: vkalintiris
Subscribers: vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D10127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238915
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Wed, 3 Jun 2015 08:51:30 +0000 (08:51 +0000)]
Remove stray semicolon. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238908
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Jun 2015 08:32:36 +0000 (08:32 +0000)]
[X86] Removed (unused) FSRL x86 operation
This patch removes the old X86ISD::FSRL op - which allowed float vectors to use the byte right shift operations (causing a domain switch....).
Since the refactoring of the shuffle lowering code this no longer has any use.
Differential Revision: http://reviews.llvm.org/D10169
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238906
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 05:39:59 +0000 (05:39 +0000)]
This reverts commit r238838, r238844 and r238888.
Trying to bring back a windows bot:
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/1224/steps/ninja%20check%202/logs/FAIL%3A%20LLVM%3A%3AELF_O32_PIC_relocations.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238903
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 05:32:44 +0000 (05:32 +0000)]
Revert "make reciprocal estimate code generation more flexible by adding command-line options (2nd try)"
This reverts commit r238842.
It broke -DBUILD_SHARED_LIBS=ON build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238900
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 05:14:22 +0000 (05:14 +0000)]
Fix the interpretation of a 0 st_name.
The ELF spec is very clear:
-----------------------------------------------------------------------------
If the value is non-zero, it represents a string table index that gives the
symbol name. Otherwise, the symbol table entry has no name.
--------------------------------------------------------------------------
In particular, a st_name of 0 most certainly doesn't mean that the symbol has
the same name as the section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238899
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 04:48:06 +0000 (04:48 +0000)]
Move to llvm-objdump a large amount of code to that is only used there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238898
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 3 Jun 2015 02:48:09 +0000 (02:48 +0000)]
llvm-cov: Make llvm-cov --version DTRT
In r233132 we started requiring a subcommand in llvm-cov, but this
made `llvm-cov --version` invalid, which is kind of silly. Print
version information in this case, as most people would expect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238897
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 3 Jun 2015 01:30:13 +0000 (01:30 +0000)]
[BitcodeReader] Diagnose type mismatches with aliases
Bug found with AFL fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238895
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 3 Jun 2015 01:30:08 +0000 (01:30 +0000)]
[Bitcode] Minimize the test to not conflict with others
Source for the test:
@bloom = global <3 x i32> <i32 0, i32 1, i32 42>
Plus bit twiddling to set the vector numelts to 0 (in the bc file).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238894
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 3 Jun 2015 00:05:30 +0000 (00:05 +0000)]
[BitcodeReader] Check vector size before trying to create a VectorType
Bug found with AFL fuzz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238891
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Jun 2015 00:02:40 +0000 (00:02 +0000)]
Avoid a call to getOrCreateSymbol when we already have the symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238890
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 2 Jun 2015 23:56:53 +0000 (23:56 +0000)]
Int128 is also a built-in preconstructed type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238889
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 23:20:40 +0000 (23:20 +0000)]
[mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mips
The test exposes pre-existing bugs when the endian of the host and target do
not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238888
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Jun 2015 22:52:13 +0000 (22:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238887
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 2 Jun 2015 22:33:39 +0000 (22:33 +0000)]
[NFC] Fix spelling in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238884
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 2 Jun 2015 22:33:37 +0000 (22:33 +0000)]
[RewriteStatepointsForGC] Strip deref info after rewriting.
Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logical references.
Logical dereferencability does not imply physical dereferencability and
after RewriteStatepointsForGC has run any attributes that imply
dereferencability of the logical references need to be stripped.
This current approach is conservative, and can be made more precise
later if needed. For starters, we need to strip dereferencable
attributes only from pointers that live in the GC address space.
Reviewers: reames, pgavlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238883
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 2 Jun 2015 22:33:34 +0000 (22:33 +0000)]
[NFCI] Change RewriteStatepointsForGC to a ModulePass.
Summary:
A later change that has RewriteStatepointsForGC change function
attributes throughout the module depends on this.
Reviewers: reames, pgavlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238882
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 2 Jun 2015 22:33:30 +0000 (22:33 +0000)]
[SelectionDAG] Fix PR23603.
Summary:
LLVM's MI level notion of invariant_load is different from LLVM's IR
level notion of invariant_load with respect to dereferenceability. The
IR notion of invariant_load only guarantees that all *non-faulting*
invariant loads result in the same value. The MI notion of invariant
load guarantees that the load can be legally moved to any location
within its containing function. The MI notion of invariant_load is
stronger than the IR notion of invariant_load -- an MI invariant_load is
an IR invariant_load + a guarantee that the location being loaded from
is dereferenceable throughout the function's lifetime.
Reviewers: hfinkel, reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238881
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Jun 2015 21:30:13 +0000 (21:30 +0000)]
Pass a MCSymbolELF to a few ELF only functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238868
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:08 +0000 (21:25 +0000)]
[IR/AsmWriter] Output escape sequences if the first character isdigit()
If the first character in a metadata attachment's name is a digit, it has
to be output using an escape sequence, otherwise it's not valid text IR.
Removed an over-zealous assert from LLVMContext which didn't allow this.
The rule should only apply to text IR. Actual names can have any sequence
of non-NUL bytes.
Also added some documentation on accepted names.
Bug found with AFL fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238867
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:03 +0000 (21:25 +0000)]
CHECK-LABEL-ize test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238866
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:00 +0000 (21:25 +0000)]
clang-format a few functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238865
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Jun 2015 20:38:46 +0000 (20:38 +0000)]
Merge MCELF.h into MCSymbolELF.h.
Now that we have a dedicated type for ELF symbol, these helper functions can
become member function of MCSymbolELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238864
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 20:32:50 +0000 (20:32 +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.
Previous attempts at committing this broke the buildbots due to bugs in IAS.
These bugs have now been fixed so trying again.
Reviewers: petarj
Reviewed By: petarj
Subscribers: srhines, joerg, tberghammer, llvm-commits
Differential Revision: http://reviews.llvm.org/D9669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238863
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 2 Jun 2015 18:37:20 +0000 (18:37 +0000)]
AArch64: fix typo in SMIN far atomics and add tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238858
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 2 Jun 2015 17:17:44 +0000 (17:17 +0000)]
DebugInfo: Really support 2^16 arguments in a subprogram
As a follow-up to r235955, actually support up to 65535 arguments in a
subprogram. r235955 missed assembly support, having only tested the new
limit via C++ unit tests. Code patch by Amjad Aboud.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238854
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 2 Jun 2015 17:13:25 +0000 (17:13 +0000)]
DebugInfo: Rename testcases from MD* to DI*, NFC
As a follow-up to r236120, rename testcases to match the new names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238853
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 15:28:29 +0000 (15:28 +0000)]
[mips][mcjit] Add support for R_MIPS_PC32.
Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.
Also fixed a nearby typo.
Reviewers: petarj, vkalintiris
Reviewed By: vkalintiris
Subscribers: vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D10127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238844
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 2 Jun 2015 15:28:27 +0000 (15:28 +0000)]
Push constness through LoopInfo::isLoopHeader and clean it up a bit.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238843
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 2 Jun 2015 15:28:15 +0000 (15:28 +0000)]
make reciprocal estimate code generation more flexible by adding command-line options (2nd try)
The first try (r238051) to land this was reverted due to bot failures
that were hopefully addressed by r238788.
This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.
The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.
Differential Revision: http://reviews.llvm.org/D8982
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238842
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 15:01:25 +0000 (15:01 +0000)]
[mips] Add RuntimeDyld tests for currently supported O32 relocations.
Reviewers: petarj, vkalintiris
Reviewed By: vkalintiris
Subscribers: vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D10126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238838
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 2 Jun 2015 14:12:54 +0000 (14:12 +0000)]
AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lowering for all these forms.
Added tests for encoding.
By Igor Breger (igor.breger@intel.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238834
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 2 Jun 2015 13:43:18 +0000 (13:43 +0000)]
AVX-512: Shorten implementation of lowerV16X32VectorShuffle()
using lowerVectorShuffleWithSHUFPS() and other shuffle-helpers routines.
Added matching of VALIGN instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238830
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Tue, 2 Jun 2015 13:14:46 +0000 (13:14 +0000)]
[mips] Add support for dynamic stack realignment.
Summary:
With this change we are able to realign the stack dynamically, whenever it
contains objects with alignment requirements that are larger than the
alignment specified from the given ABI.
We have to use the $fp register as the frame pointer when we perform
dynamic stack realignment. In complex stack frames, with variably-sized
objects, we reserve additionally the callee-saved register $s7 as the
base pointer in order to reference locals.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8633
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238829
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Jun 2015 12:05:27 +0000 (12:05 +0000)]
Simplify now that we always use an alignment of 2 for ELF files.
This saves 123144 bytes out of llvm-nm on powerpc64le.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238824
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 2 Jun 2015 11:47:30 +0000 (11:47 +0000)]
Revert "ARM: Thumb2 LDRD/STRD supports independent input/output regs"
This reverts commit r238795, as it broke the Thumb2 self-hosting buildbot.
Since self-hosting issues with Clang are hard to investigate, I'm taking the
liberty to revert now, so we can investigate it offline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238821
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Sukharev [Tue, 2 Jun 2015 10:58:41 +0000 (10:58 +0000)]
[AArch64] Add v8.1a atomic instructions
Patch by: Tom Coxon
Reviewers: t.p.northover
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238818
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 2 Jun 2015 10:34:10 +0000 (10:34 +0000)]
[mips] [IAS] Reformat mips-expansions.s. NFC.
Summary:
Make mips-expansions.s more readable by grouping the instructions with their respective CHECK's.
This test is going to get a lot bigger soon and it will become essentially unreadable if the current formatting is kept.
I've also made the comments more useful and accurate, and I've restricted the RUN lines to under 80 columns.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238817
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 10:09:08 +0000 (10:09 +0000)]
[mips] Test both %dtprel_hi and %dtprel_lo instead of testing %dtprel_hi twice.
The second %dtprel_hi is used on an addiu so it looks like a copy/paste error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238815
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 2 Jun 2015 10:02:00 +0000 (10:02 +0000)]
[mips] Expand tabs in test/MC/Mips/mips-relocations.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238814
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 2 Jun 2015 09:48:04 +0000 (09:48 +0000)]
[mips] [IAS] Add support for the .set softfloat/hardfloat directives.
Summary: These directives are used to set the current value of the SoftFloat feature.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits, mpf
Differential Revision: http://reviews.llvm.org/D9074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238813
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 2 Jun 2015 08:28:57 +0000 (08:28 +0000)]
AVX-512: Implemented VFIXUPIMMSD and VFIXUPIMMSS instructions for KNL
Implemented DAG lowering for all these forms.
Added tests for encoding.
By Igor Breger (igor.breger@intel.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238811
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Tue, 2 Jun 2015 07:45:19 +0000 (07:45 +0000)]
revert 238809
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238810
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Tue, 2 Jun 2015 07:18:14 +0000 (07:18 +0000)]
AVX-512: Implemented GETEXP instruction for KNL and SKX
Added rounding mode modifier for SQRTPS/PD
Added tests for encoding and intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238809
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 2 Jun 2015 06:19:28 +0000 (06:19 +0000)]
[TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238808
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 2 Jun 2015 06:19:25 +0000 (06:19 +0000)]
Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238807
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 2 Jun 2015 04:15:57 +0000 (04:15 +0000)]
[TableGen] Rename ListInit::getSize to just 'size' to be more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238806
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 2 Jun 2015 04:15:51 +0000 (04:15 +0000)]
[TableGen] Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238805
91177308-0d34-0410-b5e6-
96231b3b80d8