Dean Michael Berris [Thu, 30 Nov 2017 05:35:51 +0000 (05:35 +0000)]
[XRay][docs] Update documentation on new default for xray_naive_log=
We've recently changed the default for `xray_naive_log=` to be `false`
instead of `true` to make it more consistent with the FDR mode logging
implementation. This means we will now ask users to explicitly choose
which version of the XRay logging is being used.
llvm-svn: 319400
Graham Yiu [Thu, 30 Nov 2017 03:36:57 +0000 (03:36 +0000)]
- Removed unused lamba (IsReturnBlock) causing build bots to fail for r319398
- Added lit testcases that were supposed to be part of r319398
llvm-svn: 319399
Graham Yiu [Thu, 30 Nov 2017 02:41:36 +0000 (02:41 +0000)]
With PGO information, we can do more aggressive outlining of cold regions in the inline candidate function. This contrasts with the scheme of keeping only the 'early return' portion of the inline candidate and outlining the rest of the function as a single function call.
Support for outlining multiple regions of each function is added, as well as some basic heuristics to determine which regions are good to outline. Outline candidates limited to regions that are single-entry & single-exit. We also avoid outlining regions that produce live-exit variables, which may inhibit some forms of code motion (like commoning).
Fallback to the regular partial inlining scheme is retained when either i) no regions are identified for outlining in the function, or ii) the outlined function could not be inlined in any of its callers.
Differential Revision: https://reviews.llvm.org/D38190
llvm-svn: 319398
Kostya Serebryany [Thu, 30 Nov 2017 02:26:47 +0000 (02:26 +0000)]
[libFuzzer] mention one more trophie in the Linux Kernel
llvm-svn: 319397
Sam Clegg [Thu, 30 Nov 2017 01:40:08 +0000 (01:40 +0000)]
[WebAssembly] Allow function signature checking at link time
This change allows checking of function signatures but
does not yes enable it by default. In this mode, linking
two objects that were compiled with a different signatures
for the same function will produce a link error.
New options for enabling and disabling this feature have been
added: (--check-signatures/--no-check-signatures).
Differential Revision: https://reviews.llvm.org/D40371
llvm-svn: 319396
Rui Ueyama [Thu, 30 Nov 2017 01:08:09 +0000 (01:08 +0000)]
Remove unused condition.
Looks like all tests pass without this `isLocal()`.
Differential Revision: https://reviews.llvm.org/D39780
llvm-svn: 319395
Rui Ueyama [Thu, 30 Nov 2017 01:04:26 +0000 (01:04 +0000)]
Fix typo.
llvm-svn: 319394
Matt Arsenault [Thu, 30 Nov 2017 00:52:40 +0000 (00:52 +0000)]
AMDGPU: Allow negative MUBUF vaddr for gfx9
GFX9 does not enable bounds checking for the resource descriptors
used for private access, so it should be OK to use vaddr with
a potentially negative value.
llvm-svn: 319393
Rafael Espindola [Thu, 30 Nov 2017 00:44:22 +0000 (00:44 +0000)]
Check alignment in getSectionContentsAsArray.
While the ArrayRef can technically have unaligned data, it would be
extremely surprising if iterating over it caused undefined behavior
when a reference to the underlying type was bound.
llvm-svn: 319392
Vedant Kumar [Thu, 30 Nov 2017 00:28:23 +0000 (00:28 +0000)]
[Coverage] Use the most-recent completed region count (PR35437)
This is a fix for the coverage segment builder.
If multiple regions must be popped off the active stack at once, and
more than one of them end at the same location, emit a segment using the
count from the most-recent completed region.
Fixes PR35437, rdar://
35760630
Testing: invoked llvm-cov on a stage2 build of clang, additional unit
tests, check-profile
llvm-svn: 319391
Peter Collingbourne [Thu, 30 Nov 2017 00:27:08 +0000 (00:27 +0000)]
LowerTypeTests: Deduplicate code. NFC.
llvm-svn: 319390
Jim Ingham [Thu, 30 Nov 2017 00:23:42 +0000 (00:23 +0000)]
Fix the gtest target for the move of ArchSpecTest.cpp from Core to Utility.
<rdar://problem/
35562389>
llvm-svn: 319389
Dean Michael Berris [Thu, 30 Nov 2017 00:04:54 +0000 (00:04 +0000)]
[XRay][clang] Introduce -fxray-always-emit-customevents
Summary:
The -fxray-always-emit-customevents flag instructs clang to always emit
the LLVM IR for calls to the `__xray_customevent(...)` built-in
function. The default behaviour currently respects whether the function
has an `[[clang::xray_never_instrument]]` attribute, and thus not lower
the appropriate IR code for the custom event built-in.
This change allows users calling through to the
`__xray_customevent(...)` built-in to always see those calls lowered to
the corresponding LLVM IR to lay down instrumentation points for these
custom event calls.
Using this flag enables us to emit even just the user-provided custom
events even while never instrumenting the start/end of the function
where they appear. This is useful in cases where "phase markers" using
__xray_customevent(...) can have very few instructions, must never be
instrumented when entered/exited.
Reviewers: rnk, dblaikie, kpw
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D40601
llvm-svn: 319388
Peter Collingbourne [Thu, 30 Nov 2017 00:02:55 +0000 (00:02 +0000)]
LowerTypeTests: Remove unnecessary cast. NFC.
llvm-svn: 319387
Hans Wennborg [Wed, 29 Nov 2017 23:44:11 +0000 (23:44 +0000)]
MS ABI: Treat explicit instantiation definitions of dllimport function templates as explicit instantiation decls (PR35435)
This matches MSVC's behaviour, and we already do it for class templates
since r270897.
Differential revision: https://reviews.llvm.org/D40621
llvm-svn: 319386
Rafael Espindola [Wed, 29 Nov 2017 23:39:12 +0000 (23:39 +0000)]
Fix reloc section alignment in test.
This should fix the ubsan bot.
We still have to fix lld to produce a clean error on unaligned reloc
sections.
llvm-svn: 319385
Eugene Zelenko [Wed, 29 Nov 2017 23:27:36 +0000 (23:27 +0000)]
[AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 319384
Aaron Ballman [Wed, 29 Nov 2017 23:10:14 +0000 (23:10 +0000)]
Perform a bounds check on a function's argument list before accessing any index value specified by an 'argument_with_type_tag' attribute. Fixes PR28520.
Patch by Matt Davis.
llvm-svn: 319383
Craig Topper [Wed, 29 Nov 2017 23:08:25 +0000 (23:08 +0000)]
[X86] Remove some questionable looking code that seems to be looking through a VZEXT to create a larger VSEXT.
If the input the vzext was signed this would do the wrong thing.
Not sure how to test this.
llvm-svn: 319382
Joerg Sonnenberger [Wed, 29 Nov 2017 23:05:56 +0000 (23:05 +0000)]
First step towards more human-friendly PPC assembler output:
- add -ppc-reg-with-percent-prefix option to use %r3 etc as register
names
- split off logic for Darwinish verbose conditional codes into a helper
function
- be explicit about Darwin vs AIX vs GNUish assembler flavors
Based on the patch from Alexandre Yukio Yamashita
Differential Revision: https://reviews.llvm.org/D39016
llvm-svn: 319381
Sam Clegg [Wed, 29 Nov 2017 23:05:50 +0000 (23:05 +0000)]
[WebAssembly] Update test expectations for gcc torture tests
I believe these were recently fixed by:
https://reviews.llvm.org/rL319186
Differential Revision: https://reviews.llvm.org/D40619
llvm-svn: 319380
Jonathan Peyton [Wed, 29 Nov 2017 22:47:52 +0000 (22:47 +0000)]
Make kmp_r_sched_t into a union
This change makes kmp_r_sched_t type into a union for simpler
comparisons and assignments
Patch by Terry Wilmarth
Differential Revision: https://reviews.llvm.org/D40374
llvm-svn: 319379
Rafael Espindola [Wed, 29 Nov 2017 22:47:35 +0000 (22:47 +0000)]
Use Symbol::File directly.
We are already paying the cost of storing a InputFile in every
Symbol, so use it uniformly.
llvm-svn: 319378
Zachary Turner [Wed, 29 Nov 2017 22:41:56 +0000 (22:41 +0000)]
[CodeView] Factor some code out of TypeTableBuilder.
This class had some code that would automatically remap type
indices before hashing and serializing. The only caller of
this method was the TypeStreamMerger anyway, and the method
doesn't make general sense, and prevents making certain future
improvements to the class. So, factoring this up one level
into the TypeStreamMerger where it belongs.
llvm-svn: 319377
Eugene Zelenko [Wed, 29 Nov 2017 22:39:22 +0000 (22:39 +0000)]
[AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 319376
Jonathan Peyton [Wed, 29 Nov 2017 22:29:38 +0000 (22:29 +0000)]
Fix aligned memory allocation in the stub library
kmp_aligned_malloc() always returned NULL on Windows (stub library only)
that may cause Fortran application crash. With this change all memory
allocation functions were fixed to use aligned{m,re,rec}alloc() to
allocate/reallocate memory. To deallocate that memory _aligned_free() is
used in kmp_free().
Patch by Olga Malysheva
Differential Revision: https://reviews.llvm.org/D40296
llvm-svn: 319375
Jonathan Peyton [Wed, 29 Nov 2017 22:27:18 +0000 (22:27 +0000)]
Warning is emitted when tiles are requested but cannot be used
Added two warnings:
1) Before building the topology map check if tiles are requested but the
topo method is not hwloc;
2) After building the topology map check if tiles are requested but not
detected by the library.
Patch by Olga Malysheva
Differential Revision: https://reviews.llvm.org/D40340
llvm-svn: 319374
Vedant Kumar [Wed, 29 Nov 2017 22:25:14 +0000 (22:25 +0000)]
[Coverage] Emit gap areas in braces-optional statements (PR35387)
Emit a gap area starting after the r-paren location and ending at the
start of the body for the braces-optional statements (for, for-each,
while, etc). The count for the gap area equal to the body's count. This
extends the fix in r317758.
Fixes PR35387, rdar://
35570345
Testing: stage2 coverage-enabled build of clang, check-clang
llvm-svn: 319373
Jonathan Peyton [Wed, 29 Nov 2017 22:23:44 +0000 (22:23 +0000)]
Fix types of Fortran array elements
Fortran array elements made default integer in OMP_GET_PLACE_PROC_IDS and
OMP_GET_PARTITION_PLACE_NUMS subroutines, otherwise call to them produces
incorrect result.
Patch by Olga Malysheva
Differential Revision: https://reviews.llvm.org/D40356
llvm-svn: 319372
Rui Ueyama [Wed, 29 Nov 2017 22:21:37 +0000 (22:21 +0000)]
Use llvm::StringSet instead of std::set.
std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.
Differential Revision: https://reviews.llvm.org/D40579
llvm-svn: 319371
Rafael Espindola [Wed, 29 Nov 2017 22:20:03 +0000 (22:20 +0000)]
Simplify. NFC.
llvm-svn: 319370
Eugene Zelenko [Wed, 29 Nov 2017 22:17:39 +0000 (22:17 +0000)]
[Documentation] Sort Clang-tidy changes next way: new modules, new checks, renamed checks, extended checks, new check aliases.
Sort checks in each section alphabetically.
llvm-svn: 319369
Craig Topper [Wed, 29 Nov 2017 22:15:43 +0000 (22:15 +0000)]
[SelectionDAG][X86] Teach promotion legalization for fp_to_sint/fp_to_uint to insert an assertsext/assertzext based on the original type
If we put in an assertsext/zext here, we're able to generate better truncate code using pack on pre-avx512 targets.
Similar is already done during type legalization. This is the equivalent for op legalization
Differential Revision: https://reviews.llvm.org/D40591
llvm-svn: 319368
Rafael Espindola [Wed, 29 Nov 2017 22:09:16 +0000 (22:09 +0000)]
Don't crash on broken debug info.
llvm-svn: 319367
Dean Michael Berris [Wed, 29 Nov 2017 22:06:12 +0000 (22:06 +0000)]
[XRay][compiler-rt][Darwin] Use dynamic initialisation as an alternative
Summary:
In cases where we can't use the .preinit_array section (as in Darwin for
example) we instead use dynamic initialisation. We know that this
alternative approach will race with the initializers of other objects at
global scope, but this is strictly better than nothing.
Reviewers: kubamracek, nglevin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40599
llvm-svn: 319366
Kuba Mracek [Wed, 29 Nov 2017 21:42:48 +0000 (21:42 +0000)]
[sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib from DYLD_INSERT_LIBRARIES
On macOS, we usually don't require launching the target with DYLD_INSERT_LIBRARIES anymore. However, it is still necessary when running a target that is not instrumented (and e.g. dlopen's an instrument library later). In any case, ASan and TSan currently remove themselves from the DYLD_INSERT_LIBRARIES environment variable to avoid passing it onto children. This works well e.g. when instrumenting a shell. A problem arises when the target is a non-instrumented shim (e.g. "xcrun") that either re-execs or launches a child that is supposed to get DYLD_INSERT_LIBRARIES propagated. To support this mode, this patch introduces 'strip_env' flag that can be used to keep DYLD_INSERT_LIBRARIES untouched.
Differential Revision: https://reviews.llvm.org/D39991
llvm-svn: 319365
Reid Kleckner [Wed, 29 Nov 2017 21:36:00 +0000 (21:36 +0000)]
Reformat switch statement added in r319297, NFC
llvm-svn: 319364
Reid Kleckner [Wed, 29 Nov 2017 21:35:34 +0000 (21:35 +0000)]
[EH] Use __CxxFrameHandler3 for C++ EH in MS environments
Fixes regression introduced by r319297. MSVC environments still use SEH
unwind opcodes but they should use the Microsoft C++ EH personality, not
the mingw one.
llvm-svn: 319363
Alexey Bataev [Wed, 29 Nov 2017 21:31:48 +0000 (21:31 +0000)]
[OPENMP] Allow only loop control variables in distribute simd
directives.
According to the OpenMP standard, only loop control variables can be
used in linear clauses of distribute-based simd directives.
llvm-svn: 319362
Rafael Espindola [Wed, 29 Nov 2017 21:29:52 +0000 (21:29 +0000)]
Replace a dyn_cast with a cast. NFC.
llvm-svn: 319361
Aaron Ballman [Wed, 29 Nov 2017 21:21:51 +0000 (21:21 +0000)]
Add the hasDefinition() AST matcher to match class declarations that also have a definition.
Patch by Julie Hockett.
llvm-svn: 319360
Jan Kratochvil [Wed, 29 Nov 2017 21:13:11 +0000 (21:13 +0000)]
refactor: Unify+simplify DWARFCompileUnit ctor+Clear() into in-class initializers + Extract()
It has no functionality effect.
I was concerned about the worse performance of DWARFDebugInfo::Parse this way
of allocating+destroying a CU for each iteration but I see it is now used only
by DWARFDebugInfo::Dump so that is no longer a problem.
Differential revision: https://reviews.llvm.org/D40212
llvm-svn: 319359
Mandeep Singh Grang [Wed, 29 Nov 2017 20:55:13 +0000 (20:55 +0000)]
[SourceLocations] Use stronger sort predicate to remove non-deterministic ordering
Summary:
This fixes the following failure uncovered by D39245:
Clang :: Index/getcursor-preamble.m
Reviewers: gbenyei, akyrtzi, bkramer, arphaman
Reviewed By: arphaman
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D40618
llvm-svn: 319357
Rui Ueyama [Wed, 29 Nov 2017 20:46:13 +0000 (20:46 +0000)]
[LLD] [COFF] Support ENTRY and SUBSYSTEM in .drectve sections
Adds support for "/ENTRY" and "/SUBSYSTEM" linker options in .drectve
sections. Some Mozilla binaries were using these directives and MSVC
link.exe appears to allow them. No attempt is made to reconcile these
with the options on the command line.
Patch by David Major!
Differential Revision: https://reviews.llvm.org/D39972
llvm-svn: 319356
Rui Ueyama [Wed, 29 Nov 2017 20:45:58 +0000 (20:45 +0000)]
Remove `else` or `break` after `fatal`. NFC.
fatal() does not return, so we don't need `else` or `break` after a call
of fatal.
llvm-svn: 319355
Dan Gohman [Wed, 29 Nov 2017 20:20:11 +0000 (20:20 +0000)]
[WebAssembly] Fix fptoui lowering bounds
To fully avoid trapping on wasm, fptoui needs a second check to ensure that
the operand isn't below the supported range.
llvm-svn: 319354
Sam Clegg [Wed, 29 Nov 2017 20:10:14 +0000 (20:10 +0000)]
Add libstd++-4.8 exceptions to ubsan_blacklist.txt
Differential Revision: https://reviews.llvm.org/D40589
llvm-svn: 319353
Krzysztof Parzyszek [Wed, 29 Nov 2017 19:59:29 +0000 (19:59 +0000)]
[Hexagon] Remove HexagonISD::PACKHL
llvm-svn: 319352
Krzysztof Parzyszek [Wed, 29 Nov 2017 19:58:10 +0000 (19:58 +0000)]
[Hexagon] Create helpers extractVector and insertVector in lowering
llvm-svn: 319351
Kostya Kortchinsky [Wed, 29 Nov 2017 19:52:09 +0000 (19:52 +0000)]
[scudo] Allow for compile-time choice of the SizeClassMap
Summary:
With this change, we allow someone to chose the `SizeClassMap` they want to use
at compile time via a define.
I feel somewhat unimaginative with the name of the defines, so if someone has a
better idea, let me know. I have been alternating between those and
`SCUDO_USE_xxx_SIZECLASSMAP` which is clearer but also longer. The issue with
those is that it wouldn't be consistent with `SCUDO_TSD_EXCLUSIVE` that should
probably become `SCUDO_USE_EXCLUSIVE_TSD` maybe?
Anyway, naming is hard, and I am not sure what makes more sense!
Reviewers: alekseyshl, flowerhack
Reviewed By: alekseyshl
Subscribers: llvm-commits, srhines
Differential Revision: https://reviews.llvm.org/D40521
llvm-svn: 319350
Kuba Mracek [Wed, 29 Nov 2017 19:47:14 +0000 (19:47 +0000)]
[compiler-rt] Switch from deprecated TARGET_IPHONE_SIMULATOR to TARGET_OS_SIMULATOR
Differential Revision: https://reviews.llvm.org/D39987
llvm-svn: 319349
Kuba Mracek [Wed, 29 Nov 2017 19:44:52 +0000 (19:44 +0000)]
[asan] Fix macOS FindDynamicShadowStart to consider the last gap in the VM map
It looks FindDynamicShadowStart has a bug: When iterating over the memory map, we will not consider the very last gap in the address space. Let's fix that.
Differential Revision: https://reviews.llvm.org/D39989
llvm-svn: 319348
Kuba Mracek [Wed, 29 Nov 2017 19:43:11 +0000 (19:43 +0000)]
[asan] Don't crash on fclose(NULL)
It's explicitly forbidden to call fclose with NULL, but at least on Darwin, this succeeds and doesn't segfault. To maintain binary compatibility, ASan should survice fclose(NULL) as well.
Differential Revision: https://reviews.llvm.org/D40053
llvm-svn: 319347
Simon Pilgrim [Wed, 29 Nov 2017 19:37:38 +0000 (19:37 +0000)]
[X86][AVX512] Tag RCP/RSQRT/GETEXP instructions scheduler classes (REVERSION)
Accidental commit of incomplete patch
llvm-svn: 319346
Zachary Turner [Wed, 29 Nov 2017 19:35:21 +0000 (19:35 +0000)]
Make TypeTableBuilder inherit from TypeCollection.
A couple of places in LLD were passing references to
TypeTableCollections around, which makes it hard to change the
implementation at runtime. However, these cases only needed to
iterate over the types in the collection, and TypeCollection
already provides a handy abstract interface for this purpose.
By implementing this interface, we can get rid of the need to
pass TypeTableBuilder references around, which should allow us
to swap the implementation at runtime in subsequent patches.
llvm-svn: 319345
Kuba Mracek [Wed, 29 Nov 2017 19:33:35 +0000 (19:33 +0000)]
[asan] Allow getpwnam(NULL) for binary compatibility
Calling getpwnam(NULL) is probably a bug, but at least on Darwin, such a call succeeds without segfaulting. I have some existing code that relies on that. To maintain binary compatibility, ASan should also survive a call to getpwnam with NULL.
Differential Revision: https://reviews.llvm.org/D40052
llvm-svn: 319344
Jonas Hahnfeld [Wed, 29 Nov 2017 19:31:52 +0000 (19:31 +0000)]
[CMake] Refactor testing infrastructure
The code for the two OpenMP runtime libraries was very similar.
Move to common CMake file that is included and provides a simple
interface for adding testsuites. Also add a common check-openmp
target that runs all testsuites that have been registered.
Note that this renames all test options to the common OPENMP
namespace, for example OPENMP_TEST_C_COMPILER instead of
LIBOMP_TEST_COMPILER and so on.
Differential Revision: https://reviews.llvm.org/D40082
llvm-svn: 319343
Jonas Hahnfeld [Wed, 29 Nov 2017 19:31:48 +0000 (19:31 +0000)]
[CMake] Refactor common settings and flags
These are needed by both libraries, so we can do that in a
common namespace and unify configuration parameters.
Also make sure that the user isn't requesting libomptarget
if the library cannot be built on the system. Issue an error
in that case.
Differential Revision: https://reviews.llvm.org/D40081
llvm-svn: 319342
Jonas Hahnfeld [Wed, 29 Nov 2017 19:31:43 +0000 (19:31 +0000)]
[CMake] Disallow direct configuration
As a first step, this allows us to generalize the detection of
standalone builds and make it fully compatible when building in
llvm/runtimes/ which automatically sets OPENMP_STANDLONE_BUILD.
Differential Revision: https://reviews.llvm.org/D40080
llvm-svn: 319341
Zachary Turner [Wed, 29 Nov 2017 19:29:25 +0000 (19:29 +0000)]
Fix line endings in llvm-pdbutil.cpp
llvm-svn: 319340
Kuba Mracek [Wed, 29 Nov 2017 19:27:25 +0000 (19:27 +0000)]
[sanitizer] Refactor how assembly files are handled
This renames ASM_TSAN_SYMBOL and ASM_TSAN_SYMBOL_INTERCEPTOR to just ASM_SYMBOL and ASM_SYMBOL_INTERCEPTOR, because they can be useful in more places than just TSan. Also introduce a CMake function to add ASM sources to a target.
Differential Revision: https://reviews.llvm.org/D40143
llvm-svn: 319339
Simon Pilgrim [Wed, 29 Nov 2017 19:19:59 +0000 (19:19 +0000)]
[X86][AVX512] Tag RCP/RSQRT/GETEXP instructions scheduler classes
llvm-svn: 319338
Simon Pilgrim [Wed, 29 Nov 2017 18:52:20 +0000 (18:52 +0000)]
[X86][AVX512] Tag 3OP (shuffles, double-shifts and GFNI) instructions scheduler classes
llvm-svn: 319337
Reid Kleckner [Wed, 29 Nov 2017 18:45:03 +0000 (18:45 +0000)]
[clang-cl] Alias /wd4018 to -Wno-sign-compare
This warning is known to be noisy and projects frequently disable it. In
particular, this should make building isl as bundled in polly with
clang-cl a lot quieter.
llvm-svn: 319336
Rafael Espindola [Wed, 29 Nov 2017 18:43:34 +0000 (18:43 +0000)]
Replace another dyn_cast with a cast.
llvm-svn: 319335
Rafael Espindola [Wed, 29 Nov 2017 18:32:57 +0000 (18:32 +0000)]
Replace a dyn_cast with a cast.
It is always accessed, so there is no value in a dyn_cast.
llvm-svn: 319334
Devin Coughlin [Wed, 29 Nov 2017 18:25:37 +0000 (18:25 +0000)]
[analyzer] Fix unreachable creating PathDiagnosticLocation with widen-loops=true
In the original design of the analyzer, it was assumed that a BlockEntrance
doesn't create a new binding on the Store, but this assumption isn't true when
'widen-loops' is set to true. Fix this by finding an appropriate location
BlockEntrace program points.
Patch by Henry Wong!
Differential Revision: https://reviews.llvm.org/D37187
llvm-svn: 319333
Alexey Bataev [Wed, 29 Nov 2017 18:20:04 +0000 (18:20 +0000)]
[OPENMP] Do not allow `linear` clauses on non-simd distribute
directives.
`linear` clause is not allowed on non-simd distribute-based directives.
llvm-svn: 319332
Nirav Dave [Wed, 29 Nov 2017 18:06:13 +0000 (18:06 +0000)]
[ARM][DAG] Revert Disable post-legalization store merge for ARM
Partially reverting enabling of post-legalization store merge
(r319036) for just ARM backend as it is causing incorrect code
in some Thumb2 cases.
llvm-svn: 319331
Greg Bedwell [Wed, 29 Nov 2017 18:05:32 +0000 (18:05 +0000)]
[cmake] Replace -Wall with /W4 in clang-cl options now that -Wall aliases -Weverything
Instead, reuse the code-path for cl.exe that adds /W4 , which for clang-cl
aliases clang's "-Wall -Wextra" which matches what clang-cl's /Wall
previously aliased.
This should restore the verbosity of a Windows selfhost build back to
its previous levels.
Differential Revision: https://reviews.llvm.org/D40603
llvm-svn: 319330
Greg Bedwell [Wed, 29 Nov 2017 18:05:26 +0000 (18:05 +0000)]
Make check-lit tests respect LLVM_LIT_TOOLS_DIR
Differential Revision: https://reviews.llvm.org/D40520
llvm-svn: 319329
Zaara Syeda [Wed, 29 Nov 2017 17:26:20 +0000 (17:26 +0000)]
[Power9] add more tests for D38287; NFC
llvm-svn: 319328
Sanjay Patel [Wed, 29 Nov 2017 17:21:39 +0000 (17:21 +0000)]
[InstCombine] add tests for select-of-constants; NFC
These are variants of a test that was originally added in:
https://reviews.llvm.org/rL75531
...but removed with:
https://reviews.llvm.org/rL159230
llvm-svn: 319327
Simon Pilgrim [Wed, 29 Nov 2017 17:21:15 +0000 (17:21 +0000)]
[X86][AVX512] Add itinerary argument to all AVX512_maskable_* wrappers. NFCI
All default to NoItinerary
llvm-svn: 319326
Alexander Kornienko [Wed, 29 Nov 2017 17:16:09 +0000 (17:16 +0000)]
[clang-tidy] make readability-simplify-bool-expr completely ignore macros
llvm-svn: 319325
Adam Nemet [Wed, 29 Nov 2017 17:07:41 +0000 (17:07 +0000)]
Add opt-viewer testing
Detects whether we have the Python modules (pygments, yaml) required by
opt-viewer and hooks this up to REQUIRES.
This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer
testing).
It's also related to https://github.com/apple/swift/pull/12938 and the idea is
to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake.
Differential Revision: https://reviews.llvm.org/D40202
Fixes since the first commit:
1. Disable syntax highlighting as different versions of pygments generate
different HTML
2. Use llvm-cxxfilt from the build
llvm-svn: 319324
Chad Rosier [Wed, 29 Nov 2017 16:42:44 +0000 (16:42 +0000)]
[Driver] Turns out the GNU assembler does support falkor/saphira.
llvm-svn: 319323
Ismail Donmez [Wed, 29 Nov 2017 15:18:02 +0000 (15:18 +0000)]
Fix function call to fix build
../tools/clang/lib/Driver/ToolChains/Cuda.cpp:80:18: error: reference to non-static member function must be called; did you mean to call it with no arguments?
if (Distro(D.getVFS).IsDebian())
~~^~~~~~
()
llvm-svn: 319322
Sander de Smalen [Wed, 29 Nov 2017 15:14:39 +0000 (15:14 +0000)]
Reverted r319315 because of unused functions (due to PPR not yet being
used by any instructions).
llvm-svn: 319321
Alexey Bataev [Wed, 29 Nov 2017 15:14:16 +0000 (15:14 +0000)]
[OPENMP] General improvement of handling of `teams distribute`
directive, NFC.
Some general improvements in support of `teams distribute` directive.
llvm-svn: 319320
Sylvestre Ledru [Wed, 29 Nov 2017 15:11:53 +0000 (15:11 +0000)]
Follow up of r319317, add the missing header file
llvm-svn: 319319
Manuel Klimek [Wed, 29 Nov 2017 15:09:12 +0000 (15:09 +0000)]
Fix 'control reaches end of non-void' warning by using llvm_unreachable.
llvm-svn: 319318
Sylvestre Ledru [Wed, 29 Nov 2017 15:03:28 +0000 (15:03 +0000)]
Add the nvidia-cuda-toolkit Debian package path to search path
Summary:
Reported here:
http://bugs.debian.org/882505
Patch by Andreas Beckmann
Reviewers: Hahnfeld, tra
Reviewed By: tra
Subscribers: jlebar, cfe-commits
Differential Revision: https://reviews.llvm.org/D40453
llvm-svn: 319317
Simon Pilgrim [Wed, 29 Nov 2017 14:58:34 +0000 (14:58 +0000)]
[X86][AVX512] Tag VPERMILV instruction scheduler class
llvm-svn: 319316
Sander de Smalen [Wed, 29 Nov 2017 14:34:18 +0000 (14:34 +0000)]
[AArch64][SVE] Asm: Add SVE predicate register definitions and parsing support
Summary: Patch [1/4] in a series to add parsing of predicates and properly parse SVE ZIP1/ZIP2 instructions.
Reviewers: rengolin, kristof.beyls, fhahn, mcrosier, evandro, echristo, efriedma
Reviewed By: fhahn
Subscribers: aemerson, javed.absar, llvm-commits, tschuett
Differential Revision: https://reviews.llvm.org/D40360
llvm-svn: 319315
Manuel Klimek [Wed, 29 Nov 2017 14:29:43 +0000 (14:29 +0000)]
Restructure how we break tokens.
This fixes some bugs in the reflowing logic and splits out the concerns
of reflowing from BreakableToken.
Things to do after this patch:
- Refactor the breakProtrudingToken function possibly into a class, so we
can split it up into methods that operate on the common state.
- Optimize whitespace compression when reflowing by using the next possible
split point instead of the latest possible split point.
- Retry different strategies for reflowing (strictly staying below the
column limit vs. allowing excess characters if possible).
Differential Revision: https://reviews.llvm.org/D40310
llvm-svn: 319314
Diana Picus [Wed, 29 Nov 2017 14:20:06 +0000 (14:20 +0000)]
[ARM GlobalISel] Fix selecting G_BRCOND
When lowering a G_BRCOND, we generate a TSTri of the condition against
1, which sets the flags, and then a Bcc which branches based on the
value of the flags.
Unfortunately, we were using the wrong condition code to check whether
we need to branch (EQ instead of NE), which caused all our branches to
do the opposite of what they were intended to do. This patch fixes the
issue by using the correct condition code.
llvm-svn: 319313
Simon Pilgrim [Wed, 29 Nov 2017 13:49:51 +0000 (13:49 +0000)]
[X86][AVX512] Setup unary (PABS/VPLZCNT/VPOPCNT/VPCONFLICT/VMOV*DUP) instruction scheduler classes
llvm-svn: 319312
Dmitry Preobrazhensky [Wed, 29 Nov 2017 13:33:40 +0000 (13:33 +0000)]
[AMDGPU][MC][GFX9] Corrected mapping of GFX9 v_add/sub/subrev_u32
When translating pseudo to MC, v_add/sub/subrev_u32 shall be mapped via a separate table as GFX8 has opcodes with the same names.
These instructions shall also be labelled as renamed for pseudoToMCOpcode to handle them correctly.
Reviewers: arsenm
Differential Revision: https://reviews.llvm.org/D40550
llvm-svn: 319311
Simon Pilgrim [Wed, 29 Nov 2017 12:12:27 +0000 (12:12 +0000)]
[X86][SSE] Merged sse2_unpack and sse2_unpack PUNPCK instruction templates. NFCI.
llvm-svn: 319310
Sam McCall [Wed, 29 Nov 2017 11:36:46 +0000 (11:36 +0000)]
[clangd] Simplify common JSON-parsing patterns in Protocol.
Summary:
This makes the parse() functions about as short as they can be given the
current signature, and moves all array-traversal etc code to a
central location.
We keep the ability to distinguish between optional and required fields:
and we don't propagate parse errors for optional fields.
I've made most fields required per the LSP spec - the looseness we had
here was mostly a historical accident I think.
Reviewers: ioeric
Subscribers: klimek, cfe-commits, ilya-biryukov
Differential Revision: https://reviews.llvm.org/D40564
llvm-svn: 319309
Simon Pilgrim [Wed, 29 Nov 2017 11:35:45 +0000 (11:35 +0000)]
[X86][SSE] Merged sse2_pack and sse2_pack_y PACKSS/PACKUS instruction templates. NFCI.
llvm-svn: 319308
Peter Smith [Wed, 29 Nov 2017 11:15:12 +0000 (11:15 +0000)]
[ELF][AArch64] Add support for AArch64 range thunks.
The AArch64 unconditional branch and branch and link instructions have a
maximum range of 128 Mib. This is usually enough for most programs but
there are cases when it isn't enough. This change adds support for range
extension thunks to AArch64. For pc-relative thunks we follow the small
code model and use ADRP, ADD, BR. This has a limit of 4 gigabytes.
Differential Revision: https://reviews.llvm.org/D39744
llvm-svn: 319307
Max Kazantsev [Wed, 29 Nov 2017 10:54:16 +0000 (10:54 +0000)]
[SCEV][NFC] Break from loop after we found first non-Phi in getAddRecExprPHILiterally
llvm-svn: 319306
Kamil Rytarowski [Wed, 29 Nov 2017 10:23:59 +0000 (10:23 +0000)]
Defer StartBackgroundThread() and StopBackgroundThread() in TSan
Summary:
NetBSD cannot spawn new POSIX thread entities in early
libc and libpthread initialization stage. Defer this to the point
of intercepting the first pthread_create(3) call.
This is the last change that makes Thread Sanitizer functional
on NetBSD/amd64 without downstream patches.
********************
Testing Time: 64.91s
********************
Failing Tests (5):
ThreadSanitizer-x86_64 :: dtls.c
ThreadSanitizer-x86_64 :: ignore_lib5.cc
ThreadSanitizer-x86_64 :: ignored-interceptors-mmap.cc
ThreadSanitizer-x86_64 :: mutex_lock_destroyed.cc
ThreadSanitizer-x86_64 :: vfork.cc
Expected Passes : 290
Expected Failures : 1
Unsupported Tests : 83
Unexpected Failures: 5
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, dvyukov, vitalybuka
Reviewed By: dvyukov
Subscribers: kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D40583
llvm-svn: 319305
Peter Smith [Wed, 29 Nov 2017 10:20:46 +0000 (10:20 +0000)]
[ELF] Make sure SHT_ARM_ATTRIBUTES is only recognized by Arm Targets
The SHT_ARM_ATTRIBUTES section type is in the processor specific space
adding guard to make sure that it is only recognized when EMachine is
EM_ARM.
llvm-svn: 319304
Oliver Stannard [Wed, 29 Nov 2017 10:12:15 +0000 (10:12 +0000)]
[ARM] Add support for armv7e-m to the .arch directive
This will allow compilation of assembly files targeting armv7e-m without having
to specify the Tag_CPU_arch attribute as a workaround.
Differential revision: https://reviews.llvm.org/D40370
Patch by Ian Tessier!
llvm-svn: 319303
Serguei Katkov [Wed, 29 Nov 2017 09:48:50 +0000 (09:48 +0000)]
[CGP] Enable complex addr mode
Enable complex addr modes after two critical fixes: rL319109 and rL319292
llvm-svn: 319302
Jonas Paulsson [Wed, 29 Nov 2017 09:16:37 +0000 (09:16 +0000)]
Comment fix in SelectionDAG.h
/// Replace any uses of From with To, leaving
- /// uses of other values produced by From.Val alone.
+ /// uses of other values produced by From.getNode() alone.
void ReplaceAllUsesOfValueWith(SDValue From, SDValue To);
(this is what it says in the .cpp file above this method)
llvm-svn: 319301
Martin Storsjo [Wed, 29 Nov 2017 08:21:12 +0000 (08:21 +0000)]
Support building libunwind as a DLL
Differential Revision: https://reviews.llvm.org/D40483
llvm-svn: 319300