Commit Graph

121515 Commits

Author SHA1 Message Date
Andrew Wilkins
f5148ebe0a [cmake] rework LLVM_LINK_LLVM_DYLIB option handling
Summary:
This diff attempts to address the concerns raised in
http://reviews.llvm.org/D12488.

We introduce a new USE_SHARED option to llvm_config,
which, if set, causes the target to be linked against
libLLVM.

add_llvm_utility now uniformly disables linking against
libLLVM. These utilities are not intended for distribution,
and this keeps the option handling more centralised.

llvm-shlib is now processes before any other "tools"
subdirectories, ensuring the libLLVM target is defined
before its dependents.

One main difference from what was requested: llvm_config
does not prune LLVM_DYLIB_COMPONENTS from the components
passed into explicit_llvm_config. This is because the "all"
component does something special, adding additional
libraries (namely libLTO). Adding the component libraries
after libLLVM should not be a problem, as symbols will be
resolved in libLLVM first.

Finally, I'm not really happy with the
DISABLE_LLVM_LINK_LLVM option, but I'm not sure of a
better way to get the following:
 - link all tools and shared libraries to libLLVM if
   LLVM_LINK_LLVM_DYLIB is set
 - some way of explicitly *not* doing so for utilities
   and libLLVM itself
Suggestions for improvement here are particularly welcome.

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12590

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246918 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 08:27:33 +00:00
Craig Topper
d2288b28e1 Fix build warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 04:49:44 +00:00
NAKAMURA Takumi
455c3d818a WinCOFFObjectWriter.cpp: Roll back TimeDateStamp along ENABLE_TIMESTAMPS.
We want a deterministic output. GNU AS leaves it zero.

FIXME: It may be optional by its user, like llc and clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:17:49 +00:00
Davide Italiano
537f16ebe4 [MC] Convert other MachO tests from macho-dump to llvm-readobj.
This commit accomplish two goals:
1) it's a step forward to deprecate macho-dump, now less than 40 tests
rely on it.

2) It tests all the MachO specific features introduced in llvm-readobj in
the following commits:  r246789, r246665, r246474.

While the conversion is mostly mechanical (I double-checked all the
tests output one by one, but still), a post-commit review is greatly
appreciated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246904 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:02:05 +00:00
Andrew Kaylor
b6a09c7428 Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:00:51 +00:00
Hal Finkel
6d7a4a2886 [PowerPC] Fix and(or(x, c1), c2) -> rlwimi generation
PPCISelDAGToDAG has a transformation that generates a rlwimi instruction from
an input pattern that looks like this:

  and(or(x, c1), c2)

but the associated logic does not work if there are bits that are 1 in c1 but 0
in c2 (these are normally canonicalized away, but that can't happen if the 'or'
has other users. Make sure we abort the transformation if such bits are
discovered.

Fixes PR24704.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246900 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 00:02:59 +00:00
Andrew Kaylor
b1b15ace48 Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:58:32 +00:00
Evgeniy Stepanov
4b83fd92f3 Fix passed env var name in lit for Android tests.
The variable is actually called ANDROID_SERIAL.
This was not exercised on the bots until today.
Should fix the sanitizer-x86_64-linux failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:52:04 +00:00
Andrew Kaylor
701765a22c Fixing bad test syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:47:34 +00:00
Andrew Kaylor
580f34a883 [WinEH] Teach SimplfyCFG to eliminate empty cleanup pads.
Differential Revision: http://reviews.llvm.org/D12434



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:39:40 +00:00
Kostya Serebryany
87e6608466 [libFuzzer] more accurate logic for traces, 80-char fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 22:32:25 +00:00
Davide Italiano
cdd5f6d41a [llvm-readobj] MachO: dump the correct field.
This was found while converting a test from macho-dump to llvm-readobj
and will once I commit the converted test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 20:43:00 +00:00
Yaron Keren
e0517c5848 Remove two unused includes and C++11 rangify for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246865 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 20:24:24 +00:00
Simon Pilgrim
51a8f7d972 [X86][AVX] Test tidyup + regeneration. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246863 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 19:47:56 +00:00
Peter Collingbourne
c8df682a2f Add powerpc64 to parallel.ll unsupported architecture list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246862 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 19:45:36 +00:00
Ben Craig
2354b37ae0 Adding full stops to comments
Also, test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 15:28:13 +00:00
Chad Rosier
7ab65d6098 Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246851 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 12:34:55 +00:00
Silviu Baranga
347db8255c Simplify testcase added in r246759. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 11:37:20 +00:00
David Majnemer
e9fc16d638 [MC] Replace comparison with isUInt<32>.
Casting to unsigned long can cause the time to get truncated to 32-bits,
making it appear to be a valid timestamp.  Just use isUInt<32> instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 07:22:36 +00:00
NAKAMURA Takumi
25059fcca0 WinCOFFObjectWriter.cpp: Appease a warning in checking std::time_t. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 05:19:37 +00:00
Richard Smith
c8dacf406f Fix APInt value initialization to give a zero value as any sane integer type
should, rather than giving a broken value that doesn't even zero/sign-extend
properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 04:08:36 +00:00
Steven Wu
123b024141 Fix the testcase in r246790
Using generic neon syntax to avoid test failure on apple platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 01:39:24 +00:00
Kostya Serebryany
c18fae603d [libFuzzer] when a single mutation fails try a few more times with other mutations before returning un-mutated data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246828 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:40:29 +00:00
Kostya Serebryany
6cc3ed7cdd [libFuzzer] actually make the dictionaries work (+docs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:12:11 +00:00
Hal Finkel
f606a6ed99 [PowerPC] Enable interleaved-access vectorization
This adds a basic cost model for interleaved-access vectorization (and a better
default for shuffles), and enables interleaved-access vectorization by default.
The relevant difference from the default cost model for interleaved-access
vectorization, is that on PPC, the shuffles that end up being used are *much*
cheaper than modeling the process with insert/extract pairs (which are
quite expensive, especially on older cores).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:10:41 +00:00
Hal Finkel
738216def6 [PowerPC] Always use aggressive interleaving on the A2
On the A2, with an eye toward QPX unaligned-load merging, we should always use
aggressive interleaving. It is generally superior to only using concatenation
unrolling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 23:23:00 +00:00
Hal Finkel
e1cc054190 [PowerPC] Try harder to find a base+offset when looking for consecutive accesses
When forming permutation-based unaligned vector loads, we need to know whether
it is valid to read ahead of the requested address by a full vector length.
Doing so is more efficient (and allows for more CSE with later loads), but
could trigger a page fault if invalid. To determine validity, we look for other
loads in the same block that access the relevant address range.

The relevant point here is that we need to do this as part of the process of
forming permutation-based vector loads, and this happens quite early in the
SDAG pipeline - specifically before many of the address calculations are fully
canonicalized. As a result, we need to try harder to recognize base+offset
address computations, because they still might appear as chain of adds
(base+offset+offset, for example). To account for this, we'll look through
chains of adds, accumulating the constant offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 22:37:44 +00:00
Sanjoy Das
dc0eb17133 [IR] Have AttrBuilder::clear clear TargetDepAttrs.
Test case attached -- currently the parser smears the "foo bar" to all
of the formal arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246812 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 22:27:42 +00:00
Philip Reames
383054783d [RewriteStatepointsForGC] Extract common code, comment, and fix a build warning [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:57:40 +00:00
Philip Reames
f95c45d16f [RewriteStatepointsForGC] Strengthen invariants around BDVs
As a first step towards a new implementation of the base pointer inference algorithm, introduce an abstraction for BDVs, strengthen the assertions around them, and rewrite the BDV relation code in terms of the abstraction which includes an explicit notion of whether the BDV is also a base. The later is motivated by the fact we had a bug where insertelement was always assumed to be a base pointer even though the BDV code knew it wasn't. The strengthened assertions in this patch would have caught that bug.

The next step will be to separate the DefiningValueMap into a BDV use list cache (entirely within findBasePointers) and a base pointer cache. Having the former will allow me to use a deterministic visit order when visiting BDVs in the inference algorithm and remove a bunch of ordering related hacks. Before actually doing the last step, I'm likely going to extend the lattice with a 'BaseN' (seen only base inputs) state so that I can kill the post process optimization step.

Phabricator Revision: http://reviews.llvm.org/D12608



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:34:30 +00:00
Kostya Serebryany
bf6bd487d5 [libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:24:19 +00:00
Hal Finkel
ecebcfc3a1 [PowerPC] Include the permutation cost for unaligned vector loads
Pre-P8, when we generate code for unaligned vector loads (for Altivec and QPX
types), even when accounting for the combining that takes place for multiple
consecutive such loads, there is at least one load instructions and one
permutation for each load. Make sure the cost reported reflects the cost of the
permutes as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:23:18 +00:00
Hal Finkel
c2a163944a [PowerPC] Compute the MMO offset for an unaligned load with signed arithmetic
If you compute the MMO offset using unsigned arithmetic, you end up with a
large positive offset instead of a small negative one. In theory, this could
cause bad instruction-scheduling decisions later.

I noticed this by inspection from the debug output, and using that for the
regression test is the best I can do right now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:12:15 +00:00
Philip Reames
5707dff00a [RewriteStatepointsForGC] Workaround a lack of determinism in visit order
The visit order being used in the base pointer inference algorithm is currently non-deterministic.  When working on http://reviews.llvm.org/D12583, I discovered that we were relying on a peephole optimization to get deterministic ordering in one of the test cases.  

This change is intented to let me test and land http://reviews.llvm.org/D12583.  The current code will not be long lived.  I'm starting to investigate a rewrite of the algorithm which will combine the post-process step into the initial algorithm and make the visit order determistic.  Before doing that, I wanted to make sure the existing code was complete and the test were stable.  Hopefully, patches should be up for review for the new algorithm this week or early next.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246801 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 20:24:29 +00:00
Kostya Serebryany
446d906a52 [libFuzzer] adding a parser for AFL-style dictionaries + tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246800 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 20:23:46 +00:00
Reid Kleckner
388c85b18f [sancov] Disable sanitizer coverage on functions using SEH
Splitting basic blocks really messes up WinEHPrepare. We can remove this
change when SEH uses the new EH IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 20:18:29 +00:00
Jonathan Roelofs
91d950ef37 llvm.vim: 'musttail' is a keyword too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 20:10:40 +00:00
Dan Liew
9308abaa99 Try to clarify the semantics of fptrunc
* ``the value cannot fit within the destination type`` is ambiguous.
  It could mean overflow, underflow (not in the IEEE-754 sense) or a
  result that cannot be exactly represented and requires rounding or it
  could mean some combination of these. The semantics now state it means
  overflow **only**.

* Using "truncation" in the semantics is very misleading given that it
  doesn't necessarily truncate (i.e. round to zero). For example on
  x86_64 with SSE2 this is currently mapped to cvtsd2ss instruction
  who's rounding behaviour is dependent on the MXCSR register which
  is usually set to round to nearest even by default. The semantics
  now state that the rounding mode is undefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246792 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 18:43:56 +00:00
Chad Rosier
ad69a64d4a [AArch64] Improve ISel using across lane addition reduction.
In vectorized add reduction code, the final "reduce" step is sub-optimal.
This change wll combine :

ext  v1.16b, v0.16b, v0.16b, #8
add  v0.4s, v1.4s, v0.4s
dup  v1.4s, v0.s[1]
add  v0.4s, v1.4s, v0.4s

into

addv s0, v0.4s

PR21371
http://reviews.llvm.org/D12325
Patch by Jun Bum Lim <junbuml@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246790 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 18:13:57 +00:00
Davide Italiano
7ab2009024 [llvm-readobj] Dump MachO indirect symbols.
Example output:

File: <stdin>
Format: Mach-O 32-bit i386
Arch: i386
AddressSize: 32bit
Indirect Symbols {

Number: 3
Symbols [
  Entry {
    Entry Index: 0
    Symbol Index: 0x4
  }
  Entry {
    Entry Index: 1
    Symbol Index: 0x0
  }
  Entry {
    Entry Index: 2
    Symbol Index: 0x1
  }
]
}

Differential Revision:	http://reviews.llvm.org/D12570


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246789 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 18:10:28 +00:00
Karl Schimpf
b80c5f51a4 Allow global address space forward decls using IDs in .ll files.
Summary:
This fixes bugzilla bug 24656. Fixes the case where there is a forward
reference to a global variable using an ID (i.e. @0). It does this by
passing the address space of the initializer pointer for which the
forward referenced global is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246788 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 18:06:44 +00:00
Quentin Colombet
3610c9fe55 [ARM] Add a test case for revision 243956.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246785 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 16:49:18 +00:00
Reid Kleckner
412db355b3 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246784 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 16:41:50 +00:00
Chad Rosier
36f233809e Revert "[AArch64] Improve load/store optimizer to handle LDUR + LDR."
This reverts commit r246769.

This appears to have broken Multisource/Benchmarks/tramp3d-v4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246782 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 16:41:28 +00:00
Sanjay Patel
eb8298cfe1 [x86] enable machine combiner reassociations for scalar 'xor' insts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 16:36:16 +00:00
Karl Schimpf
e2dfa017cf Fix assertion failure in LLParser::ConvertValIDToValue
Summary:
Fixes bug 24645. Problem appears to be that the type may be undefined
when ConvertValIDToValue is called.

Reviewers: kcc

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 16:18:32 +00:00
Karl Schimpf
f4165220d6 Remove binary characters from test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246775 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 15:41:38 +00:00
Karl Schimpf
06bd94ca1b Fix SEGV in InlineAsm::ConstraintInfo::Parse.
Summary:
Fixes bug 24646. Previous code was not checking if an index into a vector
was valid, resulting in a SEGV. Fixed by assuming the construct can't
be parsed when given this input.

Reformat and add test.

Differential Revision: http://reviews.llvm.org/D12539

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246774 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 15:41:37 +00:00
Karl Schimpf
c82ddc24fd Fix SEGV in InlineAsm::ConstraintInfo::Parse.
Fixes bug 24646. Previous code was not checking if an index into a vector
was valid, resulting in a SEGV. Fixed by assuming the construct can't
be parsed when given this input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246773 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 15:41:34 +00:00
Sanjay Patel
dfec7f8eea check for fastness before merging in DAGCombiner::MergeConsecutiveStores()
Use and check the 'IsFast' optional parameter to TLI.allowsMemoryAccess() any time
we have a merged access candidate. Without this patch, we were generating unaligned 
16-byte (SSE) memops for x86 targets where those accesses are slow.

This change was mentioned in:
http://reviews.llvm.org/D10662 and
http://reviews.llvm.org/D10905

and will help solve PR21711.

Differential Revision: http://reviews.llvm.org/D12573



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246771 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 15:03:19 +00:00