Commit Graph

96670 Commits

Author SHA1 Message Date
Jiangning Liu
dd518bcc9d Implement aarch64 neon instruction set AdvSIMD (3V elem).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191944 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 09:20:44 +00:00
Jin-Gu Kang
443f62e804 Test commit to check e-mail address. Please discard this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191942 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 06:53:57 +00:00
Craig Topper
596cfd045f Revert r191940 to see if it fixes the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 05:52:17 +00:00
Craig Topper
d356295678 Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 05:22:20 +00:00
David Blaikie
c32f2332b0 DebugInfo: Fix ordering of members after r191928
In the case (shown in the attached test) where a member function
definition was emitted into debug info the following could occur:

1) build the debug info for the member function definition
2) in (1), build the debug info for the member function declaration
3) construct and add the member function declaration DIE
4) add it to its context
5) build its context (the type it is a member of)
6) construct the members and add them to the type
7) except don't add member functions because "getOrCreateSubprogram"
adds the function to its parent anyway
8) except we're only partway through building this subprogram
declaration so it hasn't been added yet - but we returned the partially
constructed DIE (since it's already in the MDNode->DIE mapping to avoid
infinitely recursing trying to create the member function DIE)
9) once the type is constructed, add the member function to it
10) now the members are out of order (the member function being defined
is listed as the last member, even though it was declared as the first)

To avoid this, construct the context of the subprogram DIE before we
query to see if it exists. That way we never end up creating it before
creating its context and ending up in this situation.

Alternatively, the type construction that visits/builds all the members
could call something like getOrCreateSubprogram, but that doesn't ever
do the "add to context" step. Then the type building code would always
be responsible for adding members (and the subprogram "addToContextDIE"
would no-op because the context building would have added the subprogram
declaration to the type/context DIE already).

(the test cases updated were overly-sensitive to offsets or abbreviation
numbers. We don't have a nice way to make these tests more robust as yet
- multiline FileCheck matches would be required)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191939 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 01:39:59 +00:00
Andrew Kaylor
b868e9101c Adding support and tests for multiple module handling in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191938 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 00:49:38 +00:00
Richard Mitton
7c9659a3b2 Fixed a bug with section names containing special characters.
Changed the dwarf aranges code to not use getLabelEndName, as it turns out it's not reliable to call that given user-defined section names. Section names can have characters in that aren't representable as symbol names.

The dwarf-aranges test case has been updated to include a special character, to check this.

This fixes pr17416.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191932 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:07:08 +00:00
Owen Anderson
03e84c9df9 Pull fptrunc's upwards through selects when one of the select's selectands was a constant. This has a number of benefits, including producing small immediates (easier to materialize, smaller constant pools) as well as being more likely to allow the fptrunc to fuse with a preceding instruction (truncating selects are unusual).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 21:08:05 +00:00
David Blaikie
e5830c4e26 DebugInfo: Avoid redundantly adding child DIEs to parents.
DIE::addChild had a shortcircuit that silently no-op'd when a child was
readded to the same parent. This hid some quirky/redundant code in
DwarfDebug/CompileUnit. By removing that functionality and replacing it
with an assert I was able to find and cleanup those cases, mostly
centering around adding members to types in various circumstances.

1) The original oddity I noticed while working on type units (which
actually was helping me in the short term, by accident) was the
addToContextOwner call in constructTypeDIE. This call was completely
bogus (why was it only done for non-virtual types? what relevance does
that have at all) and redundant with the more uniform addToContextOwner
made in getOrCreateTypeDIE.

2) If a member function definition was visited (createSubprogramDIE), it
would attempt to build the member function declaration. The declaration
DIE would then be added to its context, but in building the context (the
type for which this function is a member) the members of the type would
be added to the type automatically, so by the time the context was
constructed, the member function was already associated with it.

3) The same as (2) but without the member function being constructed
first. Whenever a type was constructed, the members would be created and
member functions would be created by getOrCreateSubprogramDIE - this
would lead to the subprogram being added to the (incomplete) type
already, then the general member-construction code would add it again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 20:07:20 +00:00
Matt Arsenault
cee51c4803 Rename DataLayout variables TD -> DL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191927 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 19:50:01 +00:00
Rafael Espindola
438900938c Optimize linkonce_odr unnamed_addr functions during LTO.
Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.

The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 18:29:09 +00:00
Matt Arsenault
1df59ef1aa Make gep i8* X, -(ptrtoint Y) transform work with address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 18:15:57 +00:00
Tom Roeder
d6370ad87d Test commit. Fixed a copy-paste error in the Makefile for lib/LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191918 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 18:05:12 +00:00
Quentin Colombet
4b3685de23 [llvm-c][Disassembler] When printing latency information, fall back to the
itinerary model in case the target does not supply a scheduling model.

By doing this, targets like cortex-a8 can benefit from the latency printing
feature added in r191859.

This part of <rdar://problem/14687488>. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191916 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 17:51:49 +00:00
Eric Christopher
45fae28db7 Make sure we emit a section for pubnames even if that section is
going to be empty. This is particularly important for the gnu
pubnames case since we're emitting a relocation to the section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 17:41:20 +00:00
Eric Christopher
7c9fc90c75 Fix cut and paste typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191914 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 17:41:16 +00:00
Benjamin Kramer
63fac20ec5 raw_fd_ostream: Be more verbose about the reason when opening a file fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 16:59:14 +00:00
Jin-Gu Kang
b70a05a871 Added checking code whehter target supports specific dag combining about rotate
or not. The corresponding dag patterns are as following:

"DAGCombier::MatchRotate" function in DAGCombiner.cpp
Pattern1
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotr x, (sub 32, y)))

pattern2
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotr x, (sub 32, y)))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 15:58:48 +00:00
Benjamin Kramer
4d63c8daec CaptureTracking: Plug a loophole in the "too many uses" heuristic.
The heuristic was added to avoid spending too much compile time A specially
crafted test case (PR17461, PR16474) with many uses on a select or bitcast
instruction can still trigger the slow case. Add a check for that case.

This only affects compile time, don't have a good way to test it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 13:24:02 +00:00
Logan Chien
20357662a0 [arm] Enhance the test case by checking .fpu directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191891 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 12:18:56 +00:00
Elena Demikhovsky
5086ff1320 AVX-512: Fixed encoding of VMOVQ instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191889 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 12:03:26 +00:00
Amara Emerson
6eef361b73 [ARM] Warn on deprecated IT blocks in v8 AArch32 assembly.
Patch by Artyom Skrobov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 09:31:51 +00:00
Alexey Samsonov
9d08d69fd4 Remove wild .debug_aranges entries generated from unimportant labels
r191052 added emitting .debug_aranges to Clang, but this
functionality is broken: it uses all MC labels added in DWARF Asm
printer, including the labels for build relocations between
different DWARF sections, like .Lsection_line or .Ldebug_loc0.

As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
attribute, .debug_aranges would also contain a range starting from 0x123,
breaking tools that rely on this section.

This patch fixes this by using only MC labels that corresponds to the
addresses in the user program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191884 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 08:54:43 +00:00
Craig Topper
198f1b340a Replace C++ style comment with a C style comment to satisfy some of the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191880 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 06:29:59 +00:00
Craig Topper
e3b0a9c51a Remove comma from the end of an enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191877 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 06:18:26 +00:00
Craig Topper
279d28265d Add XOP disassembler support. Fixes PR13933.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 05:17:48 +00:00
Craig Topper
dfd1014ec3 Remove duplicated test cases that occurred when I applied the same patch file to my model twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 04:27:14 +00:00
Craig Topper
fafe4bbd6c Add patterns for selecting TBM instructions from logical operations. Patch from Yunzhong Gao.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191871 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 04:16:45 +00:00
Pete Cooper
da750239bd Add v4f16 to supported value types.
This is useful for some ARM intrinsics such as VCVTN which does a <4 x float> <-> <4 x half> conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191870 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 03:29:21 +00:00
Rafael Espindola
75a641c910 Dispose the codegen even when just writing the bitcode file.
This makes it possible to add timers to the code generator and still use them
with -plugin-opt=emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191866 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 00:07:30 +00:00
Quentin Colombet
4897e26390 [llvm-c][Disassembler] When printing latency information, skip scheduling
classes that are marked as Variant as those require an MI to pass to
SubTargetInfo::resolveSchedClass.

This is part of <rdar://problem/14687488>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191864 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 23:11:47 +00:00
Matt Arsenault
407847f130 Don't use runtime bounds check between address spaces.
Don't vectorize with a runtime check if it requires a
comparison between pointers with different address spaces.
The values can't be assumed to be directly comparable.
Previously it would create an illegal bitcast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191862 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 22:38:17 +00:00
Andrew Kaylor
62faf2f9d0 Fixing lli-child-target build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 22:27:23 +00:00
Quentin Colombet
797f06e19b [llvm-c][Disassembler] Add an option to print latency information in
disassembled output alongside the instructions.
E.g., on a vector shuffle operation with a memory operand, disassembled
outputs are:
* Without the option:
    vpshufd $-0x79, (%rsp), %xmm0
    
* With the option:
    vpshufd $-0x79, (%rsp), %xmm0   ## Latency: 5

The printed latency is extracted from the schedule model available in the
disassembler context. Thus, this option has no effect if there is not a
scheduling model for the target.
This boils down to one may need to specify the CPU string, so that this
option could have an effect.

Note: Latency < 2 are not printed.

This part of <rdar://problem/14687488>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 22:07:57 +00:00
Benjamin Kramer
18b222a872 Add newline at eof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 21:58:02 +00:00
Richard Smith
d34a4d60f0 Pass the resolved lli-child-target executable name to execv, rather than
searching $PATH for it then blindly executing it from $PWD anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 21:33:12 +00:00
Matt Arsenault
55cfb52aa3 Fix missing CHECK-LABELs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 20:29:00 +00:00
Yi Jiang
d0132a7833 Apply slp vectorization on fully-vectorizable tree of height 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191852 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 20:20:39 +00:00
Matt Arsenault
7b7294c534 Fix debug printing spacing.
Fix missing newlines, missing and extra spaces in printed messages.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 20:04:29 +00:00
Matt Arsenault
5c86f12969 Fix comment grammar and capitalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191850 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 20:04:26 +00:00
Andrew Kaylor
b47c0108b3 Fix build problems with remote lli implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191848 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 19:26:16 +00:00
Benjamin Kramer
6623d050c6 SLPVectorizer: Make store chain finding more aggressive with GetUnderlyingObject.
This recursively strips all GEPs like the existing code. It also handles bitcasts and
other operations that do not change the pointer value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191847 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 19:06:06 +00:00
Andrew Kaylor
f18815607a Clean up lli execution code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191845 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 18:04:40 +00:00
Andrew Kaylor
56849e7a9d Fixing compile warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191844 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 18:00:34 +00:00
Andrew Kaylor
0ab5c6c16b Adding out-of-process execution support to lli.
At this time only Unix-based systems are supported.  Windows has stubs and should re-route to the simulated mode.

Thanks to Sriram Murali for contributions to this patch.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191843 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 17:12:36 +00:00
Tom Stellard
af7ae9d689 StructurizeCFG: Add dependency on LowerSwitch pass
Switch instructions were crashing the StructurizeCFG pass, and it's
probably easier anyway if we don't need to handle them in this pass.

Reviewed-by: Christian König <christian.koenig@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191841 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 17:04:59 +00:00
Tim Northover
ea246d6af8 MCJIT: skip some more new multi-module tests on unsupported platforms.
This should fix the i386 Darwin build-bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191840 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 16:11:07 +00:00
Vincent Lejeune
a2f1317f09 R600: Add a ldptr intrinsic to support MSAA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 16:00:33 +00:00
Rafael Espindola
656d2f8e07 Try harder to disable the LTO tests on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 15:47:30 +00:00
Chandler Carruth
dd5d86d992 Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 15:42:23 +00:00