Commit Graph

252008 Commits

Author SHA1 Message Date
Daniel Jasper bf56ad36cb Revert "[GlobalISel] track predecessor mapping during switch lowering."
This reverts commit r291973.

The test fails in a Release build with LLVM_BUILD_GLOBAL_ISEL enabled.
AFAICT, llc segfaults. I'll add a few more details to the original
commit.

llvm-svn: 292061
2017-01-15 09:41:49 +00:00
Chandler Carruth 0952750fae [PM] Clean up the testing for IVUsers, especially with the new PM.
First, I've moved a test of IVUsers from the LSR tree to a dedicated
IVUsers test directory. I've also simplified its RUN line now that the
new pass manager's loop PM is providing analyses on their own.

No functionality changed, but it makes subsequent changes cleaner.

llvm-svn: 292060
2017-01-15 09:29:27 +00:00
Daniel Berlin aac56849a1 NewGVN: Change a bunch of densemap find_or_creates to lookups, since they should not be creating new entries
llvm-svn: 292059
2017-01-15 09:18:41 +00:00
Chandler Carruth 1ae34c35ba [PM] Teach the optimization remarks emitter to handle invalidation
events.

This pass sometimes has a pointer to BlockFrequencyInfo so it needs
custom invalidation logic. It is also otherwise immutable so we can
reduce the number of invalidations that happen substantially.

llvm-svn: 292058
2017-01-15 08:20:50 +00:00
Daniel Berlin 4504cd910c These two functions should be const. We often could detect it but this just makes it always true.
llvm-svn: 292057
2017-01-15 07:40:51 +00:00
Daniel Berlin b18135f2b3 Update update_test_checks so that . is a valid identifier character in addition to _
llvm-svn: 292056
2017-01-15 07:40:46 +00:00
Lang Hames 021cb2b6fc [Orc][RPC] Add an RPCFunctionNotSupported error type and return it from
negotiateFunction where appropriate.

Replacing the old ECError with a custom type allows us to attach the name of
the function that could not be negotiated, enabling better diagnostics for
negotiation failures.

llvm-svn: 292055
2017-01-15 06:34:25 +00:00
Chandler Carruth ca68a3ec47 [PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis passes to check for the CFG being preserved to remove the
fanout of all analyses being listed in all passes.

I've gone through and removed or cleaned up as many of the comments
reminding us to do this as I could.

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

llvm-svn: 292054
2017-01-15 06:32:49 +00:00
Craig Topper f1388ef006 [AVX-512] Remove unnecessary duplicate broadcast patterns. NFC
llvm-svn: 292053
2017-01-15 06:15:45 +00:00
Argyrios Kyrtzidis 0516803ca5 [code-completion] Fix crash when trying to do postfix completion of instance member inside a static function.
llvm-svn: 292052
2017-01-15 06:11:04 +00:00
Craig Topper 52317e8b6e [AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns when VLX is available.
llvm-svn: 292051
2017-01-15 05:47:45 +00:00
Craig Topper c294cff863 [X86] Remove untested MOVDDUP patterns.
These all involve bitcasts around the memory operands. This isn't
something we normally do for isel patterns. I suspect DAG combine should
convert the load type making this unnecessary.

llvm-svn: 292050
2017-01-15 05:21:29 +00:00
Rui Ueyama 71e3e3a5c1 Move a flag definition to the right place as -demangle is not ignored.
llvm-svn: 292049
2017-01-15 03:45:46 +00:00
Rui Ueyama ea3f6c3a7e Add -no-{export-dynamic,fatal-warnings}.
llvm-svn: 292048
2017-01-15 03:38:55 +00:00
Mehdi Amini 284ac3c932 Add a LLVM_USE_LINKER that defines the linker to use when building LLVM
Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

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

llvm-svn: 292047
2017-01-15 03:21:30 +00:00
Rui Ueyama 1705f99c77 Add -print-map and -M options.
llvm-svn: 292046
2017-01-15 02:52:34 +00:00
Rui Ueyama 9c6cdc2022 Add a help text for -Map.
llvm-svn: 292045
2017-01-15 02:52:14 +00:00
Rui Ueyama c9df172553 Fix typo.
llvm-svn: 292044
2017-01-15 02:34:42 +00:00
Eric Fiselier 0a9eb89cf9 Give comparator const call operator
llvm-svn: 292043
2017-01-15 02:06:44 +00:00
Rui Ueyama 483ffa3365 Simplify string output. NFC.
llvm-svn: 292042
2017-01-15 01:11:47 +00:00
Rui Ueyama 543731f96a Directly write to a -Map file.
Previous code had a bug that if the program exits with an assert() or
fail() before the control reaches end of writeMapFile(), it leaves a
temporary file, because FileRemover's dtor isn't called in that case.

I could fix that by removeFileOnSignal() and other functions, but
I think we can simply write to the result file directly. I think
that is straightforward and easy to understand.

Additionally, that allows something like `-Map /dev/null` or a bash
hack such as `-Map >(grep symbol-im-looking-for)`. Previously,
that kind of things didn't work.

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

llvm-svn: 292041
2017-01-15 00:41:21 +00:00
Rui Ueyama dcd32937dc PDB: Add a class to create the /names stream contents.
This patch adds a new class NameHashTableBuilder which creates /names streams.
This patch contains a test to confirm that a stream created by
NameHashTableBuilder can be read by NameHashTable reader class.

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

llvm-svn: 292040
2017-01-15 00:36:02 +00:00
Chandler Carruth 2f19a324cb [PM] The assumption cache is fundamentally designed to be self-updating,
mark it as never invalidated in the new PM.

The old PM already required this to work, and after a discussion with
Hal this seems to really be the only sensible answer. The cache
gracefully degrades as the IR is mutated, and most things which do this
should already be incrementally updating the cache.

This gets rid of a bunch of logic preserving and testing the
invalidation of this analysis.

llvm-svn: 292039
2017-01-15 00:26:18 +00:00
Eric Fiselier 4b3dc18cf1 Work around python3 bytes vs str in libc++ test config
llvm-svn: 292038
2017-01-15 00:06:02 +00:00
Chandler Carruth 5edfd4d99e [PM] Fix instcombine's analysis preservation in the new pass manager to
cover domtree and alias analysis. These are the pretty clear analyses
that we would always want to survive this pass.

To make these survive, we also need to preserve the assumption cache.

Added a test that verifies the important bits of this preservation.

llvm-svn: 292037
2017-01-14 23:25:22 +00:00
Sanjay Patel ca3124f74b [InstCombine] clean up visitAshr(); NFCI
llvm-svn: 292036
2017-01-14 23:13:50 +00:00
Sanjay Patel f8ed0a5e93 [InstCombine] add test to show missed vector fold; NFC
llvm-svn: 292035
2017-01-14 23:12:29 +00:00
David Majnemer 70110ec582 Adding const overloads of operator* and operator-> for DenseSet iterators
This fixes some problems when building ClangDiagnostics.cpp on Visual Studio 2017 RC. As far as I understand, there was a change in the implementation of the constructor for std::vector with two iterator parameters, which in our case causes an attempt to dereference const Iterator objects. Since there was no overload for a const Iterator, the compile would fail.

Patch by Hugo Puhlmann!

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

llvm-svn: 292034
2017-01-14 21:54:58 +00:00
Yaron Keren fa3674017a Fix PR31644 introduced by r287138 and add a regression test.
Thanks Dimitry Andric for the report and fix!

llvm-svn: 292032
2017-01-14 21:12:08 +00:00
Davide Italiano 6d28500ff9 [NewGVN] Fix a warning from GCC.
Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

llvm-svn: 292031
2017-01-14 20:44:08 +00:00
Tobias Grosser 4d5a917287 Use typed enums to model MemoryKind and move MemoryKind out of ScopArrayInfo
To benefit of the type safety guarantees of C++11 typed enums, which would have
caught the type mismatch fixed in r291960, we make MemoryKind a typed enum.
This change also allows us to drop the 'MK_' prefix and to instead use the more
descriptive full name of the enum as prefix. To reduce the amount of typing
needed, we use this opportunity to move MemoryKind from ScopArrayInfo to a
global scope, which means the ScopArrayInfo:: prefix is not needed. This move
also makes historically sense. In the beginning of Polly we had different
MemoryKind enums in both MemoryAccess and ScopArrayInfo, which were later
canonicalized to one. During this canonicalization we just choose the enum in
ScopArrayInfo, but did not consider to move this shared enum to global scope.

Reviewed-by: Michael Kruse <llvm@meinersbur.de>
Differential Revision: https://reviews.llvm.org/D28090

llvm-svn: 292030
2017-01-14 20:25:44 +00:00
Eric Fiselier 12ed728c23 XFAIL native handle tests
llvm-svn: 292029
2017-01-14 20:25:25 +00:00
Eric Fiselier 121baf4fc9 Fix demangle.h on Windows
llvm-svn: 292028
2017-01-14 20:21:18 +00:00
Eric Fiselier d75a9d253f Attempt two at fixing threading on Windows
Reviewers: compnerd

Subscribers: cfe-commits

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

llvm-svn: 292027
2017-01-14 20:19:00 +00:00
Davide Italiano ed67f1978e [NewGVN] clang-format this file after recent changes.
llvm-svn: 292026
2017-01-14 20:15:04 +00:00
Davide Italiano 7cf29dcca5 [NewGVN] Try to be consistent wit the style used in this file. NFCI.
llvm-svn: 292025
2017-01-14 20:13:18 +00:00
Davide Italiano 76de68eaf9 [TargetLowering] Simplfiy a bit. NFCI.
llvm-svn: 292024
2017-01-14 20:09:29 +00:00
Simon Pilgrim d419b73a42 [CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed
llvm-svn: 292023
2017-01-14 19:24:23 +00:00
Eric Fiselier 6f38b6ab6e Fix thread creation on Windows
llvm-svn: 292022
2017-01-14 19:11:07 +00:00
Simon Pilgrim 8e5ecf8ad1 [X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns
VPMADCSWD act as VPADDD( VPMADDWD( x, y ), z ) - multiply+extend+hadd and add to v4i32 accumulator

llvm-svn: 292021
2017-01-14 18:52:13 +00:00
Simon Pilgrim b290805e94 [X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns
VPMACSDQH/VPMACSDQL act as VPADDQ( VPMULDQ( x, y ), z ) - multiply+extending either the odd/even 4i32 input elements and adding to v2i64 accumulator

llvm-svn: 292020
2017-01-14 18:08:54 +00:00
Simon Pilgrim a1631749f8 [X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns
VPMACSWW/VPMACSDD act as add( mul( x, y ), z ) - ignoring any upper bits from both the multiply and add stages

llvm-svn: 292019
2017-01-14 17:13:52 +00:00
Michal Gorny 40180b0360 [cmake] Handle missing LIBUNWIND_* directories gracefully
Add LIBUNWIND_* directories to include path only if they were actually
found, in order to fix the CMake error. Both of the directories are
usually unnecessary since libcxxabi uses only the common part of
unwind.h that is supplied both by GCC and Clang.

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

llvm-svn: 292018
2017-01-14 17:05:16 +00:00
Simon Pilgrim 3a1a800128 [X86][XOP] Add tests for integer fused multiply add
Tests showing missed opportunities to use XOP's integer fma instructions

Some of these are pretty awkward to match as they often have implicit sext/trunc stages but many just ignore overflow bits which makes things pretty straightforward.

llvm-svn: 292017
2017-01-14 13:07:22 +00:00
Sylvestre Ledru 1f63b7e099 Update the tests to match the typo fix done in r292015
llvm-svn: 292016
2017-01-14 12:00:40 +00:00
Sylvestre Ledru e86ee6b0a8 fix a few typo in the doc but also in the clang messages
llvm-svn: 292015
2017-01-14 11:41:45 +00:00
Sylvestre Ledru e6ec4418fb fix some typos in the doc
llvm-svn: 292014
2017-01-14 11:37:01 +00:00
Jonas Hahnfeld 0ab3b77294 Fix last_write_time tests for filesystems that don't support negative and very large times
Seems to be the case for NFS.

Original patch by Eric Fiselier!
Differential Revision: https://reviews.llvm.org/D22452

llvm-svn: 292013
2017-01-14 11:35:15 +00:00
Eric Fiselier 117c4affa6 Mark test as UNSUPPORTED on Windows since it hangs forever
llvm-svn: 292012
2017-01-14 10:31:43 +00:00
Eric Fiselier 08e1477ccb Fix Windows try_lock implementation
llvm-svn: 292011
2017-01-14 10:27:12 +00:00