platform/upstream/llvm.git
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

5 years ago[X86] Split multi-line chained assignments into single lines to avoid making clang...
Craig Topper [Thu, 23 May 2019 21:34:36 +0000 (21:34 +0000)]
[X86] Split multi-line chained assignments into single lines to avoid making clang-format create triangle shaped indentation. Simplify one if statement to remove a bunch of string matches. NFCI

We had an if statement that checked over every avx512* feature to see if it should enabled avx512f. Since they are all prefixed with avx512 just check for that instead.

llvm-svn: 361557

5 years agoELF: Remove a comparison against In.EhFrame. NFCI.
Peter Collingbourne [Thu, 23 May 2019 21:30:30 +0000 (21:30 +0000)]
ELF: Remove a comparison against In.EhFrame. NFCI.

This won't work once we have multiple .eh_frame sections.

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

llvm-svn: 361556

5 years ago[NFC] Add blank line (test commit)
J. Ryan Stinnett [Thu, 23 May 2019 21:13:50 +0000 (21:13 +0000)]
[NFC] Add blank line (test commit)

llvm-svn: 361555

5 years ago[TTI] Fix some typos in comments. NFC
Craig Topper [Thu, 23 May 2019 21:04:01 +0000 (21:04 +0000)]
[TTI] Fix some typos in comments. NFC

'implementaion' -> 'implementation'
'non-unform' -> 'non-uniform'
'mimimum' -> 'minimum'

Patch by Pavel Samolysov

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

llvm-svn: 361554

5 years agoRevert [LOOPINFO] Extend Loop object to add utilities to get the loop bounds...
Kit Barton [Thu, 23 May 2019 20:53:05 +0000 (20:53 +0000)]
Revert     [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.

This reverts r361517 (git commit 2049e4dd8f61100f88f14db33bd95d197bcbfbbc)

llvm-svn: 361553

5 years ago[analyzer] Add a new frontend flag to display all checker options
Kristof Umann [Thu, 23 May 2019 20:47:28 +0000 (20:47 +0000)]
[analyzer] Add a new frontend flag to display all checker options

Add the new frontend flag -analyzer-checker-option-help to display all
checker/package options.

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

llvm-svn: 361552

5 years ago[clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment
Tamas Zolnai [Thu, 23 May 2019 20:29:04 +0000 (20:29 +0000)]
[clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment

Summary:
Added WarnOnlyIfThisHasSuspiciousField option to allow
to catch any copy assignment operator independently from
the container class's fields.
Added the cert alias using this option.

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, Eugene.Zelenko, xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 361550

5 years ago[COFF] Move KeepUnique bit from Chunk to SectionChunk, NFC
Reid Kleckner [Thu, 23 May 2019 20:26:41 +0000 (20:26 +0000)]
[COFF] Move KeepUnique bit from Chunk to SectionChunk, NFC

The KeepUnique bit is used during ICF, which only operates on
SectionChunks, so only SectionChunks need it. This frees up a byte in
Chunk, which I plan to use in a follow-up change.

llvm-svn: 361549

5 years ago[Process] Fix another thread_result_t & nullptr incompatibility.
Jonas Devlieghere [Thu, 23 May 2019 20:25:49 +0000 (20:25 +0000)]
[Process] Fix another thread_result_t & nullptr incompatibility.

llvm-svn: 361548

5 years ago[DAGCombiner] make folds of binops safe for opcodes that produce >1 value
Sanjay Patel [Thu, 23 May 2019 20:17:25 +0000 (20:17 +0000)]
[DAGCombiner] make folds of binops safe for opcodes that produce >1 value

This is no-functional-change-intended currently because the definition
of isBinOp() only includes opcodes that produce 1 value. But if we
share that implementation with isCommutativeBinOp() as proposed in
D62191, then we need to make sure that the callers bail out for
opcodes that they are not prepared to handle correctly.

llvm-svn: 361547

5 years ago[lldb] Make sure RegularExpression constructors always initialize member variables
Jorge Gorbe Moya [Thu, 23 May 2019 20:11:17 +0000 (20:11 +0000)]
[lldb] Make sure RegularExpression constructors always initialize member variables

The copy constructor of RegularExpression doesn't initialize m_comp_err. This causes an use-of-initialized-value error when a RegularExpression is copied: the copy constructor calls Compile, which calls Free to free the existing regex if needed, which in turn reads m_comp_err to check if there's any regex to be freed.

This change calls the default constructor from the other constructors to make sure members are always initialized with sensible values. This also avoids duplicating init logic, like the RegularExpression(llvm:StringRef) constructor does, which is error prone.

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

llvm-svn: 361546

5 years agoFix sphinx unknown document error
Simon Pilgrim [Thu, 23 May 2019 20:07:27 +0000 (20:07 +0000)]
Fix sphinx unknown document error

llvm-svn: 361545

5 years ago[Utility] Avoid a few unnecessary copies (NFC)
Jonas Devlieghere [Thu, 23 May 2019 20:05:21 +0000 (20:05 +0000)]
[Utility] Avoid a few unnecessary copies (NFC)

Avoid unnecessary copies by either passing by const-reference or moving
the argument.

llvm-svn: 361544

5 years agoUpdateTestChecks: ppc32 triple support
Roman Lebedev [Thu, 23 May 2019 19:54:41 +0000 (19:54 +0000)]
UpdateTestChecks: ppc32 triple support

Summary:
Appears identical to powerpc64{,le}.
Regenerate test that is being affected by upcoming patch.

Reviewers: RKSimon

Reviewed By: RKSimon

Subscribers: nemanjai, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 361543

5 years agoUpdate breaking test.
Alina Sbirlea [Thu, 23 May 2019 19:51:16 +0000 (19:51 +0000)]
Update breaking test.

llvm-svn: 361542

5 years agoAMDGPU: Correct maximum possible private allocation size
Matt Arsenault [Thu, 23 May 2019 19:38:14 +0000 (19:38 +0000)]
AMDGPU: Correct maximum possible private allocation size

We were assuming a much larger possible per-wave visible stack
allocation than is possible:

https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/faa3ae51388517353afcdaf9c16621f879ef0a59/src/core/runtime/amd_gpu_agent.cpp#L70

Based on this, we can assume the high 15 bits of a frame index or sret
are 0. The frame index value is the per-lane offset, so the maximum
frame index value is MAX_WAVE_SCRATCH / wavesize.

Remove the corresponding subtarget feature and option that made
this configurable.

llvm-svn: 361541

5 years ago[NewPassManager] Add tuning option: LoopUnrolling [NFC].
Alina Sbirlea [Thu, 23 May 2019 19:35:40 +0000 (19:35 +0000)]
[NewPassManager] Add tuning option: LoopUnrolling [NFC].

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

Reviewers: chandlerc

Subscribers: jlebar, dmgreen, llvm-commits

Tags: #llvm

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

llvm-svn: 361540

5 years ago[gdb-remote] Fix more issues with thread_result_t
Jonas Devlieghere [Thu, 23 May 2019 19:32:46 +0000 (19:32 +0000)]
[gdb-remote] Fix more issues with thread_result_t

More fixes needed to un-break the Windows bot.

llvm-svn: 361539

5 years ago[NFC] UpdateTestChecks: asm.py: fix whitespace issue
Roman Lebedev [Thu, 23 May 2019 19:15:05 +0000 (19:15 +0000)]
[NFC] UpdateTestChecks: asm.py: fix whitespace issue

llvm-svn: 361538

5 years ago[SLPVectorizer] Set flag to previous default.
Alina Sbirlea [Thu, 23 May 2019 19:07:41 +0000 (19:07 +0000)]
[SLPVectorizer] Set flag to previous default.

Summary:
The refactoring in r360276 moved the `RunSLPVectorization` flag and added the default explicitly. The default should have been `false`, as before.

The new pass manager used to have SLPVectorization on by default, now it's off in opt, and needs D61617 checked in to enable it in clang.

Reviewers: chandlerc

Subscribers: mehdi_amini, jlebar, eraman, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 361537

5 years agoFix unresolved symbols when linking tools/clang/unittests/Tooling/ToolingTests
Thomas Lively [Thu, 23 May 2019 18:55:00 +0000 (18:55 +0000)]
Fix unresolved symbols when linking tools/clang/unittests/Tooling/ToolingTests

Summary: Add correct cmake dependencies so that `ToolingTests` link
successfully.

Patch by Guanzhong Chen

Reviewers: tlively, aheejin

Reviewed By: tlively

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 361536

5 years ago[CMake] Fixing errors in r361513
Chris Bieneman [Thu, 23 May 2019 18:51:52 +0000 (18:51 +0000)]
[CMake] Fixing errors in r361513

Summary:
I somehow messed this up. libcxx appends the subdirectories itself, so we don't need to add them here.

Also, r361513 broke the "projects" build of libcxx because it always included the extra targets.

Reviewers: lebedev.ri, mclow.lists

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 361535

5 years ago[NewPassManager] Add tuning option: SLPVectorization [clang-change]
Alina Sbirlea [Thu, 23 May 2019 18:51:02 +0000 (18:51 +0000)]
[NewPassManager] Add tuning option: SLPVectorization [clang-change]

Summary:
NewPassManager is not using CodeGenOpts values before this patch.
[to be coupled with D61616]

Reviewers: chandlerc

Subscribers: jlebar, cfe-commits, llvm-commits

Tags: #clang

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

llvm-svn: 361534

5 years ago[InstCombine] be more careful when transforming a shuffle mask
Sanjay Patel [Thu, 23 May 2019 18:46:03 +0000 (18:46 +0000)]
[InstCombine] be more careful when transforming a shuffle mask

This is reduced from a fuzzer test:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14890

Usually, demanded elements should be able to simplify shuffle
mask elements that are pointing to undef elements of its source
operands, but that doesn't happen in the test case.

llvm-svn: 361533

5 years ago[git] Be more specific when looking for llvm-svn
Jordan Rupprecht [Thu, 23 May 2019 18:43:19 +0000 (18:43 +0000)]
[git] Be more specific when looking for llvm-svn

Summary:
A commit may, for some reason, have `llvm-svn:` in it multiple times. It may even take up the whole line and look identical to what gets added automatically when svn commits land in github.

To workaround this, make changes to both lookups:

1) When doing the git -> svn lookup, make sure to go through the whole message, and:
 a) Only look for llvm-svn starting at the beginning of the line (excluding the whitespace that `git log` adds).
 b) Take the last one (at the end of the commit message), if there are multiple matches.

2) When doing the svn -> git lookup, look through a sizeable but still reasonably small number of git commits (10k, about 4-5 months right now), and:
 a) Only consider commits with the '^llvm-svn: NNNNNN' we expect, and
 b) Only consider those that also follow the same git -> svn matching above. (Error if it's not exactly one commit).

Reviewers: jyknight

Reviewed By: jyknight

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 361532

5 years agoTest commit access by removing a empty line
Antonio Afonso [Thu, 23 May 2019 18:35:54 +0000 (18:35 +0000)]
Test commit access by removing a empty line

llvm-svn: 361531

5 years ago[Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1
Reid Kleckner [Thu, 23 May 2019 18:35:43 +0000 (18:35 +0000)]
[Driver] Move the "-o OUT -x TYPE SRC.c" flags to the end of -cc1

New -cc1 arguments, such as -faddrsig, have started appearing after the
input name. I personally find it convenient for the input to be the last
argument to the compile command line, since I often need to edit it when
running crash reproduction scripts.

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

llvm-svn: 361530

5 years ago[OPENMP]Simplify codegen for the outlined regions.
Alexey Bataev [Thu, 23 May 2019 18:19:54 +0000 (18:19 +0000)]
[OPENMP]Simplify codegen for the outlined regions.

Simplified codegen for the outlined regions, excluding duplication code
for handling variables with the reference types.

llvm-svn: 361529

5 years ago[HostNativeThreadBase] Undo nullptr changes
Jonas Devlieghere [Thu, 23 May 2019 18:15:43 +0000 (18:15 +0000)]
[HostNativeThreadBase] Undo nullptr changes

The thread result type is an unsigned instead of a pointer on windows,
so we shouldn't replace 0 with nullptr here.

llvm-svn: 361528

5 years agoResubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info"
Robert Lougher [Thu, 23 May 2019 18:15:12 +0000 (18:15 +0000)]
Resubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info"

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

The functions findPotentiallyBlockedCopies and buildCopy are currently not
accounting for the presence of debug instructions. In the former this results
in the optimization not being trigerred, and in the latter results in
inconsistent codegen.

This patch enables the optimization to be performed in a debug build and
ensures the codegen is consistent with non-debug builds.

Patch by Chris Dawson.

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

llvm-svn: 361527

5 years ago[WebAssembly] Implement ReplaceNodeResults to fix a SIMD crash
Thomas Lively [Thu, 23 May 2019 18:09:26 +0000 (18:09 +0000)]
[WebAssembly] Implement ReplaceNodeResults to fix a SIMD crash

Reviewers: aheejin

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

Tags: #llvm

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

llvm-svn: 361526

5 years ago[NFC][PPC] Autogenerate vec_add_sub_quadword.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:26 +0000 (18:08 +0000)]
[NFC][PPC] Autogenerate vec_add_sub_quadword.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361525

5 years ago[NFC][PPC] Autogenerate vec_add_sub_doubleword.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:21 +0000 (18:08 +0000)]
[NFC][PPC] Autogenerate vec_add_sub_doubleword.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361524

5 years ago[NFC][Mips] Autogenerate msa/i5-s.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:17 +0000 (18:08 +0000)]
[NFC][Mips] Autogenerate msa/i5-s.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361523

5 years ago[NFC][Mips] Autogenerate msa/arithmetic.ll test
Roman Lebedev [Thu, 23 May 2019 18:08:13 +0000 (18:08 +0000)]
[NFC][Mips] Autogenerate msa/arithmetic.ll test

Being affected by (sub %x, C) -> add %X, (sub 0, C) 'for vectors' patch.

llvm-svn: 361522

5 years agoUpdateTestChecks: -march=mips/-march=mipsel is mips triple.
Roman Lebedev [Thu, 23 May 2019 18:08:00 +0000 (18:08 +0000)]
UpdateTestChecks: -march=mips/-march=mipsel is mips triple.

Again, a mixture of march and triple, with majority being march:

llvm/test/CodeGen/Mips$ grep -ri triple | wc -l
818
llvm/test/CodeGen/Mips$ grep -ri march | wc -l
1457

llvm-svn: 361521

5 years agogn build: Merge r361418 more
Nico Weber [Thu, 23 May 2019 18:01:16 +0000 (18:01 +0000)]
gn build: Merge r361418 more

llvm-svn: 361520

5 years agoAMDGPU/GlobalISel: Legality for integer min/max
Matt Arsenault [Thu, 23 May 2019 17:58:48 +0000 (17:58 +0000)]
AMDGPU/GlobalISel: Legality for integer min/max

llvm-svn: 361519

5 years agolld-link, clang: Treat non-existent input files as possible spellos for option flags
Nico Weber [Thu, 23 May 2019 17:58:33 +0000 (17:58 +0000)]
lld-link, clang: Treat non-existent input files as possible spellos for option flags

OptTable treats arguments starting with / that aren't a known option
as filenames. This means lld-link's and clang-cl's typo correction for
unknown flags didn't do spell checking for misspelled options that start
with /.

I first tried changing OptTable, but that got pretty messy, see PR41787
comments 2 and 3.

Instead, let lld-link's and clang's (including clang-cl's) "file not
found" diagnostic check if a non-existent file looks like it could be a
mis-spelled option, and if so add a "did you mean" suggestion to the
"file not found" diagnostic.

While here, make formatting of a few diagnostics a bit more
self-consistent.

Fixes PR41787.

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

llvm-svn: 361518

5 years ago [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step,...
Kit Barton [Thu, 23 May 2019 17:56:35 +0000 (17:56 +0000)]
[LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.

    Summary:
    This PR extends the loop object with more utilities to get loop bounds, step, induction variable, and guard branch. There already exists passes which try to obtain the loop induction variable in their own pass, e.g. loop interchange. It would be useful to have a common area to get these information. Moreover, loop fusion (https://reviews.llvm.org/D55851) is planning to use getGuard() to extend the kind of loops it is able to fuse, e.g. rotated loop with non-constant upper bound, which would have a loop guard.

      /// Example:
      /// for (int i = lb; i < ub; i+=step)
      ///   <loop body>
      /// --- pseudo LLVMIR ---
      /// beforeloop:
      ///   guardcmp = (lb < ub)
      ///   if (guardcmp) goto preheader; else goto afterloop
      /// preheader:
      /// loop:
      ///   i1 = phi[{lb, preheader}, {i2, latch}]
      ///   <loop body>
      ///   i2 = i1 + step
      /// latch:
      ///   cmp = (i2 < ub)
      ///   if (cmp) goto loop
      /// exit:
      /// afterloop:
      ///
      /// getBounds
      ///   getInitialIVValue      --> lb
      ///   getStepInst            --> i2 = i1 + step
      ///   getStepValue           --> step
      ///   getFinalIVValue        --> ub
      ///   getCanonicalPredicate  --> '<'
      ///   getDirection           --> Increasing
      /// getGuard             --> if (guardcmp) goto loop; else goto afterloop
      /// getInductionVariable          --> i1
      /// getAuxiliaryInductionVariable --> {i1}
      /// isCanonical                   --> false

    Committed on behalf of @Whitney (Whitney Tsang).

    Reviewers: kbarton, hfinkel, dmgreen, Meinersbur, jdoerfert, syzaara, fhahn

    Reviewed By: kbarton

    Subscribers: tvvikram, bmahjour, etiotto, fhahn, jsji, hiraditya, llvm-commits

    Tags: #llvm

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

llvm-svn: 361517

5 years ago[WebAssembly] Add multivalue and tail-call target features
Thomas Lively [Thu, 23 May 2019 17:26:47 +0000 (17:26 +0000)]
[WebAssembly] Add multivalue and tail-call target features

Summary:
These features will both be implemented soon, so I thought I would
save time by adding the boilerplate for both of them at the same time.

Reviewers: aheejin

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

Tags: #clang, #llvm

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

llvm-svn: 361516

5 years ago[FileCheck] Remove llvm:: prefix
Thomas Preud'homme [Thu, 23 May 2019 17:19:36 +0000 (17:19 +0000)]
[FileCheck] Remove llvm:: prefix

Summary:
Remove all llvm:: prefixes in FileCheck library header and
implementation except for calls to make_unique and make_shared since
both files already use the llvm namespace.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: hiraditya, arichardson, probinson, llvm-commits

Tags: #llvm

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

llvm-svn: 361515

5 years ago[LibTooling] Fix dangling references in RangeSelector.
Yitzhak Mandelbaum [Thu, 23 May 2019 17:11:33 +0000 (17:11 +0000)]
[LibTooling] Fix dangling references in RangeSelector.

Summary:
RangeSelector had a number of cases of capturing a StringRef in a lambda, which
lead to dangling references. This change converts all uses in the API of
`StringRef` to `std::string` to avoid this problem. `std::string` in the API is
a reasonable choice, because the combinators are always storing the string
beyond the life of the combinator construction.

Reviewers: ilya-biryukov, gribozavr

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361514

5 years ago[CMake] Copy C++ headers before configuring runtimes build
Chris Bieneman [Thu, 23 May 2019 17:06:46 +0000 (17:06 +0000)]
[CMake] Copy C++ headers before configuring runtimes build

Summary: On some platforms C++ headers are packaged with the compiler not the sysroot. If you don't copy C++ headers into the build include directory during configuraiton of the outer build the C++ check during the runtime configuration may get inaccurate results.

Reviewers: phosek, compnerd, smeenai, EricWF

Reviewed By: compnerd

Subscribers: EricWF, christof, libcxx-commits, mgorny, llvm-commits

Tags: #llvm, #libc

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

llvm-svn: 361513

5 years agoTransforms: lower fadd and fsub atomicrmw instructions
Saleem Abdulrasool [Thu, 23 May 2019 17:03:43 +0000 (17:03 +0000)]
Transforms: lower fadd and fsub atomicrmw instructions

`fadd` and `fsub` have recently (r351850) been added as `atomicrmw`
operations. This diff adds lowering cases for them to the LowerAtomic
transform.

Patch by Josh Berdine!

llvm-svn: 361512

5 years ago[Index] Fix reported references in presence of template type aliases
Ilya Biryukov [Thu, 23 May 2019 16:48:47 +0000 (16:48 +0000)]
[Index] Fix reported references in presence of template type aliases

Summary: See the added test for an example.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 361511

5 years ago[CodeComplete] Only show lambda completions if patterns are requested
Ilya Biryukov [Thu, 23 May 2019 16:39:26 +0000 (16:39 +0000)]
[CodeComplete] Only show lambda completions if patterns are requested

This is a trivial follow-up to r361461, so sending without review.

llvm-svn: 361510

5 years ago[MCA] Add the ability to compute critical register dependency of an instruction.
Andrea Di Biagio [Thu, 23 May 2019 16:32:19 +0000 (16:32 +0000)]
[MCA] Add the ability to compute critical register dependency of an instruction.

This patch adds the methods `getCriticalRegDep()` and `computeCriticalRegDep()` to
class InstructionBase.
The goal is to allow users to obtain information about the critical register
dependency that most affects the latency of an instruction.

These methods are currently unused. However, the long term plan is to use them
in order to allow the computation of a critical-path as part of the bottleneck
analysis. So, this is yet another step towards fixing PR37494.

llvm-svn: 361509

5 years ago[AsmPrinter] Treat a narrowing PtrToInt like Trunc
Shoaib Meenai [Thu, 23 May 2019 16:29:09 +0000 (16:29 +0000)]
[AsmPrinter] Treat a narrowing PtrToInt like Trunc

When printing assembly for PtrToInt, AsmPrinter::lowerConstant
incorrectly assumed that if PtrToInt was not converting to an
int with exactly the same number of bits, it must be widening
to a larger int. But this isn't necessarily true; PtrToInt can
also shrink the size, which is useful when you want to produce
a known 32-bit pointer on a 64-bit platform (on x86_64 ELF
this yields a R_X86_64_32 relocation).

The old behavior of falling through to the widening case for a
narrowing PtrToInt yields bogus assembly code like this, which
fails to assemble because the no-op bit and it accidentally
creates is not a valid relocation:

```
        .long   a&-1
```

The fix is to treat a narrowing PtrToInt exactly the same as
it already treats Trunc: just emit the expression and let
the assembler deal with truncating it in the appropriate way.

Patch by Mat Hostetter <mjh@fb.com>.

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

llvm-svn: 361508

5 years agoEnsure builtins use the target default Calling Convention
Erich Keane [Thu, 23 May 2019 16:05:21 +0000 (16:05 +0000)]
Ensure builtins use the target default Calling Convention

r355317 changed builtins/allocation functions to use the default calling
convention in order to support platforms that use non-cdecl calling
conventions by default.

However the default calling convention is overridable on Windows 32 bit
implementations with some of the /G options. The intent is to permit the
user to set the calling convention of normal functions, however it
should NOT apply to builtins and C++ allocation functions.

This patch ensures that the builtin/allocation functions always use the
Target specific Calling Convention, ignoring the user overridden version
of said default.

llvm-svn: 361507

5 years ago[Object] object::ELFObjectFile::symbol_begin(): skip symbol index 0
Fangrui Song [Thu, 23 May 2019 16:01:59 +0000 (16:01 +0000)]
[Object] object::ELFObjectFile::symbol_begin(): skip symbol index 0

For clients iterating the symbol table, none expects to handle index 0
(STN_UNDEF). Skip it to improve consistency with other binary formats.
Clients that need STN_UNDEF (e.g. lld) can use
getSectionContentsAsArray(). A test will be added in D62148.

Reviewed By: mtrent

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

llvm-svn: 361506

5 years ago[analyzer][NFC] Prettify some RUN: lines in test files.
Kristof Umann [Thu, 23 May 2019 15:49:04 +0000 (15:49 +0000)]
[analyzer][NFC] Prettify some RUN: lines in test files.

This is a test commit in disguise.

llvm-svn: 361505

5 years ago[Driver] Try normalized triple when looking for C++ libraries
Petr Hosek [Thu, 23 May 2019 15:23:16 +0000 (15:23 +0000)]
[Driver] Try normalized triple when looking for C++ libraries

This addresses the issue introduced in r361432 where we would only
try effective triple but not the normalized one as we do for other
runtimes.

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

llvm-svn: 361504

5 years ago[lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'
Konrad Kleine [Thu, 23 May 2019 15:17:39 +0000 (15:17 +0000)]
[lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'

Summary:
On Windows `lldb::thread_result_t` resolves to `typedef unsigned thread_result_t;` and on other platforms it resolves to `typedef void *thread_result_t;`.
 Therefore one cannot use `nullptr` when returning from a function that returns `thread_result_t`.

I've made this change because a windows build bot fails with these errors:

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

and

```
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): 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\Core\Debugger.cpp(1664): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t'
E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
```

This is the failing build: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5035/steps/build/logs/stdio

Reviewers: JDevlieghere, teemperor, jankratochvil, labath, clayborg, RKSimon, courbet, jhenderson

Reviewed By: labath, clayborg

Subscribers: labath, lldb-commits

Tags: #lldb

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

llvm-svn: 361503

5 years agoWork around a Visual C++ bug.
Paul Robinson [Thu, 23 May 2019 15:07:46 +0000 (15:07 +0000)]
Work around a Visual C++ bug.

Using a static function as a template parameter gets a bogus compile-time
error with Visual Studio 2017, prior to version 15.8. Our current
minimum-version requirement is a particular update to VS2015, and we
assume all Visual Studio 2017 versions are usable. This patch makes the
code buildable with older versions of VS2017, and can be reverted after
we upgrade the minimum version sometime in the future.

Description of the Microsoft bug:
https://developercommunity.visualstudio.com/content/problem/25334/error-code-c2971-when-specifying-a-function-as-the.html

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

llvm-svn: 361502

5 years ago[cmake] When getting Ninja version, don't include CMakeNinjaFindMake
Don Hinton [Thu, 23 May 2019 15:03:22 +0000 (15:03 +0000)]
[cmake] When getting Ninja version, don't include CMakeNinjaFindMake
which doesn't play well with passing CMAKE_MAKE_PROGRAM from the
commandline without a path.

Fixes a bug introduced in r361280.

Thanks to Mikael Holmén for reporting this!

llvm-svn: 361501

5 years ago[NFC][InstCombine] Add unary FNeg tests to maximum.ll/minimum.ll
Cameron McInally [Thu, 23 May 2019 14:53:42 +0000 (14:53 +0000)]
[NFC][InstCombine] Add unary FNeg tests to maximum.ll/minimum.ll

llvm-svn: 361500

5 years ago[RISCV] Support assembling TLS LA pseudo instructions
Lewis Revill [Thu, 23 May 2019 14:46:27 +0000 (14:46 +0000)]
[RISCV] Support assembling TLS LA pseudo instructions

This patch adds the pseudo instructions la.tls.ie and la.tls.gd, used in
the initial-exec and global-dynamic TLS models respectively when
addressing a global. The pseudo instructions are expanded in the
assembly parser.

llvm-svn: 361499

5 years agogn build: Merge r361487
Nico Weber [Thu, 23 May 2019 13:59:44 +0000 (13:59 +0000)]
gn build: Merge r361487

llvm-svn: 361498

5 years ago[LiveDebugValues] Rename 'DMI' into 'DebugInstr' (NFC)
Petar Jovanovic [Thu, 23 May 2019 13:49:06 +0000 (13:49 +0000)]
[LiveDebugValues] Rename 'DMI' into 'DebugInstr' (NFC)

This will improve code readability.

Patch by Djordje Todorovic.

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

llvm-svn: 361497

5 years ago[MCA] Introduce class LSUnitBase and let LSUnit derive from it.
Andrea Di Biagio [Thu, 23 May 2019 13:42:47 +0000 (13:42 +0000)]
[MCA] Introduce class LSUnitBase and let LSUnit derive from it.

Class LSUnitBase provides a abstract interface for all the concrete LS units in
llvm-mca.

Methods exposed by the public abstract LSUnitBase interface are:
 - Status isAvailable(const InstRef&);
 - void dispatch(const InstRef &);
 - const InstRef &isReady(const InstRef &);

LSUnitBase standardises the API, but not the data structures internally used by
LS units. This allows for more flexibility.
Previously, only method `isReady()` was declared virtual by class LSUnit.
Also, derived classes had to inherit all the internal data members of LSUnit.

No functional change intended.

llvm-svn: 361496

5 years ago[X86] Regenerate LZCNT tests on x86/x32/x64 targets
Simon Pilgrim [Thu, 23 May 2019 13:30:10 +0000 (13:30 +0000)]
[X86] Regenerate LZCNT tests on x86/x32/x64 targets

llvm-svn: 361495

5 years ago[libcxx][tests] Fix order checking in unordered_multiset tests.
Louis Dionne [Thu, 23 May 2019 13:11:00 +0000 (13:11 +0000)]
[libcxx][tests] Fix order checking in unordered_multiset tests.

Some tests assume that iteration through an unordered multiset elements
will return them in the same order as at the container creation. This
assumption is not true since the container is unordered, so that no
specific order of elements is ever guaranteed for such container. This
patch introduces checks verifying that any iteration will return
elements exactly from a set of valid values and without repetition,
but in no particular order.

Thanks to Andrey Maksimov for  the patch.

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

llvm-svn: 361494

5 years ago[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV
Alex Bradbury [Thu, 23 May 2019 12:43:13 +0000 (12:43 +0000)]
[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV

r360897 was incomplete, must have applied an old/wip patch. This is in preparation for emitting CFI directives.

llvm-svn: 361493

5 years ago[llvm-objdump][test] Make MachO test names consistent
Fangrui Song [Thu, 23 May 2019 12:43:08 +0000 (12:43 +0000)]
[llvm-objdump][test] Make MachO test names consistent

We have macho-disassembl{e,y}-*. Rename macho-disassembly-* to
macho-disassemble-* for consistency.

llvm-svn: 361492

5 years ago[llvm-objdump][test] Make test names consistent
James Henderson [Thu, 23 May 2019 12:38:06 +0000 (12:38 +0000)]
[llvm-objdump][test] Make test names consistent

This change renames a number of the disassembly tests to standardise
disasm/diassemble/disassembly to disassemble. Requested in
https://reviews.llvm.org/D62255.

llvm-svn: 361491

5 years ago[MergeICmps] Make the pass compatible with the new pass manager.
Clement Courbet [Thu, 23 May 2019 12:35:26 +0000 (12:35 +0000)]
[MergeICmps] Make the pass compatible with the new pass manager.

Reviewers: gchatelet, spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 361490

5 years ago[llvm-objdump][test] Improve testing of some switches #3
James Henderson [Thu, 23 May 2019 12:30:39 +0000 (12:30 +0000)]
[llvm-objdump][test] Improve testing of some switches #3

This is the third commit in a series of patches to improve test coverage
of llvm-objdump. In this patch I have added a number of tests testing
various aspects of disassembly.

Reviewed by: MaskRay, grimar, rupprecht

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

llvm-svn: 361489

5 years ago[clangd] Also update package-lock.json
Kadir Cetinkaya [Thu, 23 May 2019 12:02:14 +0000 (12:02 +0000)]
[clangd] Also update package-lock.json

llvm-svn: 361488

5 years ago[clang-tidy] New check calling out uses of +new in Objective-C code
Dmitri Gribenko [Thu, 23 May 2019 12:01:26 +0000 (12:01 +0000)]
[clang-tidy] New check calling out uses of +new in Objective-C code

Summary:
Google's Objective-C style guide forbids calling or overriding +new to instantiate objects. This check warns on violations.

Style guide reference: https://google.github.io/styleguide/objcguide.html#do-not-use-new

Patch by Michael Wyman.

Reviewers: benhamilton, aaron.ballman, JonasToth, gribozavr, ilya-biryukov, stephanemoore, mwyman

Reviewed By: aaron.ballman, gribozavr, stephanemoore, mwyman

Subscribers: stephanemoore, xazax.hun, Eugene.Zelenko, mgorny, cfe-commits

Tags: #clang, #clang-tools-extra

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

llvm-svn: 361487

5 years ago[clangd] Bump vscode extension version
Kadir Cetinkaya [Thu, 23 May 2019 11:58:03 +0000 (11:58 +0000)]
[clangd] Bump vscode extension version

llvm-svn: 361486

5 years ago[AMDGPU] Regenerate vector sub tests
Simon Pilgrim [Thu, 23 May 2019 11:27:28 +0000 (11:27 +0000)]
[AMDGPU] Regenerate vector sub tests

llvm-svn: 361485

5 years ago[lldb] NFC modernize codebase with modernize-use-nullptr
Konrad Kleine [Thu, 23 May 2019 11:14:47 +0000 (11:14 +0000)]
[lldb] NFC modernize codebase with modernize-use-nullptr

Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]

This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.

This is the command I ran and I to fix and format the code base:

```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```

NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.

NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.

Reviewers: martong, espindola, shafik, #lldb, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits

Tags: #lldb, #llvm

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

llvm-svn: 361484

5 years ago[NFC][X86] Fix check prefixes and autogenerate fold-pcmpeqd-2.ll test
Roman Lebedev [Thu, 23 May 2019 10:55:13 +0000 (10:55 +0000)]
[NFC][X86] Fix check prefixes and autogenerate fold-pcmpeqd-2.ll test

Being affected by (sub %x, c) -> (add %x, (sub 0, c))
patch in an uncertain way.

llvm-svn: 361483

5 years ago[MCA] Make the bool conversion operator in class InstRef explicit. NFCI
Andrea Di Biagio [Thu, 23 May 2019 10:50:01 +0000 (10:50 +0000)]
[MCA] Make the bool conversion operator in class InstRef explicit. NFCI

This patch makes the bool conversion operator in InstRef explicit.
It also adds a operator< to hel comparing InstRef objects in sets.

llvm-svn: 361482

5 years agoAdd REQUIRES: lld to debug-types-address-ranges.s
Pavel Labath [Thu, 23 May 2019 10:46:35 +0000 (10:46 +0000)]
Add REQUIRES: lld to debug-types-address-ranges.s

This should fix the green dragon bots.

llvm-svn: 361481

5 years ago[DwarfExpression] Refactor dwarf expression (NFC)
Petar Jovanovic [Thu, 23 May 2019 10:37:13 +0000 (10:37 +0000)]
[DwarfExpression] Refactor dwarf expression (NFC)

Refactor location description kind in order to be easier for extensions
(needed for D60866).
In addition, cut off some bits from the other class fields.

Patch by Djordje Todorovic.

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

llvm-svn: 361480

5 years ago[llvm-objdump][test] Improve testing of some switches #2
James Henderson [Thu, 23 May 2019 10:17:10 +0000 (10:17 +0000)]
[llvm-objdump][test] Improve testing of some switches #2

This patch focuses on adding additional testing for the --source switch.
For reference, the source-interleave-x86_64.ll test file has been split
into two parts - the input (shared with the other tests) and the test
itself.

Reviewed by: MaskRay, rupprecht, grimar

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

llvm-svn: 361479

5 years agoSimplify InputFile::fetch().
Rui Ueyama [Thu, 23 May 2019 10:15:12 +0000 (10:15 +0000)]
Simplify InputFile::fetch().

We don't have to return a value from the function. Instead, we can
directly call parseFile from the functions.

llvm-svn: 361478

5 years agoRemove LazyObjFile::AddedToLink.
Rui Ueyama [Thu, 23 May 2019 10:08:56 +0000 (10:08 +0000)]
Remove LazyObjFile::AddedToLink.

Instead we can just clear a MemoryBuffer so that we cannot get the
same buffer more than once.

llvm-svn: 361477

5 years agoReland: [WebAssembly] Add __start_/_stop_ symbols for data sections
Sam Clegg [Thu, 23 May 2019 10:06:03 +0000 (10:06 +0000)]
Reland: [WebAssembly] Add __start_/_stop_ symbols for data sections

This is a reland of rL361235.

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

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

llvm-svn: 361476

5 years ago[clangd-vscode] Do not customize uri converters in vscode
Kadir Cetinkaya [Thu, 23 May 2019 09:58:29 +0000 (09:58 +0000)]
[clangd-vscode] Do not customize uri converters in vscode

Summary:
Clangd is already resolving symlinks on the server side, therefore
there is no more need to handle it in client side. This was also resulting in
breakages whenever index contained a symbol coming from a non-existent file(like
a generated file), e.g. during workspace symbols whole response was dropped
since stat had failed.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 361475