platform/upstream/llvm.git
5 years agoAdd JSON dumping tests for ObjC statements; add support for dumping @catch catch...
Aaron Ballman [Fri, 24 May 2019 18:58:29 +0000 (18:58 +0000)]
Add JSON dumping tests for ObjC statements; add support for dumping @catch catch-all statements.

llvm-svn: 361660

5 years ago[ARM] additionally check for ARM::INLINEASM_BR w/ ARM::INLINEASM
Nick Desaulniers [Fri, 24 May 2019 18:58:21 +0000 (18:58 +0000)]
[ARM] additionally check for ARM::INLINEASM_BR w/ ARM::INLINEASM

Summary:
We were observing failures for arm32 allyesconfigs of the Linux kernel
with the asm goto Clang patch, where ldr's were being generated to
offsets too far away to encode in imm12.

It looks like since INLINEASM_BR was created off of INLINEASM, a few
checks for INLINEASM needed to be updated to check for either case.

pr/41999

Link: https://github.com/ClangBuiltLinux/linux/issues/490
Reviewers: peter.smith, kristof.beyls, ostannard, rengolin, t.p.northover

Reviewed By: peter.smith

Subscribers: jyu2, javed.absar, hiraditya, llvm-commits, nathanchance, craig.topper, kees, srhines

Tags: #llvm

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

llvm-svn: 361659

5 years ago[OpenMP] Add test for requires and unified shared memory clause with declare target...
Gheorghe-Teodor Bercea [Fri, 24 May 2019 18:48:42 +0000 (18:48 +0000)]
[OpenMP] Add test for requires and unified shared memory clause with declare target link

Summary:
This patch adds a test for requires with unified share memory clause when a declare target link is present.

This test needs to go in prior to changes to declare target link for comparison purposes.

Reviewers: ABataev, caomhin

Reviewed By: ABataev

Subscribers: guansong, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 361658

5 years ago[COFF] Replace OutputSection* with uint16_t index in Chunk
Reid Kleckner [Fri, 24 May 2019 18:25:49 +0000 (18:25 +0000)]
[COFF] Replace OutputSection* with uint16_t index in Chunk

Shaves another 8 bytes off of SectionChunk, the most commonly allocated
type in LLD.

These indices are only valid after we've assigned chunks to output
sections and removed empty sections, so do that in a new pass.

Reviewers: ruiu, aganea

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

llvm-svn: 361657

5 years agoAMDGPU: Activate all lanes when spilling CSR VGPR for SGPR spills
Matt Arsenault [Fri, 24 May 2019 18:18:51 +0000 (18:18 +0000)]
AMDGPU: Activate all lanes when spilling CSR VGPR for SGPR spills

If some lanes weren't active on entry to the function, this could
clobber their VGPR values.

llvm-svn: 361655

5 years ago[NewPassManager] Add tuning option: LoopUnrolling [clang-change]
Alina Sbirlea [Fri, 24 May 2019 17:40:52 +0000 (17:40 +0000)]
[NewPassManager] Add tuning option: LoopUnrolling [clang-change]

Summary:
Use CodeGenOpts's setting for loop unrolling.
[to be coupled with D61618]

Reviewers: chandlerc

Subscribers: jlebar, dmgreen, cfe-commits, llvm-commits

Tags: #clang

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

llvm-svn: 361653

5 years agoAdd support for dumping Objective C AST declaration nodes to JSON.
Aaron Ballman [Fri, 24 May 2019 17:39:55 +0000 (17:39 +0000)]
Add support for dumping Objective C AST declaration nodes to JSON.

llvm-svn: 361652

5 years ago[WebAssembly] Use "linker" as linker shortname.
Sam Clegg [Fri, 24 May 2019 17:36:07 +0000 (17:36 +0000)]
[WebAssembly] Use "linker" as linker shortname.

This is in line with other platforms.

Also, move the single statement methods into the header (also
in line with other platform).

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

llvm-svn: 361651

5 years ago[ASTImporter] Call to HandleNameConflict in VisitRecordDecl mistakeningly using Name...
Shafik Yaghmour [Fri, 24 May 2019 16:53:44 +0000 (16:53 +0000)]
[ASTImporter] Call to HandleNameConflict in VisitRecordDecl mistakeningly using Name instead of SearchName

Summary:
https://reviews.llvm.org/D51633 added error handling to the ASTNodeImporter::VisitRecordDecl for the conflicting names case. This could lead to erroneous return of an error in that case since we should have been using SearchName. Name may be empty in the case where we find the name via D->getTypedefNameForAnonDecl()->getDeclName().

This fix is very similar to https://reviews.llvm.org/D59665

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

llvm-svn: 361650

5 years agoAMDGPU: Boost inline threshold with addrspacecasted alloca arguments
Matt Arsenault [Fri, 24 May 2019 16:52:35 +0000 (16:52 +0000)]
AMDGPU: Boost inline threshold with addrspacecasted alloca arguments

This was skipping GetUnderlyingObject for nonprivate addresses, but an
alloca could also be found through an addrspacecast if it's flat.

llvm-svn: 361649

5 years ago[LoopVectorize] update test to be independent of instcombine; NFC
Sanjay Patel [Fri, 24 May 2019 16:46:09 +0000 (16:46 +0000)]
[LoopVectorize] update test to be independent of instcombine; NFC

This is a regression test for vectorization, so remove instcombine
from the RUN line and adjust the comparison predicates to show what
the vectorizer is creating rather than how instcombine cleans it up.

llvm-svn: 361648

5 years ago[clang-tidy] In TransformerClangTidyCheck, require Explanation field.
Yitzhak Mandelbaum [Fri, 24 May 2019 16:32:03 +0000 (16:32 +0000)]
[clang-tidy] In TransformerClangTidyCheck, require Explanation field.

Summary:
In general, the `Explanation` field is optional in `RewriteRule` cases. But,
because the primary purpose of clang-tidy checks is to provide users with
diagnostics, we assume that a missing explanation is a bug.  This change adds an
assertion that checks all cases for an explanation, and updates the code to rely
on that assertion correspondingly.

Reviewers: ilya-biryukov

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 361647

5 years ago[CMake] Fix issues building runtimes
Chris Bieneman [Fri, 24 May 2019 16:21:38 +0000 (16:21 +0000)]
[CMake] Fix issues building runtimes

This resolves two issues:
(1) LIBCXX_HEADER_DIR is a very misleadingly named variable because it shouldn't be set to the header directory, instead it needs to be the root binary dir.
(2) If you build runtimes without libcxx, we can't depend on the libcxx header target, so we should instaed refer to it by the variable name which will be unset if libcxx isn't present.

llvm-svn: 361646

5 years ago[CodeComplete] Add whitespace around braces in lambda completions
Ilya Biryukov [Fri, 24 May 2019 16:16:15 +0000 (16:16 +0000)]
[CodeComplete] Add whitespace around braces in lambda completions

This produces nicer output.
Trivial follow-up to r361461, so sending without review.

llvm-svn: 361645

5 years ago[AMDGPU] Divergence driven ISel. Assign register class for cross block values accordi...
Alexander Timofeev [Fri, 24 May 2019 15:32:18 +0000 (15:32 +0000)]
[AMDGPU] Divergence driven ISel. Assign register class for cross block values according to the divergence.

Details: To make instruction selection really divergence driven it is necessary to assign
         the correct register classes to the cross block values beforehand. For the divergent targets
         same value type requires different register classes dependent on the value divergence.

Reviewers: rampitec, nhaehnle

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

llvm-svn: 361644

5 years ago[LibTooling] Add Explanation parameter to `makeRule`.
Yitzhak Mandelbaum [Fri, 24 May 2019 15:11:45 +0000 (15:11 +0000)]
[LibTooling] Add Explanation parameter to `makeRule`.

Summary:
Conceptually, a single-case RewriteRule has a matcher, edit(s) and an (optional)
explanation. `makeRule` previously only took the matcher and edit(s). This
change adds (optional) support for the explanation.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361643

5 years ago[llvm-objcopy] - Strip undefined symbols if they are no longer referenced following...
George Rimar [Fri, 24 May 2019 15:04:50 +0000 (15:04 +0000)]
[llvm-objcopy] - Strip undefined symbols if they are no longer referenced following --only-section

This is https://bugs.llvm.org/show_bug.cgi?id=40004.

In this patch I teach llvm-objcopy to remove undefined symbols if
them are not used anymore after applying -j/--only-section option.

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

llvm-svn: 361642

5 years ago[OpenCL] Add support for the cl_arm_integer_dot_product extensions
Kevin Petit [Fri, 24 May 2019 14:53:52 +0000 (14:53 +0000)]
[OpenCL] Add support for the cl_arm_integer_dot_product extensions

The specification is available in the Khronos OpenCL registry:

https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
llvm-svn: 361641

5 years agogn build: Merge r361607
Nico Weber [Fri, 24 May 2019 14:24:25 +0000 (14:24 +0000)]
gn build: Merge r361607

llvm-svn: 361640

5 years ago[WebAssebmly] Add support for --wrap
Sam Clegg [Fri, 24 May 2019 14:14:25 +0000 (14:14 +0000)]
[WebAssebmly] Add support for --wrap

The code for implementing this features is taken almost verbatim
from the ELF backend.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=41681

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

llvm-svn: 361639

5 years agoRevert "[OPENMP][NVPTX]Fix barriers and parallel level counters, NFC."
Alexey Bataev [Fri, 24 May 2019 14:06:47 +0000 (14:06 +0000)]
Revert "[OPENMP][NVPTX]Fix barriers and parallel level counters, NFC."

This reverts commit r361421 to split the patch into 3 parts.

llvm-svn: 361638

5 years ago[MCA] Zero-initialize field CRD in InstructionBase. Also run clang-format on a couple...
Andrea Di Biagio [Fri, 24 May 2019 13:56:01 +0000 (13:56 +0000)]
[MCA] Zero-initialize field CRD in InstructionBase. Also run clang-format on a couple of files. NFC

llvm-svn: 361637

5 years ago[lld] Trace all references with lld --trace-symbol
Sam Clegg [Fri, 24 May 2019 13:29:17 +0000 (13:29 +0000)]
[lld] Trace all references with lld --trace-symbol

Previously undefined symbol references were only traced if they were
seen before that definition.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41878

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

llvm-svn: 361636

5 years ago[WebAssembly] Add support for -emit-relocs
Sam Clegg [Fri, 24 May 2019 13:28:27 +0000 (13:28 +0000)]
[WebAssembly] Add support for -emit-relocs

This can be useful for post-link tools and for testing.  Sometimes
it can be useful to produces a regular executable but with relocations
preserved.

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

llvm-svn: 361635

5 years ago[LLD][COFF] Implement /filealign parameter
Rui Ueyama [Fri, 24 May 2019 12:42:36 +0000 (12:42 +0000)]
[LLD][COFF] Implement /filealign parameter

Patch by Stefan Schmidt.

This adds the /filealign parameter to lld, which allows to specify the
section alignment in the output file (as it does on Microsoft's
link.exe).

This is required to be able to load dynamically linked libraries on the
original Xbox, where the debugger monitor expects the section alignment
in the file to be the same as in memory.

llvm-svn: 361634

5 years ago[llvm-readobj] Implement GNU-style output for dynamic table
Simon Atanasyan [Fri, 24 May 2019 12:22:53 +0000 (12:22 +0000)]
[llvm-readobj] Implement GNU-style output for dynamic table

GNU readelf tool prints slightly different dynamic table "header" and
surrounds dynamic tag names by brackets. This patch implements the same
formatting for GNU-style output of the `llvm-readobj`.

LLVM
```
DynamicSection [ (13 entries)
  Tag        Type                 Name/Value
  0x00000006 SYMTAB               0x168
  ...
]
```

GNU
```
Dynamic section at offset 0x1d0 contains 13 entries:
  Tag        Type                 Name/Value
  0x00000006 (SYMTAB)             0x168
  ...
```

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

llvm-svn: 361633

5 years ago[PowerPC] Remove CRBits Copy Of Unset/set CBit
Stefan Pintilie [Fri, 24 May 2019 12:05:37 +0000 (12:05 +0000)]
[PowerPC] Remove CRBits Copy Of Unset/set CBit

For the situation, where we generate the following code:

       crxor 8, 8, 8
       < Some instructions>
.LBB0_1:
       < Some instructions>
       cror 1, 8, 8

cror (COPY of CRbit) depends on the result of the crxor instruction.
CR8 is known to be zero as crxor is equivalent to CRUNSET. We can simply use
crxor 1, 1, 1 instead to zero out CR1, which does not have any dependency on
any previous instruction.

This patch will optimize it to:

        < Some instructions>
.LBB0_1:
        < Some instructions>
        cror 1, 1, 1

Patch By: Victor Huang (NeHuang)

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

llvm-svn: 361632

5 years agoRevert r361630 "[llvm-readelf] - Allow dumping of the .dynamic section even if there...
George Rimar [Fri, 24 May 2019 11:24:42 +0000 (11:24 +0000)]
Revert r361630 "[llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC header."

It broke BB:
http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/3748

llvm-svn: 361631

5 years ago[llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC...
George Rimar [Fri, 24 May 2019 11:12:50 +0000 (11:12 +0000)]
[llvm-readelf] - Allow dumping of the .dynamic section even if there is no PT_DYNAMIC header.

It is now possible after D61937 was landed and was discussed
in it's review comments. It is not consistent with GNU, which
does not output .dynamic section content in this case for
no visible reason.

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

llvm-svn: 361630

5 years agoMake cppcoreguidelines-pro-type-member-init-use-assignment.cpp pass on platforms...
Dmitri Gribenko [Fri, 24 May 2019 10:50:15 +0000 (10:50 +0000)]
Make cppcoreguidelines-pro-type-member-init-use-assignment.cpp pass on platforms where char is unsigned

The other options are to completely specify the triple (reduces test
coverage), or to specify a regex that allows either '0' or '0U' for char
initializers, however, that relaxes the test.

llvm-svn: 361629

5 years agoMade cppcoreguidelines-pro-type-member-init-use-assignment run in all language modes
Dmitri Gribenko [Fri, 24 May 2019 10:39:00 +0000 (10:39 +0000)]
Made cppcoreguidelines-pro-type-member-init-use-assignment run in all language modes

llvm-svn: 361628

5 years ago[AArch64][SVE2] Asm: support SVE2 String Processing Group
Cullen Rhodes [Fri, 24 May 2019 10:32:01 +0000 (10:32 +0000)]
[AArch64][SVE2] Asm: support SVE2 String Processing Group

Summary:
Patch adds support for the SVE2 character match instructions MATCH and NMATCH.

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361627

5 years ago[llvm-readobj][mips] Align GOT columns headers properly in 64-bit case
Simon Atanasyan [Fri, 24 May 2019 10:26:48 +0000 (10:26 +0000)]
[llvm-readobj][mips] Align GOT columns headers properly in 64-bit case

llvm-svn: 361626

5 years ago[clangd] Limit the size of synthesized fix message
Ilya Biryukov [Fri, 24 May 2019 10:26:23 +0000 (10:26 +0000)]
[clangd] Limit the size of synthesized fix message

Summary: A temporary workaround until we figure out a better way to present fixes.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 361625

5 years ago[AArch64][SVE2] Asm: support SVE2 Narrowing Group
Cullen Rhodes [Fri, 24 May 2019 10:22:30 +0000 (10:22 +0000)]
[AArch64][SVE2] Asm: support SVE2 Narrowing Group

Summary:
Patch adds support for the following instructions:

SVE2 bitwise shift right narrow:
    * SQSHRUNB, SQSHRUNT, SQRSHRUNB, SQRSHRUNT, SHRNB, SHRNT, RSHRNB, RSHRNT,
      SQSHRNB, SQSHRNT, SQRSHRNB, SQRSHRNT, UQSHRNB, UQSHRNT, UQRSHRNB,
      UQRSHRNT

SVE2 integer add/subtract narrow high part:
    * ADDHNB, ADDHNT, RADDHNB, RADDHNT, SUBHNB, SUBHNT, RSUBHNB, RSUBHNT

SVE2 saturating extract narrow:
    * SQXTNB, SQXTNT, UQXTNB, UQXTNT, SQXTUNB, SQXTUNT

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361624

5 years ago[CodeComplete] Filter override completions by function name
Ilya Biryukov [Fri, 24 May 2019 10:18:39 +0000 (10:18 +0000)]
[CodeComplete] Filter override completions by function name

Summary:
We put only part of the signature starting with a function name into "typed text"
chunks now, previously the whole signature was "typed text".

This leads to meaningful fuzzy match scores, giving better signals to
compare with other completion items.

Ideally, we would not display the result type to the user, but that requires adding
a new kind of completion chunk.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 361623

5 years ago[AArch64][SVE2] Asm: support SVE2 Accumulate Group
Cullen Rhodes [Fri, 24 May 2019 10:10:34 +0000 (10:10 +0000)]
[AArch64][SVE2] Asm: support SVE2 Accumulate Group

Summary:
Patch adds support for the following instructions:

SVE2 bitwise shift and insert:
    * SRI, SLI

SVE2 bitwise shift right and accumulate:
    * SSRA, USRA, SRSRA, URSRA

SVE2 complex integer add:
    * CADD, SQCADD

SVE2 integer absolute difference and accumulate:
    * SABA, UABA

SVE2 integer absolute difference and accumulate long:
    * SABALB, SABALT, UABALB, UABALT

SVE2 integer add/subtract long with carry:
    * ADCLB, ADCLT, SBCLB, SBCLT

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361622

5 years ago[llvm-objdump][test] Fix for spurious matches against file paths
James Henderson [Fri, 24 May 2019 10:07:24 +0000 (10:07 +0000)]
[llvm-objdump][test] Fix for spurious matches against file paths

r361479 added tests that did --implicit-check-not=main, but a user found
that they failed on his machine, due to it having 'main' in a file path
printed earlier in the output. This test fixes this issue by making the
check pattern more explicit.

llvm-svn: 361621

5 years ago[SelectionDAG] computeKnownBits - support constant pool values from target
Simon Pilgrim [Fri, 24 May 2019 10:03:11 +0000 (10:03 +0000)]
[SelectionDAG] computeKnownBits - support constant pool values from target

This patch adds the overridable TargetLowering::getTargetConstantFromLoad function which allows targets to return any constant value loaded by a LoadSDNode node - only X86 makes use of this so far but everything should be in place for other targets.

computeKnownBits then uses this function to improve codegen, notably vector code after legalization.

A future commit will do the same for ComputeNumSignBits but computeKnownBits sees the bigger benefit.

This required a couple of fixes:
* SimplifyDemandedBits must early-out for getTargetConstantFromLoad cases to prevent infinite loops of constant regeneration (similar to what we already do for BUILD_VECTOR).
* Fix a DAGCombiner::visitTRUNCATE issue as we had trunc(shl(v8i32),v8i16) <-> shl(trunc(v8i16),v8i32) infinite loops after legalization on AVX512 targets.

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

llvm-svn: 361620

5 years ago[AArch64][SVE2] Asm: add PMULLB/PMULLT instructions
Cullen Rhodes [Fri, 24 May 2019 09:56:23 +0000 (09:56 +0000)]
[AArch64][SVE2] Asm: add PMULLB/PMULLT instructions

Summary:
This patch adds support for the polynomial multiplication instructions
PMULLB/PMULLT. The 64-bit source and 128-bit destination element
variants are enabled with crypto extensions (+sve2-aes), similar to the
NEON PMULL2 instruction. All other variants are enabled with +sve2.

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361619

5 years ago[FuncUnwinders] Use "symbol file" unwind plans for unwinding
Pavel Labath [Fri, 24 May 2019 09:54:39 +0000 (09:54 +0000)]
[FuncUnwinders] Use "symbol file" unwind plans for unwinding

Summary:
Previous patch (r360409) introduced the "symbol file unwind plan"
concept, but that plan wasn't used for unwinding yet. With this patch,
we start to consider the new plan as a possible strategy for both
synchronous and asynchronous unwinding. I also add a test that asserts
that unwinding via breakpad STACK CFI info works end-to-end.

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits, amccarth, markmentovai

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

llvm-svn: 361618

5 years ago[ELF] Fix a doc typo. NFC
Fangrui Song [Fri, 24 May 2019 09:53:25 +0000 (09:53 +0000)]
[ELF] Fix a doc typo. NFC

llvm-svn: 361617

5 years agoFix sphinx "Malformed option description" warning
Simon Pilgrim [Fri, 24 May 2019 09:31:32 +0000 (09:31 +0000)]
Fix sphinx "Malformed option description" warning

llvm-svn: 361616

5 years ago[AArch64][SVE2] Asm: add integer add/sub long/wide instructions
Cullen Rhodes [Fri, 24 May 2019 09:28:27 +0000 (09:28 +0000)]
[AArch64][SVE2] Asm: add integer add/sub long/wide instructions

Summary:
Patch adds support for the following instructions:

SVE2 integer add/subtract long:
    * SADDLB, SADDLT, UADDLB, UADDLT, SSUBLB, SSUBLT, USUBLB, USUBLT,
      SABDLB, SABDLT, UABDLB, UABDLT

SVE2 integer add/subtract wide:
    * SADDWB, SADDWT, UADDWB, UADDWT, SSUBWB, SSUBWT, USUBWB, USUBWT

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361615

5 years ago[ELF] Deleted unused forward declarations. NFC
Fangrui Song [Fri, 24 May 2019 09:25:47 +0000 (09:25 +0000)]
[ELF] Deleted unused forward declarations. NFC

llvm-svn: 361614

5 years agoUse the DataLayout::typeSizeEqualsStoreSize helper. NFC
Bjorn Pettersson [Fri, 24 May 2019 09:20:20 +0000 (09:20 +0000)]
Use the DataLayout::typeSizeEqualsStoreSize helper. NFC

Just a minor refactoring to use the new helper method
DataLayout::typeSizeEqualsStoreSize(). This is done when
checking if getTypeSizeInBits is equal/non-equal to
getTypeStoreSizeInBits.

llvm-svn: 361613

5 years ago[AArch64][SVE2] Asm: add various bitwise shift instructions
Cullen Rhodes [Fri, 24 May 2019 09:17:23 +0000 (09:17 +0000)]
[AArch64][SVE2] Asm: add various bitwise shift instructions

Summary:
This patch adds support for the SVE2 saturating/rounding bitwise shift
left (predicated) group of instructions:

    * SRSHL, URSHL, SRSHLR, URSHLR, SQSHL, UQSHL, SQRSHL, UQRSHL,
      SQSHLR, UQSHLR, SQRSHLR, UQRSHLR

Immediate forms of the SQSHL and UQSHL instructions are also added to
the existing SVE bitwise shift by immediate (predicated) group, as well
as three new instructions SRSHR/URSHR/SQSHLU. The new instructions in
this group are encoded similarly and are implemented using the same
TableGen class with a minimal change (1 bit in encoding).

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

llvm-svn: 361612

5 years ago[AArch64][SVE2] Asm: add saturating add/sub instructions
Cullen Rhodes [Fri, 24 May 2019 09:06:37 +0000 (09:06 +0000)]
[AArch64][SVE2] Asm: add saturating add/sub instructions

Summary:
Patch adds support for the following instructions:

    * SQADD, UQADD, SUQADD, USQADD
    * SQSUB, UQSUB, SQSUBR, UQSUBR

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: chill

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

llvm-svn: 361611

5 years agoStructurizeCFG: Relax uniformity checks.
Neil Henning [Fri, 24 May 2019 08:59:17 +0000 (08:59 +0000)]
StructurizeCFG: Relax uniformity checks.

This change relaxes the checks for hasOnlyUniformBranches such that our
region is uniform if:

1. All conditional branches that are direct children are uniform.
2. And either:
  a. All sub-regions are uniform.
  b. There is one or less conditional branches among the direct
     children.

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

llvm-svn: 361610

5 years ago[AArch64][SVE2] Asm: fix overlapping bit
Cullen Rhodes [Fri, 24 May 2019 08:45:37 +0000 (08:45 +0000)]
[AArch64][SVE2] Asm: fix overlapping bit

Summary:
Bit 20 in sve2_int_arith_pred TableGen class was overlapping. The
encodings are not affected as bit 20 is defined by the opc bits
and this was overwriting the earlier error of setting bit 20 to 0.

Raised by Momchil: https://reviews.llvm.org/D62130

Reviewed By: chill

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

llvm-svn: 361609

5 years agoGlobalISel: support swifterror attribute on AArch64.
Tim Northover [Fri, 24 May 2019 08:40:13 +0000 (08:40 +0000)]
GlobalISel: support swifterror attribute on AArch64.

swifterror marks an argument as a register pretending to be a pointer, so we
need a guaranteed mem2reg-like analysis of its uses. Fortunately most of the
infrastructure can be reused from the DAG world.

llvm-svn: 361608

5 years agoCodeGen: factor out swifterror value tracking.
Tim Northover [Fri, 24 May 2019 08:39:43 +0000 (08:39 +0000)]
CodeGen: factor out swifterror value tracking.

llvm-svn: 361607

5 years ago[mips] Always check that `shift and add` optimization is efficient.
Simon Atanasyan [Fri, 24 May 2019 08:39:40 +0000 (08:39 +0000)]
[mips] Always check that `shift and add` optimization is efficient.

The D45316 introduced the `shouldTransformMulToShiftsAddsSubs` function
to check that breaking down constant multiplications into a series
of shifts, adds, and subs is efficient. Unfortunately, this function
does not check maximum number of steps on all paths of the algorithm.
This patch fixes this bug.

Fix for PR41929.

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

llvm-svn: 361606

5 years ago[DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores
Bjorn Pettersson [Fri, 24 May 2019 08:32:02 +0000 (08:32 +0000)]
[DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores

Summary:
The DeadStoreElimination pass now skips doing
PartialStoreMerging when stores overlap according to
OW_PartialEarlierWithFullLater and at least one of
the stores is having a store size that is different
from the size of the type being stored.

This solves problems seen in
  https://bugs.llvm.org/show_bug.cgi?id=41949
for which we in the past could end up with
mis-compiles or assertions.

The content and location of the padding bits is not
formally described (or undefined) in the LangRef
at the moment. So the solution is chosen based on
that we cannot assume anything about the padding bits
when having a store that clobbers more memory than
indicated by the type of the value that is stored
(such as storing an i6 using an 8-bit store instruction).

Fixes: https://bugs.llvm.org/show_bug.cgi?id=41949

Reviewers: spatel, efriedma, fhahn

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361605

5 years ago[ARM] ARMExpandPseudoInsts: add debug messages
Sjoerd Meijer [Fri, 24 May 2019 08:25:02 +0000 (08:25 +0000)]
[ARM] ARMExpandPseudoInsts: add debug messages

This pass wasn't printing any messages at all, which I find really inconvenient
while debugging/tracing things. It now dumps the before and after of expanded
instructions. It doesn't do this yet for all instructions, but this is a good
start I guess.

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

llvm-svn: 361604

5 years agoDWARF: Implement DW_AT_signature lookup for type unit support
Pavel Labath [Fri, 24 May 2019 08:11:12 +0000 (08:11 +0000)]
DWARF: Implement DW_AT_signature lookup for type unit support

Summary:
This patch implements the main feature of type units. When completing a
type, if we encounter a DW_AT_signature attribute, we use it's value to
lookup the complete definition of the type in the relevant type unit.

To enable this lookup, we build up a map of all type units in a symbol
file when parsing the units. Then we consult this map when resolving the
DW_AT_signature attribute.

I include add a couple of tests which exercise the type lookup feature,
including one that ensure we do something reasonable in case we fail to
lookup the type.

A lot of the ideas in this patch have been taken from D32167 and D61505.

Reviewers: clayborg, JDevlieghere, aprantl, alexshap

Subscribers: mgrang, lldb-commits

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

llvm-svn: 361603

5 years agoDWARFContext: Make loading of sections thread-safe
Pavel Labath [Fri, 24 May 2019 08:04:03 +0000 (08:04 +0000)]
DWARFContext: Make loading of sections thread-safe

Summary:
SymbolFileDWARF used to load debug sections in a thread-safe manner.
When we moved to DWARFContext, we dropped the thread-safe part, because
we thought it was not necessary.

It turns out this was only mostly correct.

The "mostly" part is there because this is a problem only if we use the
manual index, as that is the only source of intra-module paralelism.
Also, this only seems to occur for extremely simple files (like the ones
I've been creating for tests lately), where we've managed to start
indexing before loading the debug_str section. Then, two threads start
to load the section simultaneously and produce wrong results.

On more complex files, something seems to be loading the debug_str section
before we start indexing, as I haven't been able to reproduce this
there, but I have not investigated what it is.

I've tried to come up with a test for this, but I haven't been able to
reproduce the problem reliably. Still, while doing so, I created a way
to generate many compile units on demand. Given that most of our tests
work with only one or two compile units, it seems like this could be
useful anyway.

Reviewers: aprantl, JDevlieghere, clayborg

Subscribers: arphaman, lldb-commits

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

llvm-svn: 361602

5 years ago[clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member...
Matthias Gehre [Fri, 24 May 2019 05:46:57 +0000 (05:46 +0000)]
[clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

Differential Revision: D24892

llvm-svn: 361601

5 years ago[Power9] Add a specific heuristic to schedule the addi before the load
QingShan Zhang [Fri, 24 May 2019 05:30:09 +0000 (05:30 +0000)]
[Power9] Add a specific heuristic to schedule the addi before the load
 When we are scheduling the load and addi, if all other heuristic didn't take effect,
 we will try to schedule the addi before the load, to hide the latency, and avoid the
 true dependency added by RA. And this only take effects for Power9.

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

llvm-svn: 361600

5 years ago[X86] Add test case that was supposed to go with r360102.
Craig Topper [Fri, 24 May 2019 04:46:56 +0000 (04:46 +0000)]
[X86] Add test case that was supposed to go with r360102.

Found in my working area. Guess I forgot 'git add' before committing.

llvm-svn: 361599

5 years agoDo not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.
Igor Kudrin [Fri, 24 May 2019 04:46:22 +0000 (04:46 +0000)]
Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

If the source file path contains directory junctions, and we resolve them when
printing diagnostic messages, these paths look independent for an IDE.
For example, both Visual Studio and Visual Studio Code open separate editors
for such paths, which is not only inconvenient but might even result in losing
changes made in one of them.

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

llvm-svn: 361598

5 years ago[Utility] Small improvements to the Broadcaster class (NFC)
Jonas Devlieghere [Fri, 24 May 2019 04:41:47 +0000 (04:41 +0000)]
[Utility] Small improvements to the Broadcaster class (NFC)

I touched the Broadcaster class earlier today (r361544) and noticed a
few things that could be improved. This patch includes variety of small
fixes: use early returns, use LLDB_LOG macro, use doxygen comments and
finally format the class.

llvm-svn: 361597

5 years ago[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling
Yevgeny Rouban [Fri, 24 May 2019 04:34:23 +0000 (04:34 +0000)]
[NFC] SwitchInst: Introduce wrapper for prof branch_weights handling

This patch introduces a wrapper class that re-implements
several mutator methods of SwitchInst to handle changes
of prof branch_weights metadata along with remove/add
switch case methods.
Subsequent patches will use this wrapper to implement
prof branch_weights metadata handling for SwitchInst.

Reviewers: davidx, eraman, reames, chandlerc
Reviewed By: davidx
Differential Revision: https://reviews.llvm.org/D62122

llvm-svn: 361596

5 years ago[llvm-nm] Fix Bug 41353 - unique symbols printed as D instead of u
Jordan Rupprecht [Fri, 24 May 2019 04:02:05 +0000 (04:02 +0000)]
[llvm-nm] Fix Bug 41353 - unique symbols printed as D instead of u

Summary:
https://bugs.llvm.org/show_bug.cgi?id=41353

I'm new to LLVM and C++ so please do not hesitate to iterate with me on this fix.

Patch by Mike Pozulp!

Reviewers: rupprecht, zbrid, grimar, jhenderson

Reviewed By: rupprecht, jhenderson

Subscribers: jhenderson, chrisjackson, MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 361595

5 years agofix test for older clang versions
Eric Fiselier [Fri, 24 May 2019 03:15:32 +0000 (03:15 +0000)]
fix test for older clang versions

llvm-svn: 361594

5 years agofix destroying delete test with older apple compilers
Eric Fiselier [Fri, 24 May 2019 02:46:34 +0000 (02:46 +0000)]
fix destroying delete test with older apple compilers

llvm-svn: 361593

5 years ago[analyzer] NFC: Prevent multi-file plist test from spamming up the build folder.
Artem Dergachev [Fri, 24 May 2019 02:29:18 +0000 (02:29 +0000)]
[analyzer] NFC: Prevent multi-file plist test from spamming up the build folder.

It was producing an HTML report with a random name on every tests run
and never cleaned those up.

llvm-svn: 361592

5 years agoFix BUILD_SHARED_LIBS builds after r361567
Daniel Sanders [Fri, 24 May 2019 02:15:27 +0000 (02:15 +0000)]
Fix BUILD_SHARED_LIBS builds after r361567

Also fixed a comment I noticed while debugging this build

llvm-svn: 361591

5 years agoClarify how musttail can be used to create forwarding thunks
Reid Kleckner [Fri, 24 May 2019 01:45:47 +0000 (01:45 +0000)]
Clarify how musttail can be used to create forwarding thunks

llvm-svn: 361590

5 years agodwarfdump: Deterministically... determine whether parsing a DWARF32 or DWARF64 str_of...
David Blaikie [Fri, 24 May 2019 01:41:58 +0000 (01:41 +0000)]
dwarfdump: Deterministically... determine whether parsing a DWARF32 or DWARF64 str_offsets header

Rather than trying one and then the other - use the kind of the CU to
select which kind of header to parse.

llvm-svn: 361589

5 years agoFactor out repeated code to build 'this' expressions and mark them
Richard Smith [Fri, 24 May 2019 01:35:07 +0000 (01:35 +0000)]
Factor out repeated code to build 'this' expressions and mark them
referenced.

llvm-svn: 361588

5 years ago[CFG] NFC: Modernize a test file for constructor initializer CFGs.
Artem Dergachev [Fri, 24 May 2019 01:34:26 +0000 (01:34 +0000)]
[CFG] NFC: Modernize a test file for constructor initializer CFGs.

Move FileCheck directives around so that it was easy to understand
what tests what and what effect do changes have.

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

llvm-svn: 361587

5 years ago[CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.
Artem Dergachev [Fri, 24 May 2019 01:34:22 +0000 (01:34 +0000)]
[CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.

Turn it into a variant class instead. This conversion does indeed save some code
but there's a plan to add support for more kinds of terminators that aren't
necessarily based on statements, and with those in mind it becomes more and more
confusing to have CFGTerminators implicitly convertible to a Stmt *.

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

llvm-svn: 361586

5 years ago[AArch64] Preserve X8 for thunks ending in variadic musttail calls
Reid Kleckner [Fri, 24 May 2019 01:27:20 +0000 (01:27 +0000)]
[AArch64] Preserve X8 for thunks ending in variadic musttail calls

Summary:
On Windows, X8 may be used to pass in the address of an aggregate that
is returned indirectly. Therefore, it should be forwarded to variadic
musttail calls and preserved in thunks.

Fixes PR41997

Reviewers: mgrang, efriedma

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361585

5 years ago[AArch64] Add nvcast patterns for v2f32 -> v1f64
Serge Pavlov [Fri, 24 May 2019 01:20:34 +0000 (01:20 +0000)]
[AArch64] Add nvcast patterns for v2f32 -> v1f64

Summary: Constant stores of f32 values can create such NvCast nodes.

Reviewers: t.p.northover

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361584

5 years agoRevert "[lldb] followup fix for https://reviews.llvm.org/D62305"
Jonas Devlieghere [Fri, 24 May 2019 01:08:54 +0000 (01:08 +0000)]
Revert "[lldb] followup fix for https://reviews.llvm.org/D62305"

This fails on the Windows bot:

cannot convert from 'initializer list' to 'lldb::thread_result_t'

llvm-svn: 361583

5 years agodwarfdump: Add a bit more DWARF64 support
David Blaikie [Fri, 24 May 2019 01:05:52 +0000 (01:05 +0000)]
dwarfdump: Add a bit more DWARF64 support

This test case was incorrect because it mixed DWARF32 and DWARF64 for a
single unit (DWARF32 unit referencing a DWARF64 str_offsets section). So
fix enough of the unit parsing for DWARF64 and make the test valid.

(not sure if anyone needs DWARF64 support though - support in
libDebugInfoDWARF has been added piecemeal and LLVM doesn't produce it
at all)

llvm-svn: 361582

5 years agoRevert r361460
Eli Friedman [Fri, 24 May 2019 01:03:51 +0000 (01:03 +0000)]
Revert r361460

It regresses https://bugs.llvm.org/show_bug.cgi?id=38309 (represented
by the testcase test/Transforms/GlobalOpt/globalsra-multigep.ll).

llvm-svn: 361581

5 years agoFix integer literals which are cast to bool
Jonas Devlieghere [Fri, 24 May 2019 00:44:33 +0000 (00:44 +0000)]
Fix integer literals which are cast to bool

This change replaces built-in types that are implicitly converted to
booleans.

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

llvm-svn: 361580

5 years ago[libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present...
Kostya Serebryany [Fri, 24 May 2019 00:43:52 +0000 (00:43 +0000)]
[libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present in the corpus

llvm-svn: 361579

5 years agollvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file...
Peter Collingbourne [Fri, 24 May 2019 00:21:46 +0000 (00:21 +0000)]
llvm-objcopy: Change sectionWithinSegment() to use virtual addresses instead of file offsets for SHT_NOBITS sections.

Without this, sectionWithinSegment() will return the wrong answer for bss
sections. This doesn't seem to matter now (for non-broken ELF files), but
it will matter with a change that I'm working on.

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

llvm-svn: 361578

5 years ago[WebAssembly] Expand more SIMD float ops
Thomas Lively [Fri, 24 May 2019 00:15:04 +0000 (00:15 +0000)]
[WebAssembly] Expand more SIMD float ops

Summary: These were previously causing ISel failures.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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

llvm-svn: 361577

5 years ago[InstSimplify] fold insertelement-of-extractelement
Sanjay Patel [Fri, 24 May 2019 00:13:58 +0000 (00:13 +0000)]
[InstSimplify] fold insertelement-of-extractelement

This was partly handled in InstCombine (only the constant
index case), so delete that and zap it more generally in
InstSimplify.

llvm-svn: 361576

5 years ago[InstSimplify] add tests for insert-of-extract; NFC
Sanjay Patel [Fri, 24 May 2019 00:11:23 +0000 (00:11 +0000)]
[InstSimplify] add tests for insert-of-extract; NFC

llvm-svn: 361575

5 years agoUpdate C++2a status for destroying delete
Eric Fiselier [Fri, 24 May 2019 00:10:33 +0000 (00:10 +0000)]
Update C++2a status for destroying delete

llvm-svn: 361574

5 years ago[COFF] Remove finalizeContents virtual method from Chunk, NFC
Reid Kleckner [Fri, 24 May 2019 00:02:00 +0000 (00:02 +0000)]
[COFF] Remove finalizeContents virtual method from Chunk, NFC

This only needs to be done for MergeChunks, so just do that in a
separate pass in the Writer.

This is one small step towards eliminating the vtable in Chunk.

llvm-svn: 361573

5 years agoP0722R3: Implement library support for destroying delete
Eric Fiselier [Thu, 23 May 2019 23:46:44 +0000 (23:46 +0000)]
P0722R3:  Implement library support for destroying delete

Summary:
This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature).

However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and  C++2a.

Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF

Reviewed By: EricWF

Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits

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

llvm-svn: 361572

5 years agoFix hang during constant evaluation of union assignment.
Eric Fiselier [Thu, 23 May 2019 23:34:43 +0000 (23:34 +0000)]
Fix hang during constant evaluation of union assignment.

HandleUnionActiveMemberChange forgot to walk over a nop implicit
conversion node and got stuck in the process.

As a cleanup I changed the declaration of `E` so it can't
be accidentally accessed after the loop.

llvm-svn: 361571

5 years ago[InstCombine] remove redundant fold for extractelement; NFC
Sanjay Patel [Thu, 23 May 2019 23:33:38 +0000 (23:33 +0000)]
[InstCombine] remove redundant fold for extractelement; NFC

The out-of-bounds index pattern is handled by InstSimplify,
so the extractelement should be eliminated next time it is
visited.

llvm-svn: 361570

5 years ago[InstCombine] remove redundant fold for insertelement; NFC
Sanjay Patel [Thu, 23 May 2019 23:33:34 +0000 (23:33 +0000)]
[InstCombine] remove redundant fold for insertelement; NFC

The out-of-bounds index pattern is handled by InstSimplify.

llvm-svn: 361569

5 years agoBreak false dependencies on target libraries
Daniel Sanders [Thu, 23 May 2019 23:02:56 +0000 (23:02 +0000)]
Break false dependencies on target libraries

Summary:
For the most part this consists of replacing ${LLVM_TARGETS_TO_BUILD} with
some combination of AllTargets* so that they depend on specific components
of a target backend rather than all of it. The overall effect of this is
that, for example, tools like opt no longer falsely depend on the
disassembler, while tools like llvm-ar no longer depend on the code
generator.

There's a couple quirks to point out here:
* AllTargetsCodeGens is a bit more prevalent than expected. Tools like dsymutil
  seem to need it which I was surprised by.
* llvm-xray linked to all the backends but doesn't seem to need any of them.
  It builds and passes the tests so that seems to be correct.
* I left gold out as it's not built when binutils is not available so I'm
  unable to test it

Reviewers: bogner, JDevlieghere

Reviewed By: bogner

Subscribers: mehdi_amini, mgorny, steven_wu, dexonsmith, rupprecht, llvm-commits

Tags: #llvm

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

llvm-svn: 361567

5 years ago[analyzer] List checker/plugin options in 3 categories: released, alpha, developer
Kristof Umann [Thu, 23 May 2019 22:52:09 +0000 (22:52 +0000)]
[analyzer] List checker/plugin options in 3 categories: released, alpha, developer

Same patch as D62093, but for checker/plugin options, the only
difference being that options for alpha checkers are implicitly marked
as alpha.

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

llvm-svn: 361566

5 years ago[lldb] followup fix for https://reviews.llvm.org/D62305
Konrad Kleine [Thu, 23 May 2019 22:39:13 +0000 (22:39 +0000)]
[lldb] followup fix for https://reviews.llvm.org/D62305

Summary:
Fixing this error on windows build bot:

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5050/steps/build/logs/stdio

Reviewers: stella.stamenova, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 361565

5 years ago[OPENMP]Do not crash for const firstprivates.
Alexey Bataev [Thu, 23 May 2019 22:30:43 +0000 (22:30 +0000)]
[OPENMP]Do not crash for const firstprivates.

If the variable is a firstprivate variable and it was not emitted beause
this a constant variable with the constant initializer, we can use the
initial value instead of the variable itself. It also fixes the problem
with the compiler crash in this case.

llvm-svn: 361564

5 years agofix accidental implicit matches in elf-disassemble-symbol-labels-rel.test
Bob Haarman [Thu, 23 May 2019 22:28:18 +0000 (22:28 +0000)]
fix accidental implicit matches in elf-disassemble-symbol-labels-rel.test

llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-rel.test
uses --implicit-check-not to verify that certain patterns do not occur
in llvm-objdump's output, except in places where they are explicitly
checked. Unfortunately, the patterns are generic enough that they may
be part of the file name which is also output by llvm-objdump. This
change matches the line with the filename explicitly so that the
implicit patterns are not applied to it.

llvm-svn: 361563

5 years agoUse clang_cc1 instead of clang in CodeGen test.
Alina Sbirlea [Thu, 23 May 2019 22:07:37 +0000 (22:07 +0000)]
Use clang_cc1 instead of clang in CodeGen test.

llvm-svn: 361562

5 years ago[analyzer] Hide developer-only checker/package options by default
Kristof Umann [Thu, 23 May 2019 22:07:16 +0000 (22:07 +0000)]
[analyzer] Hide developer-only checker/package options by default

These options are now only visible under
-analyzer-checker-option-help-developer.

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

llvm-svn: 361561

5 years ago[NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC].
Alina Sbirlea [Thu, 23 May 2019 21:52:59 +0000 (21:52 +0000)]
[NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC].

Summary: Mirror tuning option from old pass manager in new pass manager.

Reviewers: chandlerc

Subscribers: mehdi_amini, jlebar, zzheng, dmgreen, llvm-commits

Tags: #llvm

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

llvm-svn: 361560

5 years ago[InstSimplify] insertelement V, undef, ? --> V
Sanjay Patel [Thu, 23 May 2019 21:49:47 +0000 (21:49 +0000)]
[InstSimplify] insertelement V, undef, ? --> V

This was part of InstCombine, but it's better placed in
InstSimplify. InstCombine also had an unreachable but weaker
fold for insertelement with undef index, so that is deleted.

llvm-svn: 361559

5 years ago[analyzer] List checkers in 3 categories: released, alpha, developer
Kristof Umann [Thu, 23 May 2019 21:46:51 +0000 (21:46 +0000)]
[analyzer] List checkers in 3 categories: released, alpha, developer

Previously, the only way to display the list of available checkers was
to invoke the analyzer with -analyzer-checker-help frontend flag. This
however wasn't really great from a maintainer standpoint: users came
across checkers meant strictly for development purposes that weren't to
be tinkered with, or those that were still in development. This patch
creates a clearer division in between these categories.

From now on, we'll have 3 flags to display the list checkers. These
lists are mutually exclusive and can be used in any combination (for
example to display both stable and alpha checkers).

-analyzer-checker-help: Displays the list for stable, production ready
                        checkers.

-analyzer-checker-help-alpha: Displays the list for in development
                              checkers. Enabling is discouraged
                              for non-development purposes.

-analyzer-checker-help-developer: Modeling and debug checkers. Modeling
                                  checkers shouldn't be enabled/disabled
                                  by hand, and debug checkers shouldn't
                                  be touched by users.

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

llvm-svn: 361558