Commit Graph

144830 Commits

Author SHA1 Message Date
Marcos Pividori
255eed0380 [libFuzzer] Change Uninstrumented test name.
On Windows, executables with the word "uninst" included in their names are
associated with administrator privileges.

Differential Revision: https://reviews.llvm.org/D29549

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:03:13 +00:00
Marcos Pividori
ec59eb9d58 [libFuzzer] fuzzer-jobs requires posix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294386 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:03:07 +00:00
Marcos Pividori
1ff471105f [libFuzzer] Update fuzzer.test to properly set environment variables.
Use env to set environment variables, so it works on Windows and Linux.

Differential Revision: https://reviews.llvm.org/D29537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294385 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:03:03 +00:00
Marcos Pividori
155c4aab57 [libFuzzer] Don't add newline character when using echo in tests.
Add the option "-n", so we don't add a new line character at the end of the file
when using echo. (on Windows this means 2 characters).

Differential Revision: https://reviews.llvm.org/D29536

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294384 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:59 +00:00
Marcos Pividori
fbc422e6ba [libFuzzer] Disable ulimit test on windows.
Differential Revision: https://reviews.llvm.org/D29535

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294383 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:54 +00:00
Marcos Pividori
44933aa735 [libFuzzer] Remove ? wildcard on tests.
We can not use the wildcard ? on Windows.

Differential Revision: https://reviews.llvm.org/D29534

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:50 +00:00
Marcos Pividori
6cf9872a5e [libFuzzer] Update fuzzer-segv to set environment variables.
Use env to set environment variables, so it works on Linux and Windows.

Differential Revision: https://reviews.llvm.org/D29533

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294381 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:45 +00:00
Marcos Pividori
75241a8855 [libFuzzer] Properly configure tests for Windows.
This configuration is necessary, and is included in all tests suites.
We need to execute: `config.test_format = lit.formats.ShTest(False)`
Otherwise, lit will try to use bash, which generates many problems.

Differential Revision: https://reviews.llvm.org/D29529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294380 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:41 +00:00
Marcos Pividori
ddc6c083cf [libFuzzer] Simplify dump_coverage test.
Environment variables are handled differently on Windows. In this case it is not
necessary to use environment variables. So, I simplify the test to work on
Windows.

Differential Revision: https://reviews.llvm.org/D29532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294379 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:36 +00:00
Marcos Pividori
a8f8ed08cc [libFuzzer] Update Load test to work on 32 bits.
We should ensure the size of the variable `a` is 8 bytes. Otherwise, this
generates a stack buffer overflow inside the memcpy call in 32 bits machines.
(We write more bytes than the size of a, when it is 4 bytes)

Differential Revision: https://reviews.llvm.org/D29602

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294378 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:32 +00:00
Marcos Pividori
f78e1b3b9d [libFuzzer] Update test to consider different exceptions.
Differential Revision: https://reviews.llvm.org/D29531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294377 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:25 +00:00
Marcos Pividori
8c0ca40461 [libFuzzer] Temporarily fix Shmem for Windows.
In this diff, I add stubs for shared memory on Windows. Now we can compile and
use libFuzzer without support for shared memory.

Differential Revision: https://reviews.llvm.org/D29544

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294376 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 00:02:12 +00:00
Sanjoy Das
541d77cf0d [IRCE] Add a missing invariant check
Currently IRCE relies on the loops it transforms to be (semantically) of
the form:

  for (i = START; i < END; i++)
    ...

or

  for (i = START; i > END; i--)
    ...

However, we were not verifying the presence of the START < END entry
check (i.e. check before the first iteration).  We were only verifying
that the backedge was guarded by (i + 1) < END.

Usually this would work "fine" since (especially in Java) most loops do
actually have the START < END check, but of course that is not
guaranteed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294375 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 23:59:07 +00:00
Chris Bieneman
3aa9ab7ce6 [CMake] Allow overriding CMAKE_LIBTOOL
This patch allows a user to specify a their own libtool instead of auto-detecting one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294371 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 23:32:56 +00:00
Eugene Zelenko
f31871c702 [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294369 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 23:02:00 +00:00
Eugene Zelenko
e22b221f8f [PowerPC] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MC headers dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294368 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:59:46 +00:00
Eric Fiselier
9652e72de3 [CMake] Fix USE_LLVM_SANITIZER configuration for out-of-tree builds.
Summary:
r291918 changed `HandleLLVMOptions.cmake` to add `-fsanitize-blacklist=<llvm-file>` when `LLVM_USE_SANITIZER=Undefined` is specified. This breaks out-of-tree users of `LLVM_USE_SANITIZER` since that file is not present.

This patch fixes the issue by checking if the file exists first.

Reviewers: mgorny, bogner, vitalybuka, krasin

Reviewed By: krasin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294367 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:48:20 +00:00
Kostya Serebryany
ffcfd0c3bc [libFuzzer] replace std::random_shuffle with std::shuffle as std::random_shuffle is being deprecated in C++17. Also simplify fuzzer::Random. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:37:34 +00:00
Simon Pilgrim
5a3127171e [X86][SSE] Add SSE2 build vector insertion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:23:12 +00:00
Daniel Berlin
17b4ddbad6 PredicateInfo: Some compilers are unhappy with naming Use *'s Use. Change the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294364 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:11:43 +00:00
Simon Pilgrim
8c876c2b20 [X86][SSE] Add additional v4i32/v8i16/v16i8 build vector insertion tests
With particular interest in cases where we don't make use of implicit zeroing or fail to break register dependencies

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294363 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 22:03:37 +00:00
David Blaikie
299fa938ce Fix some missing negations in the traits checking from r294349
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 21:31:03 +00:00
Wolfgang Pieb
0956efb856 DebugInfo: Track spilled variables in LiveDebugValues
When variables are spilled to the stack by the register allocator, keep track of their
debug locations in LiveDebugValues and insert DBG_VALUE instructions at the appropriate
place. Ensure that the locations are propagated down the dominator tree via the existing 
mechanisms.

Reviewer: aprantl

Differential Revision: https://reviews.llvm.org/D29500


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 21:23:15 +00:00
Kevin Enderby
b1b66d4aca Fix a typo in an error message for a check of invalid Mach-O files where
it was printing the field name fileoff instead of filesize.  The original check
was added in r278557.

This was found in tracking down the problem that lead to the fix in
r293842 - [dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade path

rdar://30386075


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294354 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 21:20:44 +00:00
Daniel Berlin
94f2e5a1f1 Add PredicateInfo utility and printing pass
Summary:
This patch adds a utility to build extended SSA (see "ABCD: eliminating
array bounds checks on demand"), and an intrinsic to support it. This
is then used to get functionality equivalent to propagateEquality in
GVN, in NewGVN (without having to replace instructions as we go). It
would work similarly in SCCP or other passes. This has been talked
about a few times, so i built a real implementation and tried to
productionize it.

Copies are inserted for operands used in assumes and conditional
branches that are based on comparisons (see below for more)

Every use affected by the predicate is renamed to the appropriate
intrinsic result.

E.g.
%cmp = icmp eq i32 %x, 50
br i1 %cmp, label %true, label %false
true:
ret i32 %x
false:
ret i32 1

will become

%cmp = icmp eq i32, %x, 50
br i1 %cmp, label %true, label %false
true:
; Has predicate info
; branch predicate info { TrueEdge: 1 Comparison: %cmp = icmp eq i32 %x, 50 }
%x.0 = call @llvm.ssa_copy.i32(i32 %x)
ret i32 %x.0
false:
ret i23 1

(you can use -print-predicateinfo to get an annotated-with-predicateinfo dump)

This enables us to easily determine what operations are affected by a
given predicate, and how operations affected by a chain of
predicates.

Reviewers: davide, sanjoy

Subscribers: mgorny, llvm-commits, Prazek

Differential Revision: https://reviews.llvm.org/D29519

Update for review comments

Fix a bug Nuno noticed where we are giving information about and/or on edges where the info is not useful and easy to use wrong

Update for review comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 21:10:46 +00:00
Duncan P. N. Exon Smith
98516248d0 ADT: Add explicit conversions for reverse ilist iterators
Add explicit conversions between forward and reverse ilist iterators.
These follow the conversion conventions of std::reverse_iterator, which
are off-by-one: the newly-constructed "reverse" iterator dereferences to
the previous node of the one sent in.  This has the benefit of
converting reverse ranges in place:
  - If [I, E) is a valid range,
  - then [reverse(E), reverse(I)) gives the same range in reverse order.

ilist_iterator::getReverse() is unchanged: it returns a reverse iterator
to the *same* node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 21:03:50 +00:00
Hans Wennborg
34a6e0d36a [X86] Disable conditional tail calls (PR31257)
They are currently modelled incorrectly (as calls, which clobber
registers, confusing e.g. Machine Copy Propagation).

Reverting until we figure out the proper solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294348 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 20:37:45 +00:00
Sanjoy Das
9ac774d7cf Fix the docs build
(and add a bit of formatting.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 20:36:03 +00:00
Tim Northover
dabb7fcdd6 GlobalISel: translate @llvm.va_end intrinsic.
Turns out no-one actually cares about this one (at least) in tree so we can
just drop it entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 20:08:59 +00:00
Sanjay Patel
04827a7eed [x86] improve comments for SHRUNKBLEND node creation; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294344 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:54:16 +00:00
Matthew Simpson
9e8cc9ccc4 [LV] Add new ARM/AArch64 interleaved access cost model tests (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:34:24 +00:00
Daniel Berlin
f2da6f93fe This patch adds a ssa_copy intrinsic, as part of splitting up D29316.
Summary:
The intrinsic, marked as returning it's first argument, has no code
generation effect (though currently not every optimization pass knows
that intrinsics with the returned attribute can be looked through).

It is about to be used to by the PredicateInfo pass to attach
predicate information to existing operands, and be able to tell what
the predicate information affects.

We deliberately do not attach any info through a second operand so
that the intrinsics do not need to dominate the comparisons/etc (since
in the case of assume, we may want to push them up the post-dominator
tree).

Reviewers: davide, sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29517

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294341 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:29:25 +00:00
Daniel Berlin
e851e52838 Replace custom written DFS walk with depth first iterator
Summary:
GenericDomTreeConstruction had its own written DFS walk.
It is basically identical to the DFS walk df_* is doing in the iterators.
the one difference is that df_iterator uses an internal visited set.
The GenericDomTreeConstruction one reused a field in an existing densemap lookup.

Time-wise, this way is actually more cache-friendly (the previous way has a random store
into a successor's info, the new way does that store at the same time and in the same place
as other stores to the same info)

It costs some very small amount of memory to do this, and one we pay in some other part of
dom tree construction *anyway*, so we aren't really increasing dom tree constructions's
peak memory usage.

It could still be changed to use the old field with a little work on df_ext_* if we care
(and if someone find performance regressions)

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: Eugene.Zelenko, llvm-commits

Differential Revision: https://reviews.llvm.org/D8932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:24:26 +00:00
Sanjoy Das
a0be0b1390 [ImplicitNullCheck] Extend Implicit Null Check scope by using stores
Summary:
This change allows usage of store instruction for implicit null check.

Memory Aliasing Analisys is not used and change conservatively supposes
that any store and load may access the same memory. As a result
re-ordering of store-store, store-load and load-store is prohibited.

Patch by Serguei Katkov!

Reviewers: reames, sanjoy

Reviewed By: sanjoy

Subscribers: atrick, llvm-commits

Differential Revision: https://reviews.llvm.org/D29400

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294338 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:19:49 +00:00
Sanjay Patel
27341a9e0b [x86] use range-for loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294337 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:18:25 +00:00
Matthew Simpson
85dcf5ecdf [LV] Simplify ARM/AArch64 interleaved access cost model tests (NFC)
This patch removes unneeded instructions from the existing ARM/AArch64
interleaved access cost model tests. I'll be adding a similar set of tests in a
follow-on patch to increase coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294336 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:17:44 +00:00
Chris Bieneman
d2206e4788 [CMake] Move ninja job pool options to HandleLLVMOptions
Moving the Ninja job pool configuration settings into the HandleLLVMOptions module will allow standalone builds of LLVM sub-projects to use the LLVM options without needing to re-implement them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294334 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:06:22 +00:00
Sanjay Patel
6271cac448 [x86] use getSignBit() for clarity; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294333 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 19:01:35 +00:00
David Blaikie
d1bd111c03 Fix the -Werror build for some sign-comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:58:17 +00:00
Nemanja Ivanovic
c44f1880c9 [PowerPC][Altivec] Add vnot extended mnemonic
Adds the vnot extended mnemonic for the vnor instruction.

Committing on behalf of brunoalr (Bruno Rosa).

Differential Revision: https://reviews.llvm.org/D29225


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:57:29 +00:00
Reid Kleckner
e975b155eb [SDAGISel] Simplify some SDAGISel code, NFC
Hoist entry block code for arguments and swift error values out of the
basic block instruction selection loop. Lowering arguments once up front
seems much more readable than doing it conditionally inside the loop. It
also makes it clear that argument lowering can update StaticAllocaMap
because no instructions have been selected yet.

Also use range-based for loops where possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294329 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:42:53 +00:00
Pavel Labath
6997bd2426 Attempt to fix MSVC build broken by r294326
MSVC does not think that `char []` can be constexpr. Switch to regular const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294327 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:35:36 +00:00
Pavel Labath
6f3190d682 [Support] Add FormatVariadic support for chrono types
Summary:
The formatter has three knobs:
- the user can choose which time unit to use for formatting (default: whatever is the unit of the input)
- he can choose whether the unit gets displayed (default: yes)
- he can affect the way the number itself is formatted via standard number formatting options (default:default)

Reviewers: zturner, inglorion

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29481

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:11:33 +00:00
Sanjay Patel
a1d2453472 [TargetLowering] fix formatting and comments for ShrinkDemandedConstant; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294325 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 18:04:26 +00:00
Alexander Timofeev
ce06d9cb99 [AMDGPU] Fix for SIMachineScheduler crash. SI Scheduler should track
lane masks.

	 Differential revision: https://reviews.llvm.org/D29442

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294324 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:57:48 +00:00
Davide Italiano
4b54eb2c37 [InstCombine] Make max size array combine a tunable.
Requested by Sanjoy/Hal a while ago, and forgotten by me
(r283612).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294323 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:56:50 +00:00
Krzysztof Parzyszek
051dda606b [Hexagon] Update instruction types
Remove TypeXTYPE, TypeALU32, TypeSYSTEM, TypeJR, and instead use their
architecture counterparts.

Patch by Colin LeMahieu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294321 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:47:37 +00:00
Krzysztof Parzyszek
ab8079ed2a [Hexagon] Remove encoding bits from mapped instructions
- Map A2_zxtb to A2_andir.
- Map PS_call_nr J2_call.
- Map A2_tfr[t|f][new] to A2_padd[t|f][new].
    
Patch by Colin LeMahieu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294320 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:42:11 +00:00
Reid Kleckner
4e66158a93 Fix my GVNHoist test case from r294317
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294319 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:35:53 +00:00
Adrian Prantl
04ac0249b0 Fix the bitcode upgrade for DIGlobalVariable in a DIImportedEntity context.
The bitcode upgrade for DIGlobalVariable unconditionally wrapped
DIGlobalVariables in a DIGlobalVariableExpression. When a
DIGlobalVariable is referenced by a DIImportedEntity, however, this is
wrong. This patch fixes the bitcode upgrade by deferring the creation
of DIGlobalVariableExpressions until we know the context of the
DIGlobalVariable.

<rdar://problem/30134279>

Differential Revision: https://reviews.llvm.org/D29349

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294318 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07 17:35:41 +00:00