Commit Graph

251663 Commits

Author SHA1 Message Date
Arpith Chacko Jacob bb36fe8dba [OpenMP] Basic support for a parallel directive in a target region on an NVPTX device
Summary:

This patch introduces support for the execution of parallel constructs in a target
region on the NVPTX device.  Parallel regions must be in the lexical scope of the
target directive.

The master thread in the master warp signals parallel work for worker threads in worker
warps on encountering a parallel region.

Note: The patch does not yet support capture of arguments in a parallel region so
the test cases are simple.

Reviewers: ABataev
Differential Revision: https://reviews.llvm.org/D28145

llvm-svn: 291565
2017-01-10 15:42:51 +00:00
Alex Lorenz 0e613727ee [Sema] Avoid -Wshadow warning when a "redefinition of " error is presented
This commit ensures that clang avoids the redundant -Wshadow warning for
variables that already get a "redefinition of " error.

rdar://29067894

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

llvm-svn: 291564
2017-01-10 14:41:13 +00:00
Pavel Labath 00b3f3c11b XFAIL TestRegisterVariables on gcc-4.8-x86_64
I have previously enabled this test for this configuration. However, it turns
out it only passes for gcc-4.9.

llvm-svn: 291563
2017-01-10 14:39:26 +00:00
Simon Dardis f790ff3da0 Revert "[mips] Honour -mno-odd-spreg for vector splat"
This reverts commit r291556. It was a mixture of two differentials and
was missing a test.

llvm-svn: 291562
2017-01-10 13:57:44 +00:00
Maxim Ostapenko 0f0407331e [sanitizer] Fix sigaction definition on 32-bit sparc
Patch by James Clarke.

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

llvm-svn: 291561
2017-01-10 12:41:18 +00:00
Diana Picus c1e2ab3626 Revert r291509, 291510 and 291511
Revert "ASAN activate/deactive controls thread_local_quarantine_size_kb option."
Revert "Bypass quarantine when quarantine size is set ot zero."
Revert "ASAN activate/deactive controls thread_local_quarantine_size_kb option."

One of these commits broke some of the ARM / AArch64 buildbots:
TEST 'AddressSanitizer-aarch64-linux :: TestCases/Posix/start-deactivated.cc' FAILED

Command Output (stderr):
--
/home/buildslave/buildslave/clang-cmake-aarch64-42vma/llvm/projects/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc:85:12: error: expected string not found in input
 // CHECK: WARNING: AddressSanitizer failed to allocate 0xfff{{.*}} bytes
           ^
<stdin>:1:1: note: scanning from here
start-deactivated.cc.tmp: /home/buildslave/buildslave/clang-cmake-aarch64-42vma/llvm/projects/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc:40: void test_malloc_shadow(char *, size_t, bool): Assertion `(char *)__asan_region_is_poisoned(p - 1, sz + 1) == (expect_redzones ? p - 1 : nullptr)' failed.
^
<stdin>:2:1: note: possible intended match here
Error: Aborted (core dumped)
^

llvm-svn: 291560
2017-01-10 11:14:44 +00:00
Tamas Berghammer 556b1611cd Improve Type::GetTypeScopeAndBasenameHelper and add unit tests
Previously it failed to handle nested types inside templated classes
making it impossible to look up these types using the fully qualified
name.

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

llvm-svn: 291559
2017-01-10 11:13:59 +00:00
Eugene Leviant 8e32aebe80 RuntimeDyldELF: implement R_AARCH64_PREL64 reloc
Differential revision: https://reviews.llvm.org/D28122

llvm-svn: 291558
2017-01-10 11:05:30 +00:00
Simon Dardis f4041a2714 [mips] Honour -mno-odd-spreg for vector splat
Previous the lowering of FILL_FW would use the MSA128W register class when
performing a vector splat. Instead it should be honouring -mno-odd-spreg and
only use the even registers when performing a splat from word to vector
register.

Logical follow-on from r230235.

This fixes PR/31369.

Reviewers: slthakur

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

llvm-svn: 291556
2017-01-10 10:28:37 +00:00
Pavel Labath e92b965bbf [cmake] Fix LLVM_LINK_LLVM_DYLIB build, again
The llvm_config hack for lldb-server is only necessary for !DYLIB builds, as
otherwise we would get unresolved symbols from lldb libraries which do not track
their dependencies correctly (all of them). In a DYLIB build, the so will
already be added to the link dependencies and we can use that to resolve all
missing symbols.

The proper fix for this would be to have each lldb library track its
dependencies correctly.

llvm-svn: 291555
2017-01-10 09:40:38 +00:00
Nitesh Jain f440244d67 [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPS
Reviewers: labath, clayborg

Subscribers: jaydeep, bhushan, lldb-commits, slthakur

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

llvm-svn: 291554
2017-01-10 09:33:43 +00:00
Nitesh Jain 2ee6762b55 [LLDB][MIPS] Revert TestLldbGdbServer failure for MIPS
llvm-svn: 291553
2017-01-10 09:18:56 +00:00
Vassil Vassilev 2999d0e8bb Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
Reviewed by Richard Smith (D28306).

llvm-svn: 291552
2017-01-10 09:09:09 +00:00
Richard Smith 9451c35982 Fix rejects-valid with default member initializers exposed by r291318.
Don't prematurely clean up an RAII object; there's another RAII object in the
same scope that tries to save and restore the same member!

llvm-svn: 291551
2017-01-10 08:51:46 +00:00
Roger Ferrer Ibanez e8623b90ae Mark tests as unsupported under libcpp-no-exceptions
The destructor of std::promise needs to construct a std::future_error
exception so it calls std::make_exception_ptr. But under
libcpp-no-exceptions this will trigger an abort.

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

llvm-svn: 291550
2017-01-10 08:48:48 +00:00
Nitesh Jain f468b5d32f [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPS
Reviewers: labath, clayborg

Subscribers: jaydeep, bhushan, lldb-commits, slthakur

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

llvm-svn: 291549
2017-01-10 08:20:01 +00:00
Craig Topper 588c734b0f [DAGCombiner] Merge together duplicate checks for folding fold (select C, 1, X) -> (or C, X) and folding (select C, X, 0) -> (and C, X). Also be consistent about checking that both the condition and the result type are i1. NFC
I guess previously we just assumed if the result type was i1, then the condition type must also be i1?

llvm-svn: 291548
2017-01-10 07:42:57 +00:00
Chris Bieneman e2796fd3fd [ObjectYAML] Missed one mixup in the debug_line test
llvm-svn: 291547
2017-01-10 06:24:24 +00:00
Chris Bieneman 1b7200d2cf [ObjectYAML] Support for DWARF line tables
One more try... relanding r291541 with a fix to properly gate MaxOpsPerInst on DWARF version.

Description from r291541:

This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.

Original description:

This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.

llvm-svn: 291546
2017-01-10 06:22:49 +00:00
Craig Topper 6e8f1dc872 [X86] Add recent CPU strings to some of the tests that check other cpu names.
llvm-svn: 291545
2017-01-10 06:02:16 +00:00
Craig Topper c45744ad93 AMD family 17h (znver1) enablement
Summary:
This patch enables the following
1. AMD family 17h architecture using "znver1" tune flag (-march, -mcpu).
2. ISAs that are enabled for "znver1" architecture.
3. Checks ADX isa from cpuid to identify "znver1" flag when -march=native is used.
4. ISAs FMA4, XOP are disabled as they are dropped from amdfam17.
5. For the time being, it uses the btver2 scheduler model.
6. Test file is updated to check this flag.

This is linked to llvm review item https://reviews.llvm.org/D28017

Patch by Ganesh Gopalasubramanian. Additional test cases added by Craig Topper.

Reviewers: RKSimon, craig.topper

Subscribers: cfe-commits, RKSimon, ashutosh.nema, llvm-commits

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

llvm-svn: 291544
2017-01-10 06:02:12 +00:00
Craig Topper d55b83128b AMD family 17h (znver1) enablement
Summary:
This patch enables the following
1. AMD family 17h architecture using "znver1" tune flag (-march, -mcpu).
2. ISAs that are enabled for "znver1" architecture.
3. Checks ADX isa from cpuid to identify "znver1" flag when -march=native is used.
4. ISAs FMA4, XOP are disabled as they are dropped from amdfam17.
5. For the time being, it uses the btver2 scheduler model.
6. Test file is updated to check this flag.

This item is linked to clang review item https://reviews.llvm.org/D28018

Patch by Ganesh Gopalasubramanian

Reviewers: RKSimon, craig.topper

Subscribers: vprasad, RKSimon, ashutosh.nema, llvm-commits

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

llvm-svn: 291543
2017-01-10 06:01:16 +00:00
Chris Bieneman e6663d376e Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291541.

Still failing on a bot:

http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio

llvm-svn: 291542
2017-01-10 05:31:23 +00:00
Chris Bieneman 07ab0aa5d6 [ObjectYAML] Support for DWARF line tables
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.

Original description:

This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.

llvm-svn: 291541
2017-01-10 05:25:24 +00:00
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