Commit Graph

251539 Commits

Author SHA1 Message Date
Kelvin Li 4101032e5f [OpenMP] Support the 'is_device_ptr' clause with 'target parallel for' pragma
This patch is to add support of the 'is_device_ptr' clause with the 'target parallel for' pragma.

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

llvm-svn: 291540
2017-01-10 05:15:35 +00:00
Francis Ricci 17781c71b0 Make cmake link flag naming consistent
Summary:
The build system was inconsistent in its naming conventions for
link flags. This patch changes all uses of LINKFLAGS to LINK_FLAGS,
for consistency with cmake's LINK_FLAGS property.

This patch should make it easier to search the source code for
uses of link flags, as well as providing the benefit of improved
style and consistency.

Reviewers: compnerd, beanz

Subscribers: kubabrecka, llvm-commits, mgorny

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

llvm-svn: 291539
2017-01-10 04:33:04 +00:00
Dean Michael Berris 4ebc79bb05 [XRay] Use regular expression for finding symbols
Un-break the test in Windows.

Follow-up on D24376.

llvm-svn: 291538
2017-01-10 04:32:34 +00:00
Kelvin Li c4bfc6fa8f [OpenMP] Support the 'is_device_ptr' clause with 'target parallel for simd' pragma
This patch is to add support of the 'is_device_ptr' clause with the 'target parallel for simd' pragma.

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

llvm-svn: 291537
2017-01-10 04:26:44 +00:00
Saleem Abdulrasool 4ec493b231 threading_support: delete the critical section
Although the CriticalSection itself doesnt need to be destroyed, there
may be debug data associated with it.  Plug a possible small leak.

llvm-svn: 291536
2017-01-10 04:18:47 +00:00
Craig Topper 2ed461e5c4 [X86] When lowering uniform shifts, use X86ISD::VZEXT instead of using a ZERO_EXTEND_VECTOR_INREG. If we emit the ZERO_EXTEND_VECTOR_INREG too late it doesn't get lowered properly and makes it through to isel and fails.
Fixes PR31593.

llvm-svn: 291535
2017-01-10 04:12:24 +00:00
Craig Topper d915d6ba57 [DAGCombiner] Remove code for optimizing select (xor Cond, 0), X, Y -> select Cond, X, Y. Just let combine on the xor itself take care of it.
llvm-svn: 291534
2017-01-10 04:12:19 +00:00
Dean Michael Berris f45ecd6eb7 [XRay] Fixup includes for modules build
Remove unnecessary system header include.

Follow-up to D24376.

llvm-svn: 291533
2017-01-10 03:21:54 +00:00
Xin Tong 02b1397ac3 Fix a typo and also test a new machine for commit. NFC.
llvm-svn: 291532
2017-01-10 03:13:52 +00:00
Dean Michael Berris d2791c604d [XRay] Don't include <unistd.h> unnecessarily
Follow-up to D24376.

llvm-svn: 291531
2017-01-10 02:51:13 +00:00
Serge Pavlov 0668cd2c95 [StructurizeCfg] Update dominator info.
In some cases StructurizeCfg updates root node, but dominator info
remains unchanges, it causes crash when expensive checks are enabled.
To cope with this problem a new method was added to DominatorTreeBase
that allows adding new root nodes, it is called in StructurizeCfg to
put dominator tree in sync.

This change fixes PR27488.

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

llvm-svn: 291530
2017-01-10 02:50:47 +00:00
Dean Michael Berris f8f909f848 [XRay] Implement `llvm-xray convert` -- trace file conversion
This is the second part of a multi-part change to define additional
subcommands to the `llvm-xray` tool.

This change defines a conversion subcommand to take XRay log files, and
turns them from one format to another (binary or YAML). This currently
only supports the first version of the log file format, defined in the
compiler-rt runtime.

Depends on D21987.

Reviewers: dblaikie, echristo

Subscribers: mehdi_amini, dberris, beanz, llvm-commits

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

llvm-svn: 291529
2017-01-10 02:38:11 +00:00
Richard Smith f388f78bc6 Don't classify variable template names as type templates.
llvm-svn: 291528
2017-01-10 02:15:49 +00:00
Rui Ueyama 0697ae2ad9 Revert r291526: Re-enable /linkrepro test on Windows.
This broke the following two bots:

lld-x86_64-win7: the test failed because a diff command is not available
on that bot. That's a configuration error of the bot and will be fixed soon.

llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast: "tar xf" failed on that
bot. I suspect that it is due to the maximum path limitation on Windows.
A build directory contains a buildbot name, so it's longer than usual on
that machine. On Windows, many filesystem operations fail if a path is
longer than 255 characters. I'll try to address that in another patch.

llvm-svn: 291527
2017-01-10 02:08:37 +00:00
Rui Ueyama e98516ff99 Re-enable /linkrepro test on Windows.
I think generated tar files are more compatible with old tar commands
because of r291494 and r291340, so I want to enable this test on buildbots.

llvm-svn: 291526
2017-01-10 01:37:37 +00:00
Faisal Vali e1403990b7 [NFC] Rename RAII ExpressionEvaluationContext variable from Unevaluated to ConstantEvaluated when parsing a constant expression.
This renaming makes it consistent with the context it actually sets: Sema::ConstantEvaluated.

llvm-svn: 291525
2017-01-10 01:29:41 +00:00
Peter Collingbourne feb6629d6d ELF: Reserve space for copy relocations of read-only symbols in relro.
When reserving copy relocation space for a shared symbol, scan the DSO's
program headers to see if the symbol is in a read-only segment. If so,
reserve space for that symbol in a new synthetic section named .bss.rel.ro
which will be covered by the relro program header.

This fixes the security issue disclosed on the binutils mailing list at:
https://sourceware.org/ml/libc-alpha/2016-12/msg00914.html

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

llvm-svn: 291524
2017-01-10 01:21:50 +00:00
Peter Collingbourne 628ec9f193 ELF: Place relro sections after non-relro sections in r/w segment.
This is in preparation for my next change, which will introduce a relro
nobits section. That requires that relro sections appear at the end of the
progbits part of the r/w segment so that the relro nobits section can appear
contiguously.

Because of the amount of churn required in the test suite, I'm making this
change separately.

llvm-svn: 291523
2017-01-10 01:21:30 +00:00
Kuba Mracek 89c3170d61 Stop limiting the number of TSan backtrace size to 8
We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely). Let's remove this.

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

llvm-svn: 291522
2017-01-10 01:14:52 +00:00
Eli Friedman c6e3b6f156 Delete stray isl_map_dump call.
llvm-svn: 291521
2017-01-10 01:08:11 +00:00
Evandro Menezes 063259d4d1 [CodeGen] Implement the SUnit::print() method
This method seems to have had a troubled life.  This patch proposes that it
replaces the recently added helper function dumpSUIdentifier.  This way, the
method can be used in other files using the SUnit class.

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

llvm-svn: 291520
2017-01-10 01:08:01 +00:00
Reid Kleckner 4ed2942004 Try once again to fix the MSVC build of AlignedCharArrayUnion
It was complaining about ambiguity between llvm::detail and
llvm::support::detail:
  error C2872: 'detail': ambiguous symbol
  note: could be 'llvm::detail'
  note: or       'llvm::support::detail'

Standardize on llvm::support::detail to hide these symbols further.

llvm-svn: 291519
2017-01-10 01:05:33 +00:00
Mehdi Amini c92b612636 [ThinLTO] Hash more part of the config to build cache entries
This has been fixed in the "new" LTO API used by Gold/LLD, this is
fixing the same issue in the libLTO API used by ld64 (amongst other)

llvm-svn: 291518
2017-01-10 00:55:47 +00:00
Bruno Cardoso Lopes d7849a6c83 [Chrono][Darwin] Include header for gettimeofday
Followup on r291466 and include the proper header. This fixes:
https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/12620/steps/gclient%20runhooks/logs/stdio

llvm-svn: 291517
2017-01-10 00:51:02 +00:00
Xin Tong 12c8cb3745 Add an assert for hasLoopInvariantOperands
Summary: Add an assert for hasLoopInvariantOperands

Reviewers: danielcdh, sanjoy

Subscribers: mzolotukhin, llvm-commits

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

llvm-svn: 291516
2017-01-10 00:39:49 +00:00
Reid Kleckner ff27fec26b Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet
llvm-svn: 291515
2017-01-10 00:29:05 +00:00
Reid Kleckner 9aa2b31a02 Fix MSVC build of AlignedCharArrayUnion
Use constexpr recursion for alignof like we do for sizeof. Seems to work
with Clang and MSVC. Also, don't recurse twice to avoid slowdowns in
compilers that don't memoize constexpr results (Clang).

llvm-svn: 291514
2017-01-10 00:26:56 +00:00
Gor Nishanov d97f6bfbb1 [coroutines] Sema: Allow co_return all by itself.
Reviewers: rsmith, EricWF

Subscribers: mehdi_amini, llvm-commits, EricWF

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

llvm-svn: 291513
2017-01-10 00:08:31 +00:00
Richard Smith 43a833bec4 Check that template template arguments match template template parameters
properly even when a non-type template parameter has a dependent type.

Previously, if a non-type template parameter was dependent, but not dependent
on an outer level of template parameter, we would not match the type of the
parameter. Under [temp.arg.template], we are supposed to check that the types
are equivalent, which means checking for syntactic equivalence in the dependent
case.

This also fixes some accepts-invalids when passing templates with auto-typed
non-type template parameters as template template arguments.

llvm-svn: 291512
2017-01-09 23:54:33 +00:00
Alex Shlyapnikov 0e93c3932a ASAN activate/deactive controls thread_local_quarantine_size_kb option.
Summary: Also, bypass quarantine altogether when quarantine size is set ot zero.

Reviewers: eugenis

Subscribers: kubabrecka, llvm-commits, mehdi_amini

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

llvm-svn: 291511
2017-01-09 23:49:17 +00:00
Alex Shlyapnikov 518acec990 Bypass quarantine when quarantine size is set ot zero.
llvm-svn: 291510
2017-01-09 23:49:15 +00:00
Alex Shlyapnikov ae8e9bbb2c ASAN activate/deactive controls thread_local_quarantine_size_kb option.
llvm-svn: 291509
2017-01-09 23:49:13 +00:00
Michal Gorny c3afb8aa3d [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if available
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config. Fallback to local reconstruction if llvm-config does not
support this option.

llvm-svn: 291508
2017-01-09 23:41:38 +00:00
Michal Gorny db2e8acccf [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if available
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config. Fallback to local reconstruction if llvm-config does not
support this option.

llvm-svn: 291506
2017-01-09 23:31:05 +00:00
Michal Gorny 33f27fd842 [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if available
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config. Fallback to local reconstruction if llvm-config does not
support this option.

llvm-svn: 291505
2017-01-09 23:27:04 +00:00
Michal Gorny 72f8c5f555 [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if available
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config. Fallback to local reconstruction if llvm-config does not
support this option.

llvm-svn: 291504
2017-01-09 23:23:56 +00:00
Sean Callanan 4d9c5c2280 Lift the 10-type limit for AlignedCharArrayUnion
This patch uses C++11 parameter packs and constexpr functions
to allow AlignedCharArrayUnion to hold an arbitrary number of
types.

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

llvm-svn: 291503
2017-01-09 23:23:25 +00:00
Michal Gorny 47132e5cab [cmake] Obtain LLVM_CMAKE_PATH from llvm-config
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config instead of reconstructing it locally.

llvm-svn: 291502
2017-01-09 23:17:10 +00:00
Meador Inge 9a77ea8a86 [ELF] Fix `_gp` linker script test
Rafael suggested in review to wrap the `.` in an
`ABSOLUTE` op to force the section to be in the
*ABS* "section":

  * http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170109/417865.html

llvm-svn: 291501
2017-01-09 23:16:01 +00:00
Michal Gorny eb200b2ccf [cmake] Obtain LLVM_CMAKE_PATH from llvm-config
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config instead of reconstructing it locally.

llvm-svn: 291500
2017-01-09 23:12:37 +00:00
James Y Knight 5b30b67cd1 Commit a test for match-full-lines.
I unfortunately neglected to add it in r260540, but it has been
sitting in my working dir ever since. D'oh.

Modified to work with r290069, which made the CHECK patterns
themselves whitespace-sensitive as well, and remove the test added
then, as this tests both strict and non-strict modes.

llvm-svn: 291499
2017-01-09 23:11:25 +00:00
Dan Gohman 6055fbae62 [WebAssembly] Add return type annotations in fast isel.
llvm-svn: 291498
2017-01-09 23:09:38 +00:00
Justin Bogner 603715c66b Adorn __call_once_proxy with `inline` and `_LIBCPP_INLINE_VISIBILITY`
As per discussion with mclow and EricWF on irc, this is small and
simple enough to deserve being inlined.

llvm-svn: 291497
2017-01-09 23:07:12 +00:00
Rui Ueyama 817c9d66f0 Support non-regular output files.
This patch enables something like "-o /dev/null".
Previouly, it failed because such files cannot be renamed.

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

llvm-svn: 291496
2017-01-09 23:07:05 +00:00
Michal Gorny 8c5c7ffb8d [cmake] Obtain LLVM_CMAKE_PATH from llvm-config
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config instead of reconstructing it locally.

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

llvm-svn: 291495
2017-01-09 23:06:39 +00:00
Rui Ueyama e9d17545bc TarWriter: Fix a bug in Ustar header.
If we split a filename into `Name` and `Prefix`, `Prefix` is at most
145 bytes. We had a bug that didn't split a path correctly. This bug
was pointed out by Rafael in the post commit review.

This patch adds a unit test for TarWriter to verify the fix.

llvm-svn: 291494
2017-01-09 22:55:00 +00:00
George Burgess IV be92d5e930 Add a test for diagnose_if.
Forgot to add this file as a part of r291418.

llvm-svn: 291493
2017-01-09 22:43:16 +00:00
Marshall Clow 04b9853a97 Swap two lines in __mutex_base. On systems with high clock rates, we could mistakenly return no_timeout when a mutex had timed out if we got a tick between these two lines. Thanks to Brian Cain for the bug report.
llvm-svn: 291492
2017-01-09 22:32:11 +00:00
Douglas Yung 46d134c4ab Fixing test to work when the compiler defaults to a different C++ standard version.
Differential Revision: https://reviews.llvm.org/D28418

llvm-svn: 291491
2017-01-09 22:20:10 +00:00
Eugene Zelenko c9f1f6b8ec [NVPTX] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 291490
2017-01-09 22:16:51 +00:00