Commit Graph

230984 Commits

Author SHA1 Message Date
Yaxun Liu 39cf40f6b4 [OpenCL] Add supported OpenCL extensions to target info.
Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line.

Re-commit after fixing build error due to missing override attribute.

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

llvm-svn: 269670
2016-05-16 17:06:34 +00:00
Eric Fiselier 46a256a3eb Remove C++11 feature macros in tests. Use TEST_STD_VER instead.
llvm-svn: 269669
2016-05-16 17:05:14 +00:00
Matthew Simpson 37ec5f914e [LAA] Rename forwarding conflict detection option (NFC)
This patch renames the option enabling the store-to-load forwarding conflict
detection optimization. This change was requested in the review of D20241.

llvm-svn: 269668
2016-05-16 17:00:56 +00:00
Adam Nemet 884d313b7f [LAA] Comment couldPreventStoreLoadForward. NFC
Also s/Cycles/Iters/ in NumCyclesForStoreLoadThroughMemory to make it
clear that this is not about clock cycles but loop cycles/iterations.

llvm-svn: 269667
2016-05-16 16:57:47 +00:00
Adam Nemet 9b5852aeb2 [LAA] clang-format the function couldPreventStoreLoadForward. NFC
llvm-svn: 269666
2016-05-16 16:57:42 +00:00
Marshall Clow 779ddd134d Add a test for uniqueptr having either NULL and nullptr
llvm-svn: 269665
2016-05-16 16:57:15 +00:00
Krzysztof Parzyszek 0a04ac2153 [Hexagon] Simplify HexagonInstrInfo::isPredicable
Remove all the checks for constant extenders from isPredicable. The users
of it should be the ones checking cost/profitability.

llvm-svn: 269664
2016-05-16 16:56:10 +00:00
Marshall Clow 0e1c6c7ed1 Add a couple of _LIBCPP_ASSERT calls. No functional change.
llvm-svn: 269663
2016-05-16 16:55:32 +00:00
Aaron Ballman abdbbbc51f Add the hasDynamicExceptionSpec() AST matcher to match function declarations that have a dynamic exception specification.
Patch by Don Hinton.

llvm-svn: 269662
2016-05-16 16:49:01 +00:00
Bruno Cardoso Lopes b171a59bfd [Modules] Use vfs for (recursive) directory iteration
Clang performs directory walk while searching headers inside modules by
using the ::sys::fs instead of ::vfs. This prevents any code that uses
the VFS (e.g, reproducer scripts) to actually find such headers, since
the VFS will never be searched for those.

Change these places to use vfs::recursive_directory_iterator and
vfs::directory_iterator instead.

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

rdar://problem/25880368

llvm-svn: 269661
2016-05-16 16:46:01 +00:00
Xinliang David Li f3c7a35238 [PM] Port indirect call promotion pass to new pass manager
llvm-svn: 269660
2016-05-16 16:31:07 +00:00
Matthew Simpson e43198dc4b [LV] Ensure safe VF for loops with interleaved accesses
The selection of the vectorization factor currently doesn't consider
interleaved accesses. The vectorization factor is based on the maximum safe
dependence distance computed by LAA. However, for loops with interleaved
groups, we should instead base the vectorization factor on the maximum safe
dependence distance divided by the maximum interleave factor of all the
interleaved groups. Interleaved accesses not in a group will be scalarized.

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

llvm-svn: 269659
2016-05-16 15:08:20 +00:00
Etienne Bergeron 3df2879232 [compiler-rt] Fix multi-configuration output paths
Summary:
When using a multi-configuration build (i.e. MSVC) the output path where
libraries are dropped is incorrect.

Example:
```
C:\src\llvm\examples>d:\src\llvm\build\Release\bin\clang-cl.exe -fsanitize=address test.cc
LINK : fatal error LNK1181: cannot open input file 'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\clang_rt.asan-i386.lib'
```

The dropped executable path contains the configuration 'Release':
```
'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\Release\clang_rt.asan-i386.lib'
```


The variable 'RUNTIME_OUTPUT_DIRECTORY' is used to specify the output directory.
But CMAKE is appending the current configuration (i.e. Debug, Release).

see: https://cmake.org/cmake/help/v3.0/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html
```
"Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory."
```

To avoid this problem, the configuration specific variable must be set:
'RUNTIME_OUTPUT_DIRECTORY_DEBUG', 'RUNTIME_OUTPUT_DIRECTORY_RELEASE', and so on.

Reviewers: ddunbar, chapuni, rnk

Subscribers: kubabrecka, llvm-commits

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

llvm-svn: 269658
2016-05-16 14:58:07 +00:00
Etienne Bergeron 8d73de9eac [clang-tidy] Cleanups utils files
Summary:
Cleanup some code by using appropriate APIs.
Some coding style cleanups.

There is no behavior changes.

 - Function `IncludeSorter::CreateFixIt` can be replaced by `FixItHint::CreateReplacement`.
 - Function `cleanPath` is a wrapper for `llvm::sys::path::remove_dots`.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 269656
2016-05-16 14:34:20 +00:00
Renato Golin 4b9c0d4dcf [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h, and fixed an UB in the new change.

Patch by Diana Picus.

llvm-svn: 269655
2016-05-16 14:28:02 +00:00
Matthew Simpson a250dc9f11 [LAA] Add option to disable conflict detection (NFC)
llvm-svn: 269654
2016-05-16 14:14:49 +00:00
Chad Rosier c73d559df4 Use proper capitalization and punctuation per coding standards. NFC.
llvm-svn: 269652
2016-05-16 12:55:01 +00:00
Vasileios Kalintiris 44deb63ff2 [mips] Add test for the dynamic linker when using the mips64el-fedora-linux triple.
We should use the musl linker only when there's no environment specified and
the vendor is MTI. The new test verifies this behaviour and is a follow-up to
the r269411 commit that added the vendor field check.

llvm-svn: 269651
2016-05-16 11:53:51 +00:00
Simon Pilgrim 0d05484db6 Fixed unused variable warning
llvm-svn: 269650
2016-05-16 11:48:54 +00:00
Michael Zuckerman cb85677471 [Clang][AVX512] completing missing intrinsics [vsqrt|vrsqrt|vrcp14 ].
Differential Revision: http://reviews.llvm.org/D20068

llvm-svn: 269649
2016-05-16 11:42:01 +00:00
Pavel Labath 204ef66540 Bump up adb timeout more
still seeing very rare timeouts on the buildbot.

llvm-svn: 269648
2016-05-16 11:41:36 +00:00
Omair Javaid 32558a1615 Xfail TestCrashDuringStep and TestCreateDuringInstructionStep on arm-linux
Both of above tests fail on arm and bugs have been reported on android already.
Adding arm-linux decorator because android decorator doesnt xfail these test when run on linux. 

llvm-svn: 269647
2016-05-16 11:21:49 +00:00
Simon Pilgrim 265995ef53 [X86][SSSE3] Lower vector CTLZ with PSHUFB lookups
This patch uses PSHUFB to lower vector CTLZ and avoid (slower) scalarizations.

The leading zero count of each 4-bit nibble of the vector is determined by using a PSHUFB lookup. Pairs of results are then repeatedly combined up to the original element width.

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

llvm-svn: 269646
2016-05-16 11:19:11 +00:00
NAKAMURA Takumi 68570b2042 macho2yaml.cpp: Fix "reserved" uninitialized.
FIXME: It should reflect actual field.
llvm-svn: 269645
2016-05-16 11:03:56 +00:00
Chris Dewhurst 7d8412ff05 [Sparc][LEON] Add LEON-specific CASA instruction.
Differental Revision: http://reviews.llvm.org/D20098

llvm-svn: 269644
2016-05-16 11:02:00 +00:00
NAKAMURA Takumi a42f528aa9 Appease msc18 to move PassBuilder::crossRegisterProxies() in front of PassBuilder::parseModulePassPipeline().
I don't know why it crashed cl.exe but it works.

llvm-svn: 269643
2016-05-16 10:13:37 +00:00
Paul Osmialowski fb043fdfff Clean all the mess around KMP_USE_FUTEX and kmp_lock.h
KMP_USE_FUTEX preprocessor definition defined in kmp_lock.h is used
inconsequently throughout LLVM libomp code.

* some .c files that use this define do not include kmp_lock.h file,
  in effect guarded part of code are never compiled
* some places in code use architecture-depending preprocessor
  logic expressions which effectively disable use of Futex for
  AArch64 architecture, all these places should use
  '#if KMP_USE_FUTEX' instead to avoid any further confusions
* some places use KMP_HAS_FUTEX which is nowhere defined,
  KMP_USE_FUTEX should be used instead

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

llvm-svn: 269642
2016-05-16 09:44:11 +00:00
Daniel Sanders a2bde88e62 [mips][ias] Fix R_MICROMIPS_GOT16 evaluation and eliminate symbol for R_MICROMIPS_(GOT|HI|LO)16
Summary:
The failure r269410 worked around turned out to be caused by an incorrect
evaluation of R_MICROMIPS_GOT16 which then caused the GOT entries to be
incorrect.

This patch fixes the evaluation and reverts r269410.

Reviewers: sdardis, vkalintiris, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

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

llvm-svn: 269641
2016-05-16 09:33:59 +00:00
Pavel Labath 57a77118ba Remove Mutex from NativeProcessLinux
NPL now assumes it is running from a single thread now, so its thread-safety is untested
anyway (and if that assumption is broken, we'll have bigger problems (due to ptrace restrictions)
than a couple of missing mutexes).

llvm-svn: 269640
2016-05-16 09:18:30 +00:00
Daniel Sanders cda908a0b6 [mips][ias] EF_MIPS_MICROMIPS should iff microMIPS code was emitted.
Summary:
This fixes PR27682. Additionally, '.set micromips' by itself is not sufficient
to raise the EF_MIPS_MICROMIPS flag. It is also necessary to emit a microMIPS
instruction. This has also been fixed.

Reviewers: sdardis, vkalintiris, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

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

llvm-svn: 269639
2016-05-16 09:10:13 +00:00
Mehdi Amini 367577aab9 ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the
value id to recover some determinism during serialization.

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>
llvm-svn: 269638
2016-05-16 09:04:55 +00:00
Mehdi Amini fe97408495 Revert "ThinLTO: fix non-determinism in bitcode writing"
This reverts commit r269634, bots are broken.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269637
2016-05-16 09:04:50 +00:00
Zoran Jovanovic 973405bec5 [mips] Addition of a third operand to the instructions [d]div, [d]divu
Author: obucina
Reviewers: dsanders
Adds support for third operand for [D]DIV[U] instructions. Additional test for case when destination reg is zero register
Differential Revision: http://reviews.llvm.org/D16888

llvm-svn: 269636
2016-05-16 08:57:59 +00:00
Mehdi Amini f606c8d633 ThinLTO: fix another non-determinism in bitcode writing
GlobalVars Refs are initialized from a DenseSet. We can sort them
using the value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269635
2016-05-16 08:50:27 +00:00
Mehdi Amini 564c49a938 ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the
value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269634
2016-05-16 08:50:23 +00:00
Maxim Ostapenko 187043f61e [asan] Fix asan initialization failure with newer (2.23+) glibc in use.
This patch tries to fix https://llvm.org/bugs/show_bug.cgi?id=27310 by using the same hack for malloc as we use for calloc: allocate corresponding memory from internal buffer when ASan is not initialized.
This way we could avoid nasty '==6987==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_rtl.cc:556 "((!asan_init_is_running && "ASan init calls itself!")) != (0)" (0x0, 0x0)' errors in
environments with glibc 2.23+ in use, where _dl_signal_error, called from dlsym for undefined symbols calls malloc in order to get a buffer for error message.

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

llvm-svn: 269633
2016-05-16 07:20:53 +00:00
Craig Topper 1aa231e3aa [X86] Add typecasts to remove most assumptions about what __m128i/__m256i is defined as. Add similar typecasts for the fp types as well.
llvm-svn: 269632
2016-05-16 06:38:42 +00:00
Craig Topper 9c6c85f1ad [AVX512] Add typecasts to some intrinsics to avoid doing operations on the __m512/__m512i/__m512d types.
llvm-svn: 269631
2016-05-16 06:38:36 +00:00
Saleem Abdulrasool 1e6c4060ad CodeGen: convert some const char * to StringRef
Convert some use of const char * to StringRef.  NFC.

llvm-svn: 269630
2016-05-16 05:06:49 +00:00
Mehdi Amini 7c9ceb5cc8 ThinLTO: fix non-determinism in bitcode writing
Refs are initialized from a DenseSet. We can sort them using the
value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269629
2016-05-16 04:50:47 +00:00
Saleem Abdulrasool 0eadc53f6d test: remove use of undefined variables
The variables referenced in the print message are not defined.  Simply state
that the requisite script is not found.  Correct grammar to indicate that the
tests are rather likely to fail rather than unlikely to fail.

llvm-svn: 269628
2016-05-16 03:13:12 +00:00
Saleem Abdulrasool c0d0e36197 test: add missing splat
The parameter here is a list, not a string.  Ensure that the we splat the list
into arguments prior to invoke os.path.join.  This would previously fail with a
`startswith` is not a member of `list`.

llvm-svn: 269627
2016-05-16 03:13:08 +00:00
Saleem Abdulrasool 81eadde6ca test: add missing parameter
Add the missing required parameter to the function.  This permits tests to get a
bit further before failing.

llvm-svn: 269626
2016-05-16 03:13:05 +00:00
Nick Lewycky 0624b82260 Make this SourceLocation getter const LLVM_READONLY like others in the same file.
llvm-svn: 269625
2016-05-16 02:46:07 +00:00
Davide Italiano 6f852eedbf [PM] RewriterStatepointForGC: add missing dependency.
llvm-svn: 269624
2016-05-16 02:29:53 +00:00
Mike Spertus b27ebb8824 Simple visualization of expressions
While more could be done, showing the type is a lot better than what is there now.

llvm-svn: 269623
2016-05-16 01:36:09 +00:00
Craig Topper e5cc18054a [AVX512] Use correct types in test case.
llvm-svn: 269622
2016-05-16 01:09:19 +00:00
Craig Topper 91f23d900f [X86] Remove bad cast from the 'int' return type of __builtin_ia32_kortestchi to '__mask16' before return in an 'int' intrinsic.
llvm-svn: 269621
2016-05-16 01:09:16 +00:00
Craig Topper 7d00d2031d [AVX512] Fix bad typecasts on return value for 512-bit integer byte/word compare builtins.
llvm-svn: 269620
2016-05-16 00:51:06 +00:00
Craig Topper 0f7ea93541 [X86] Add immediate range checks for many of the builtins.
llvm-svn: 269619
2016-05-15 22:18:00 +00:00