platform/upstream/llvm.git
4 years ago[clangd] Bail out early if we are sure that the symbol is used outside of the file.
Haojian Wu [Wed, 2 Oct 2019 10:46:37 +0000 (10:46 +0000)]
[clangd] Bail out early if we are sure that the symbol is used outside of the file.

Summary:
This would reduce the false positive when the static index is in an
unavailable state, e.g. background index is not finished.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 373444

4 years ago[clangd] SelectionTree should mark a node as fully-selected if the only claimed token...
Sam McCall [Wed, 2 Oct 2019 10:01:53 +0000 (10:01 +0000)]
[clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed.

Summary:
Previously they would be marked as partially-selected based on the early claim,
and never updated as no more tokens were claimed.
This affects simple VarDecls like "int x".

Reviewers: SureYeaah

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 373442

4 years ago[ClangFormat] relnotes for r373439
Sam McCall [Wed, 2 Oct 2019 09:52:52 +0000 (09:52 +0000)]
[ClangFormat] relnotes for r373439

llvm-svn: 373441

4 years ago[clang-rename] Better renaming the typedef decl.
Haojian Wu [Wed, 2 Oct 2019 09:50:46 +0000 (09:50 +0000)]
[clang-rename] Better renaming the typedef decl.

Summary:
when renaming a typedef decl, we used to rename the underlying decl of the
typedef, we should rename the typedef itself.

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373440

4 years ago[ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary...
Sam McCall [Wed, 2 Oct 2019 09:50:40 +0000 (09:50 +0000)]
[ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

Summary:
The historical context:
- clang-format was written when C++11 was current,
  and the main language-version concern was >> vs > > template-closers.
  An option was added to allow selection of the 03/11 behavior, or auto-detection.
- there was no option to choose simply "latest standard" so anyone who didn't
  ever want 03 behavior or auto-detection specified Cpp11.
- In r185149 this option started to affect lexer mode.
- no options were added to cover c++14, as parsing/formatting
  didn't change that much. The usage of Cpp11 to mean "latest" became
  codified e.g. in r206263
- c++17 added some new constructs. These were mostly backwards-compatible and so
  not used in old programs, so having no way to turn them off was OK.
- c++20 added some new constructs and keywords (e.g. co_*) that changed the
  meaning of existing programs, and people started to complain that
  the c++20 parsing couldn't be turned off.

New plan:
 - Default ('Auto') behavior remains unchanged: parse as latest, format
   template-closers based on input.
 - Add new 'Latest' option that more clearly expresses the intent "use
   modern features" that many projects have chosen for their .clang-format files.
 - Allow pinning to *any* language version, using the same name as clang -std:
   c++03, c++11, c++14 etc. These set precise lexer options, and any
   clang-format code depending on these can use a >= check.
 - For backwards compatibility, `Cpp11` is an alias for `Latest`, not `c++11`.
   This matches the historical documented semantics of this option.
   This spelling (and `Cpp03`) are deprecated.

Reviewers: klimek, modocache

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 373439

4 years agogn build: (manually) merge r373425
Nico Weber [Wed, 2 Oct 2019 09:48:16 +0000 (09:48 +0000)]
gn build: (manually) merge r373425

llvm-svn: 373438

4 years ago[IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics
Kerry McLaughlin [Wed, 2 Oct 2019 09:25:02 +0000 (09:25 +0000)]
[IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics

Summary:
This allows intrinsics such as the following to be defined:
 - declare <n x 4 x i32> @llvm.something.nxv4f32(<n x 4 x i32>, <n x 4 x i1>, <n x 4 x float>)

...where <n x 4 x i32> is derived from <n x 4 x float>, but
the element needs bitcasting to int.

Reviewers: c-rhodes, sdesmalen, rovka

Reviewed By: c-rhodes

Subscribers: tschuett, hiraditya, jdoerfert, llvm-commits, cfe-commits

Tags: #llvm

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

llvm-svn: 373437

4 years ago[clang-tidy] Fix typo in r373428
Sam McCall [Wed, 2 Oct 2019 09:16:48 +0000 (09:16 +0000)]
[clang-tidy] Fix typo in r373428

llvm-svn: 373436

4 years ago[clangd] Always send file URIs to editors
Kadir Cetinkaya [Wed, 2 Oct 2019 09:12:01 +0000 (09:12 +0000)]
[clangd] Always send file URIs to editors

Summary:
Editors only know about file URIs, make sure we do not use any custom
schemes while sending edits.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

llvm-svn: 373435

4 years agoRemove an unnecessary cast. NFC.
Jay Foad [Wed, 2 Oct 2019 08:56:33 +0000 (08:56 +0000)]
Remove an unnecessary cast. NFC.

llvm-svn: 373434

4 years ago[AMDGPU] Make printf lowering faster when there are no printfs
Jay Foad [Wed, 2 Oct 2019 08:44:15 +0000 (08:44 +0000)]
[AMDGPU] Make printf lowering faster when there are no printfs

Summary:
Printf lowering unconditionally visited every instruction in the module.
To make it faster in the common case where there are no printfs, look up
the printf function (if any) and iterate over its users instead.

Reviewers: rampitec, kzhuravl, alex-t, arsenm

Subscribers: jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373433

4 years agoRevert [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.
Florian Hahn [Wed, 2 Oct 2019 08:32:25 +0000 (08:32 +0000)]
Revert [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.

This breaks http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52310

This reverts r373430 (git commit 70f70035484ba199a329f9f8d9bd67e37bc2b408)

llvm-svn: 373432

4 years agoSwitch lowering: omit range check for bit tests when default is unreachable (PR43129)
Hans Wennborg [Wed, 2 Oct 2019 08:32:15 +0000 (08:32 +0000)]
Switch lowering: omit range check for bit tests when default is unreachable (PR43129)

This is modeled after the same functionality for jump tables, which was
added in r357067.

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

llvm-svn: 373431

4 years ago[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.
Florian Hahn [Wed, 2 Oct 2019 08:15:31 +0000 (08:15 +0000)]
[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.

removeUnreachableBlocks knows how to preserve the DomTree, so make use
of it instead of re-computing the DT.

Reviewers: davide, kuhar, brzycki

Reviewed By: davide, kuhar

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

llvm-svn: 373430

4 years ago[Local] Simplify function removeUnreachableBlocks() to avoid (re-)computation.
Florian Hahn [Wed, 2 Oct 2019 07:37:41 +0000 (07:37 +0000)]
[Local] Simplify function removeUnreachableBlocks() to avoid (re-)computation.

Two small changes in llvm::removeUnreachableBlocks() to avoid unnecessary (re-)computation.

First, replace the use of count() with find(), which has better time complexity.

Second, because we have already computed the set of dead blocks, replace the second loop over all basic blocks to a loop only over the already computed dead blocks. This simplifies the loop and avoids recomputation.

Patch by Rodrigo Caetano Rocha <rcor.cs@gmail.com>

Reviewers: efriedma, spatel, fhahn, xbolva00

Reviewed By: fhahn, xbolva00

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

llvm-svn: 373429

4 years ago[clang-tidy] Fix for commits rL372706 and rL372711
Adam Balogh [Wed, 2 Oct 2019 07:14:11 +0000 (07:14 +0000)]
[clang-tidy] Fix for commits rL372706 and rL372711

The patch committed was not the accepted version but the
previous one. This commit fixes this issue.

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

llvm-svn: 373428

4 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Wed, 2 Oct 2019 07:00:01 +0000 (07:00 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

The cause of the test failure was resolved.

llvm-svn: 373427

4 years ago[llvm-lib] Detect duplicate input files
Rui Ueyama [Wed, 2 Oct 2019 06:41:52 +0000 (06:41 +0000)]
[llvm-lib] Detect duplicate input files

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

llvm-svn: 373426

4 years agoRename TypeNodes.def to TypeNodes.inc for consistency across all
John McCall [Wed, 2 Oct 2019 06:35:23 +0000 (06:35 +0000)]
Rename TypeNodes.def to TypeNodes.inc for consistency across all
our autogenerated files.  NFC.

As requested by Nico Weber.

llvm-svn: 373425

4 years ago[llvm-lib] Correctly handle .lib input files
Rui Ueyama [Wed, 2 Oct 2019 05:24:24 +0000 (05:24 +0000)]
[llvm-lib] Correctly handle .lib input files

If archive files are passed as input files, llvm-lib needs to append
the members of the input archive files to the output file. This patch
implements that behavior.

This patch splits an existing function into smaller functions.
Effectively, the new code is only `if (Magic == file_magic::archive)
{ ... }` part.

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

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

llvm-svn: 373424

4 years ago[X86] Add broadcast load folding patterns to the NoVLX compare patterns.
Craig Topper [Wed, 2 Oct 2019 04:45:02 +0000 (04:45 +0000)]
[X86] Add broadcast load folding patterns to the NoVLX compare patterns.

These patterns use zmm registers for 128/256-bit compares when
the VLX instructions aren't available. Previously we only
supported registers, but as PR36191 notes we can fold broadcast
loads, but not regular loads.

llvm-svn: 373423

4 years agoFix GCC -Wreturn-type warnings. NFC.
Michael Liao [Wed, 2 Oct 2019 04:13:17 +0000 (04:13 +0000)]
Fix GCC -Wreturn-type warnings. NFC.

llvm-svn: 373422

4 years agoRevert r368237 - Update fix-it hints for std::move warnings.
Richard Trieu [Wed, 2 Oct 2019 02:32:15 +0000 (02:32 +0000)]
Revert r368237 - Update fix-it hints for std::move warnings.

r368237 attempted to improve fix-its for move warnings, but introduced some
regressions to -Wpessimizing-move.  Revert that change and add the missing
test cases to the pessimizing move test to prevent future regressions.

llvm-svn: 373421

4 years agoDebugInfo: Update support for detecting C++ language variants in debug info emission
David Blaikie [Wed, 2 Oct 2019 01:39:48 +0000 (01:39 +0000)]
DebugInfo: Update support for detecting C++ language variants in debug info emission

llvm-svn: 373420

4 years agogn build: (manually) merge r373407
Nico Weber [Wed, 2 Oct 2019 01:26:46 +0000 (01:26 +0000)]
gn build: (manually) merge r373407

llvm-svn: 373419

4 years agoFix crash on constant-evaluation of pseudo-destruction of a pointer.
Richard Smith [Wed, 2 Oct 2019 01:13:57 +0000 (01:13 +0000)]
Fix crash on constant-evaluation of pseudo-destruction of a pointer.

We got confused and thought we might be pseudo-destroying the pointee
instead.

llvm-svn: 373418

4 years agoAMDGPU/GlobalISel: Use getIntrinsicID helper
Matt Arsenault [Wed, 2 Oct 2019 01:02:27 +0000 (01:02 +0000)]
AMDGPU/GlobalISel: Use getIntrinsicID helper

llvm-svn: 373417

4 years agoRemove TypeNodes.def from the modulemap.
John McCall [Wed, 2 Oct 2019 01:02:27 +0000 (01:02 +0000)]
Remove TypeNodes.def from the modulemap.

We currently just look for files named in the modulemap in its
associated source directory.  This means that we can't name
generated files, like TypeNodes.def now is, which means we can't
explicitly mark it as textual.  But fortunately that's okay
because (as I understand it) the most important purpose of naming
the header in the modulemap is to ensure that it's not treated as
public, and the search for public headers also only considers
files in the associated source directory.  This isn't an elegant
solution, since among other things it means that a build which
wrote the generated files directly into the source directory would
result in something that wouldn't build as a module, but that's
a problem for all our other generated files as well.

llvm-svn: 373416

4 years agoAMDGPU/GlobalISel: Assume VGPR for G_FRAME_INDEX
Matt Arsenault [Wed, 2 Oct 2019 01:02:24 +0000 (01:02 +0000)]
AMDGPU/GlobalISel: Assume VGPR for G_FRAME_INDEX

In principle this should behave as any other constant. However
eliminateFrameIndex currently assumes a VALU use and uses a vector
shift. Work around this by selecting to VGPR for now until
eliminateFrameIndex is fixed.

llvm-svn: 373415

4 years agoAMDGPU/GlobalISel: Private loads always use VGPRs
Matt Arsenault [Wed, 2 Oct 2019 01:02:21 +0000 (01:02 +0000)]
AMDGPU/GlobalISel: Private loads always use VGPRs

llvm-svn: 373414

4 years agoAMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR
Matt Arsenault [Wed, 2 Oct 2019 01:02:18 +0000 (01:02 +0000)]
AMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR

This will be needed to support AGPR operations.

llvm-svn: 373413

4 years agoAMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values
Matt Arsenault [Wed, 2 Oct 2019 01:02:14 +0000 (01:02 +0000)]
AMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values

llvm-svn: 373412

4 years ago[AMDGPU] separate accounting for agprs
Stanislav Mekhanoshin [Wed, 2 Oct 2019 00:26:58 +0000 (00:26 +0000)]
[AMDGPU] separate accounting for agprs

Account and report agprs separately on gfx908. Other targets
do not change the reporting.

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

llvm-svn: 373411

4 years agoFix unused variable warning. NFCI.
Michael Liao [Wed, 2 Oct 2019 00:22:45 +0000 (00:22 +0000)]
Fix unused variable warning. NFCI.

llvm-svn: 373410

4 years agoMake yet another attempt in restoring SymbolFilePDBTests
Adrian Prantl [Wed, 2 Oct 2019 00:06:27 +0000 (00:06 +0000)]
Make yet another attempt in restoring SymbolFilePDBTests

The original test was passing false to the append argument of
FindTypes (the only use of this feature!). This patch now replicates
that by passing a fresh TypeMap into the function where applicable.

llvm-svn: 373409

4 years ago[X86] Add a DAG combine to shrink vXi64 gather/scatter indices that are constant...
Craig Topper [Tue, 1 Oct 2019 23:18:31 +0000 (23:18 +0000)]
[X86] Add a DAG combine to shrink vXi64 gather/scatter indices that are constant with sufficient sign bits to fit in vXi32

The gather/scatter instructions can implicitly sign extend the indices. If we're operating on 32-bit data, an v16i64 index can force a v16i32 gather to be split in two since the index needs 2 registers. If we can shrink the index to the i32 we can avoid the split. It should always be safe to shrink the index regardless of the number of elements. We have gather/scatter instructions that can use v2i32 index stored in a v4i32 register with v2i64 data size.

I've limited this to before legalize types to avoid creating a v2i32 after type legalization. We could check for it, but we'd also need testing. I'm also only handling build_vectors with no bitcasts to be sure the truncate will constant fold.

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

llvm-svn: 373408

4 years agoEmit TypeNodes.def with tblgen.
John McCall [Tue, 1 Oct 2019 23:13:03 +0000 (23:13 +0000)]
Emit TypeNodes.def with tblgen.

The primary goal here is to make the type node hierarchy available to
other tblgen backends, although it should also make it easier to generate
more selective x-macros in the future.

Because tblgen doesn't seem to allow backends to preserve the source
order of defs, this is not NFC because it significantly re-orders IDs.
I've fixed the one (fortunately obvious) place where we relied on
the old order.  Unfortunately, I wasn't able to share code with the
existing AST-node x-macro generators because the x-macro schema we use
for types is different in a number of ways.  The main loss is that
subclasses aren't ordered together, which doesn't seem important for
types because the hierarchy is generally very shallow with little
clustering.

llvm-svn: 373407

4 years agoUse scope qualifiers in Clang's tblgen backends to get useful
John McCall [Tue, 1 Oct 2019 23:12:57 +0000 (23:12 +0000)]
Use scope qualifiers in Clang's tblgen backends to get useful
redeclaration checking.  NFC.

llvm-svn: 373406

4 years ago[CMake] Fix the value of `config.target_cflags` for non-macOS Apple platforms. Attemp...
Dan Liew [Tue, 1 Oct 2019 23:08:18 +0000 (23:08 +0000)]
[CMake] Fix the value of `config.target_cflags` for non-macOS Apple platforms. Attempt #3.

The main problem here is that `-*-version_min=` was not being passed to
the compiler when building test cases. This can cause problems when
testing on devices running older OSs because Clang would previously
assume the minimum deployment target is the the latest OS in the SDK
which could be much newer than what the device is running.

Previously the generated value looked like this:

`-arch arm64 -isysroot
<path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

With this change it now looks like:

`-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot
<path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

This mirrors the setting of config.target_cflags on macOS.

This change is made for ASan, LibFuzzer, TSan, and UBSan.

To implement this a new `get_test_cflags_for_apple_platform()` function
has been added that when given an Apple platform name and architecture
returns a string containing the C compiler flags to use when building
tests. This also calls a new helper function `is_valid_apple_platform()`
that validates Apple platform names.

This is the third attempt at landing the patch.

The first attempt (r359305) had to be reverted (r359327) due to a buildbot
failure. The problem was that calling `get_test_cflags_for_apple_platform()`
can trigger a CMake error if the provided architecture is not supported by the
current CMake configuration. Previously, this could be triggered by passing
`-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were
generating test configurations for a list of architectures without checking if
the relevant Sanitizer actually supported that architecture. We now intersect
the list of architectures for an Apple platform with
`<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to
iterate through the correct list of architectures.

The second attempt (r363633) had to be reverted (r363779) due to a build
failure. The failed build was using a modified Apple toolchain where the iOS
simulator SDK was missing. This exposed a bug in the existing UBSan test
generation code where it was assumed that `COMPILER_RT_ENABLE_IOS` implied that
the toolchain supported both iOS and the iOS simulator. This is not true. This
has been fixed by using the list `SANITIZER_COMMON_SUPPORTED_OS` for the list
of supported Apple platforms for UBSan. For consistency with the other
Sanitizers we also now intersect the list of architectures with
UBSAN_SUPPORTED_ARCH.

rdar://problem/50124489

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

llvm-svn: 373405

4 years agoAMDGPU: Fix an out of date assert in addressing FrameIndex
Changpeng Fang [Tue, 1 Oct 2019 23:07:14 +0000 (23:07 +0000)]
AMDGPU: Fix an out of date assert in addressing FrameIndex

Reviewers:
  arsenm

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

llvm-svn: 373404

4 years ago[libFuzzer] Remove lazy counters.
Matt Morehouse [Tue, 1 Oct 2019 22:49:06 +0000 (22:49 +0000)]
[libFuzzer] Remove lazy counters.

Summary: Lazy counters haven't improved performance for large fuzz targets.

Reviewers: kcc

Reviewed By: kcc

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 373403

4 years agoDetermine endianness at a time when it doesn't inadvertantly clear gdb's wrap_buffer...
Sterling Augustine [Tue, 1 Oct 2019 22:42:37 +0000 (22:42 +0000)]
Determine endianness at a time when it doesn't inadvertantly clear gdb's wrap_buffer via gdb.execute.

Summary:
I haven't managed a small reproduction for this bug, it involves
complicated and deeply nested data structures with a wide variety
of pretty printers. But in general, we shouldn't be combining
gdb's command line interface (via gdb.execute) with pretty-printers.

Subscribers: christof, llvm-commits

Tags: #llvm

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

llvm-svn: 373402

4 years agoRevert r373172 "[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops."
Craig Topper [Tue, 1 Oct 2019 22:40:03 +0000 (22:40 +0000)]
Revert r373172 "[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops."

This seems to be causing some performance regresions that I'm
trying to investigate.

One thing that stands out is that this transform can increase
the live range of the operands of the earlier logic op. This
can be bad for register allocation. If there are two logic
op inputs we should really combine the one that is closest, but
SelectionDAG doesn't have a good way to do that. Maybe we need
to do this as a basic block transform in Machine IR.

llvm-svn: 373401

4 years ago[clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class type
Jordan Rupprecht [Tue, 1 Oct 2019 22:30:10 +0000 (22:30 +0000)]
[clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class type

llvm-svn: 373400

4 years ago[lldb] Fix unused variable warning
Jordan Rupprecht [Tue, 1 Oct 2019 22:04:14 +0000 (22:04 +0000)]
[lldb] Fix unused variable warning

llvm-svn: 373399

4 years agoCGVTables - silence static analyzer getAs<FunctionProtoType> null dereference warning...
Simon Pilgrim [Tue, 1 Oct 2019 22:02:46 +0000 (22:02 +0000)]
CGVTables - silence static analyzer getAs<FunctionProtoType> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us.

llvm-svn: 373398

4 years ago[X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immedia...
Craig Topper [Tue, 1 Oct 2019 21:55:55 +0000 (21:55 +0000)]
[X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immediate before calling getImm().

It might be a symbol instead. We can't fold those since we can't
negate them.

Similar for other SUB with immediates.

Fixes PR43529.

llvm-svn: 373397

4 years agoCGExprAgg - remove duplicate code. NFCI.
Simon Pilgrim [Tue, 1 Oct 2019 21:50:30 +0000 (21:50 +0000)]
CGExprAgg - remove duplicate code. NFCI.

Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning.

llvm-svn: 373396

4 years ago[FileCheck] Move private interface to its own header
Thomas Preud'homme [Tue, 1 Oct 2019 21:37:55 +0000 (21:37 +0000)]
[FileCheck] Move private interface to its own header

Summary:
Most of the class definition in llvm/include/llvm/Support/FileCheck.h
are actually implementation details that should not be relied upon. This
commit moves all of it in a new header file under
llvm/lib/Support/FileCheck. It also takes advantage of the code movement
to put the code into a new llvm::filecheck namespace.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

llvm-svn: 373395

4 years ago[BypassSlowDivision][CodeGenPrepare] avoid crashing on unused code (PR43514)
Sanjay Patel [Tue, 1 Oct 2019 21:25:36 +0000 (21:25 +0000)]
[BypassSlowDivision][CodeGenPrepare] avoid crashing on unused code (PR43514)

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

llvm-svn: 373394

4 years agogn build: Merge r373392
GN Sync Bot [Tue, 1 Oct 2019 21:23:33 +0000 (21:23 +0000)]
gn build: Merge r373392

llvm-svn: 373393

4 years ago[clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock
Stephane Moore [Tue, 1 Oct 2019 21:18:40 +0000 (21:18 +0000)]
[clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

Summary:
OSSpinLock* are Apple/Darwin functions, but were previously located with ObjC checks as those were most closely tied to Apple platforms before.

Now that there's a specific Darwin module, relocating the check there.

This change was prepared by running rename_check.py.

Contributed By: mwyman

Reviewers: stephanemoore, dmaclach

Reviewed By: stephanemoore

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

Tags: #clang-tools-extra, #clang, #llvm

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

llvm-svn: 373392

4 years ago[ASan][NFC] Address remaining comments for https://reviews.llvm.org/D68287
Leonard Chan [Tue, 1 Oct 2019 20:49:07 +0000 (20:49 +0000)]
[ASan][NFC] Address remaining comments for https://reviews.llvm.org/D68287

I submitted that patch after I got the LGTM, but the comments didn't
appear until after I submitted the change. This adds `const` to the
constructor argument and makes it a pointer.

llvm-svn: 373391

4 years ago[NFC] Fix typos in libc++ documentation
Louis Dionne [Tue, 1 Oct 2019 20:34:50 +0000 (20:34 +0000)]
[NFC] Fix typos in libc++ documentation

llvm-svn: 373390

4 years ago[ASan] Make GlobalsMD member a const reference.
Leonard Chan [Tue, 1 Oct 2019 20:30:46 +0000 (20:30 +0000)]
[ASan] Make GlobalsMD member a const reference.

PR42924 points out that copying the GlobalsMetadata type during
construction of AddressSanitizer can result in exteremely lengthened
build times for translation units that have many globals. This can be addressed
by just making the GlobalsMD member in AddressSanitizer a reference to
avoid the copy. The GlobalsMetadata type is already passed to the
constructor as a reference anyway.

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

llvm-svn: 373389

4 years ago[clang-format] [PR43372] - clang-format shows replacements in DOS files when no repla...
Paul Hoad [Tue, 1 Oct 2019 20:20:22 +0000 (20:20 +0000)]
[clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

Summary:
This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.cgi?id=43372) - clang-format can't format file with includes, ( which really keep providing replacements for already sorted headers.)

A similar issue was addressed by @krasimir in {D60199}, however, this seemingly only prevented the issue when the files being formatted did not contain windows line endings (\r\n)

It's possible this is related to https://twitter.com/StephanTLavavej/status/1176722938243895296 given who @STL_MSFT  works for!

As people often used the existence of replacements to determine if a file needs clang-formatting, this is probably pretty important for windows users

There may be a better way of comparing 2 strings and ignoring \r (which appear in both Results and Code), I couldn't choose between this idiom or the copy_if approach, but I'm happy to change it to whatever people consider more performant.

Reviewers: krasimir, klimek, owenpan, ioeric

Reviewed By: krasimir

Subscribers: cfe-commits, STL_MSFT, krasimir

Tags: #clang-format, #clang, #clang-tools-extra

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

llvm-svn: 373388

4 years ago[OPENMP50]Initial codegen for declare variant implementation vendor.
Alexey Bataev [Tue, 1 Oct 2019 20:18:32 +0000 (20:18 +0000)]
[OPENMP50]Initial codegen for declare variant implementation vendor.

Initial implementation of global aliases emission for the declare
variant pragma with implementation vendor context selector set.

llvm-svn: 373387

4 years ago[DDG] Data Dependence Graph - Root Node
Bardia Mahjour [Tue, 1 Oct 2019 19:32:42 +0000 (19:32 +0000)]
[DDG] Data Dependence Graph - Root Node

Summary:
This patch adds Root Node to the DDG. The purpose of the root node is to create a single entry node that allows graph walk iterators to iterate through all nodes of the graph, making sure that no node is left unvisited during a graph walk (eg. SCC or DFS). Once the DDG is fully constructed it will have exactly one root node. Every node in the graph is reachable from the root. The algorithm for connecting the root node is based on depth-first-search that keeps track of visited nodes to try to avoid creating unnecessary edges.

Authored By: bmahjour

Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

Reviewed By: Meinersbur

Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack

Tag: #llvm

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

llvm-svn: 373386

4 years ago[libc++] Re-apply workaround for D63883
Louis Dionne [Tue, 1 Oct 2019 19:27:38 +0000 (19:27 +0000)]
[libc++] Re-apply workaround for D63883

In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi
can't be specified on Linux, since libc++abi isn't shipped with the system.
Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail
unless we apply the workaround.

llvm-svn: 373385

4 years ago[libc++] Remove workaround for D63883
Louis Dionne [Tue, 1 Oct 2019 19:13:52 +0000 (19:13 +0000)]
[libc++] Remove workaround for D63883

I tried applying D63883 three times and could never get around to
making it work. I'm giving up on that for now, but soon this should
be irrelevant anyway since all builds will move to the monorepo
(where we're always using the in-tree libc++abi unless explicitly
specified otherwise).

llvm-svn: 373384

4 years ago[MemorySSA] Check for unreachable blocks when getting last definition.
Alina Sbirlea [Tue, 1 Oct 2019 19:09:50 +0000 (19:09 +0000)]
[MemorySSA] Check for unreachable blocks when getting last definition.

If a single predecessor is found, still check if the block is
unreachable. The test that found this had a self loop unreachable block.
Resolves PR43493.

llvm-svn: 373383

4 years agoAdd a missing pass in ARM O3 pipeline
Jakub Kuderski [Tue, 1 Oct 2019 18:53:54 +0000 (18:53 +0000)]
Add a missing pass in ARM O3 pipeline

llvm-svn: 373382

4 years ago[libc++abi] Remove uses of C++ headers when possible
Louis Dionne [Tue, 1 Oct 2019 18:43:02 +0000 (18:43 +0000)]
[libc++abi] Remove uses of C++ headers when possible

This reduces the (circular) dependency of libc++abi on a C++ standard
library. Outside of the demangler which uses fancier C++ features, the
only C++ headers now required by libc++abi are pretty much <new> and
<exception>, and that's because libc++abi defines some types that are
declared in those headers.

llvm-svn: 373381

4 years ago[MemorySSA] Update last_access_in_block check.
Alina Sbirlea [Tue, 1 Oct 2019 18:34:39 +0000 (18:34 +0000)]
[MemorySSA] Update last_access_in_block check.

The check for "was there an access in this block" should be: is the last
access in this block and is it not a newly inserted phi.
Resolves new test in PR43438.

Also fix a typo when simplifying trivial Phis to match the comment.

llvm-svn: 373380

4 years ago[NFC][libc++abi] Remove trailing whitespace from sources
Louis Dionne [Tue, 1 Oct 2019 18:28:20 +0000 (18:28 +0000)]
[NFC][libc++abi] Remove trailing whitespace from sources

llvm-svn: 373379

4 years ago[Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in MachineLICM
Jakub Kuderski [Tue, 1 Oct 2019 18:27:44 +0000 (18:27 +0000)]
[Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in MachineLICM

llvm-svn: 373378

4 years ago[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination
Jakub Kuderski [Tue, 1 Oct 2019 18:27:17 +0000 (18:27 +0000)]
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination

Summary:
PHIElimination modifies CFG and marks MachineDominatorTree as preserved. Therefore, it the CFG changes it should also update the MDT, when available. This patch teaches PHIElimination to recalculate MDT when necessary.

This fixes the `tailmerging_in_mbp.ll` test failure discovered after switching to generic DomTree verification algorithm in MachineDominators in D67976.

Reviewers: arsenm, hliao, alex-t, rampitec, vpykhtin, grosser

Reviewed By: rampitec

Subscribers: MatzeB, wdng, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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

llvm-svn: 373377

4 years agoReapply [Dominators][CodeGen] Clean up MachineDominators
Jakub Kuderski [Tue, 1 Oct 2019 18:27:14 +0000 (18:27 +0000)]
Reapply [Dominators][CodeGen] Clean up MachineDominators

This reverts r373117 (git commit 159ef37735f21ae373282e0c53cbd9b6af1e0dfd)

Phabricator review: https://reviews.llvm.org/D67976.

llvm-svn: 373376

4 years ago[NFC] Updated tests after rL373371
David Bolvansky [Tue, 1 Oct 2019 18:18:45 +0000 (18:18 +0000)]
[NFC] Updated tests after rL373371

Forgot to run check-clang-semacxx.

llvm-svn: 373375

4 years ago[OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.
Alexey Bataev [Tue, 1 Oct 2019 18:18:03 +0000 (18:18 +0000)]
[OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.

Fixed calculation the size of the array sections.

llvm-svn: 373374

4 years agoMake another attempt at fixing SymbolFilePDBTests.
Adrian Prantl [Tue, 1 Oct 2019 18:15:22 +0000 (18:15 +0000)]
Make another attempt at fixing SymbolFilePDBTests.

llvm-svn: 373373

4 years ago[libc++] Update link to Itanium C++ ABI documentation
Louis Dionne [Tue, 1 Oct 2019 18:14:27 +0000 (18:14 +0000)]
[libc++] Update link to Itanium C++ ABI documentation

llvm-svn: 373372

4 years ago[Diagnostics] Make -Wenum-compare-conditional off by default
David Bolvansky [Tue, 1 Oct 2019 18:12:13 +0000 (18:12 +0000)]
[Diagnostics] Make -Wenum-compare-conditional off by default

Too many false positives, eg. in Chromium.

llvm-svn: 373371

4 years ago[ThinLTO] Enable index-only WPD from clang
Teresa Johnson [Tue, 1 Oct 2019 18:08:29 +0000 (18:08 +0000)]
[ThinLTO] Enable index-only WPD from clang

Summary:
To trigger the index-only Whole Program Devirt support added to LLVM, we
need to be able to specify -fno-split-lto-unit in conjunction with
-fwhole-program-vtables. Keep the default for -fwhole-program-vtables as
-fsplit-lto-unit, but don't error on that option combination.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 373370

4 years ago[PGO] Fix typos from r359612. NFC.
Rong Xu [Tue, 1 Oct 2019 18:06:50 +0000 (18:06 +0000)]
[PGO] Fix typos from r359612. NFC.

llvm-svn: 373369

4 years ago[ARM] Some MVE shuffle plus extend tests. NFC
David Green [Tue, 1 Oct 2019 18:04:02 +0000 (18:04 +0000)]
[ARM] Some MVE shuffle plus extend tests. NFC

llvm-svn: 373368

4 years agoRevert "compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM"
Vitaly Buka [Tue, 1 Oct 2019 18:03:11 +0000 (18:03 +0000)]
Revert "compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM"
Revert "compiler-rt: move all __GLIBC_PREREQ into own header file"

"move all __GLIBC_PREREQ" breaks build on some bots

This reverts commit 2d75ee937397c209dbd95aefc88da6301fed07da.
This reverts commit 7a6461fcc2ed8e28c43993c561721af0bbe97f3a.

llvm-svn: 373367

4 years agoAMDGPU/SILoadStoreOptimizer: Add helper functions for working with CombineInfo
Tom Stellard [Tue, 1 Oct 2019 17:56:59 +0000 (17:56 +0000)]
AMDGPU/SILoadStoreOptimizer: Add helper functions for working with CombineInfo

Summary:
This is a refactoring that will make future improvements to this pass easier.
This change should not change the behavior of the pass.

Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

Reviewed By: nhaehnle, vpykhtin

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373366

4 years ago[libc++abi] Remove redundant #include of <string.h>
Louis Dionne [Tue, 1 Oct 2019 17:53:17 +0000 (17:53 +0000)]
[libc++abi] Remove redundant #include of <string.h>

<string.h> is always included, so we don't need the additional #include
only in the _WIN32 case.

llvm-svn: 373365

4 years ago[InstCombine] Deal with -(trunc(X >>u 63)) -> trunc(X >>s 63)
Roman Lebedev [Tue, 1 Oct 2019 17:50:20 +0000 (17:50 +0000)]
[InstCombine] Deal with -(trunc(X >>u 63)) -> trunc(X >>s 63)

Identical to it's trunc-less variant, just pretent-to hoist
trunc, and everything else still holds:
https://rise4fun.com/Alive/JRU

llvm-svn: 373364

4 years ago[InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) fold
Roman Lebedev [Tue, 1 Oct 2019 17:50:09 +0000 (17:50 +0000)]
[InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) fold

https://rise4fun.com/Alive/yR4

llvm-svn: 373363

4 years ago[NFC][InstCombine] (Better) tests for sign-bit-smearing pattern
Roman Lebedev [Tue, 1 Oct 2019 17:49:58 +0000 (17:49 +0000)]
[NFC][InstCombine] (Better) tests for sign-bit-smearing pattern

https://rise4fun.com/Alive/JRU
https://rise4fun.com/Alive/yR4 <- we can preserve 'exact'

llvm-svn: 373362

4 years ago[JSON] Use LLVM's library for argdumper
Jonas Devlieghere [Tue, 1 Oct 2019 17:41:55 +0000 (17:41 +0000)]
[JSON] Use LLVM's library for argdumper

This patch replaces the LLDB's JSON implementation with the one from
LLVM in argdumper.

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

llvm-svn: 373361

4 years ago[JSON] Use LLVM's library for decoding JSON in StructuredData
Jonas Devlieghere [Tue, 1 Oct 2019 17:41:52 +0000 (17:41 +0000)]
[JSON] Use LLVM's library for decoding JSON in StructuredData

This patch replaces the hand-rolled JSON decoding in StructuredData with
LLVM's JSON library.

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

llvm-svn: 373360

4 years ago[JSON] Use LLVM's library for encoding JSON in StructuredData
Jonas Devlieghere [Tue, 1 Oct 2019 17:41:48 +0000 (17:41 +0000)]
[JSON] Use LLVM's library for encoding JSON in StructuredData

This patch replaces the hand-rolled JSON emission in StructuredData with
LLVM's JSON library.

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

llvm-svn: 373359

4 years ago[llvm-mca] Add a -mattr flag
David Green [Tue, 1 Oct 2019 17:41:38 +0000 (17:41 +0000)]
[llvm-mca] Add a -mattr flag

This adds a -mattr flag to llvm-mca, for cases where the -mcpu option does not
contain all optional features.

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

llvm-svn: 373358

4 years agoAdd missing REQUIRES: arm.
Peter Collingbourne [Tue, 1 Oct 2019 17:35:56 +0000 (17:35 +0000)]
Add missing REQUIRES: arm.

llvm-svn: 373357

4 years ago[ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGET
Vedant Kumar [Tue, 1 Oct 2019 17:10:45 +0000 (17:10 +0000)]
[ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGET

llvm-svn: 373356

4 years agoFix a syntax error.
Adrian Prantl [Tue, 1 Oct 2019 17:10:25 +0000 (17:10 +0000)]
Fix a syntax error.

llvm-svn: 373355

4 years agoFix a condition-flip regression introduced in r373344.
Adrian Prantl [Tue, 1 Oct 2019 17:08:44 +0000 (17:08 +0000)]
Fix a condition-flip regression introduced in r373344.

llvm-svn: 373354

4 years agoTypo (NFC)
Adrian Prantl [Tue, 1 Oct 2019 17:08:41 +0000 (17:08 +0000)]
Typo (NFC)

llvm-svn: 373353

4 years agoSimplify condition (NFC)
Adrian Prantl [Tue, 1 Oct 2019 17:08:38 +0000 (17:08 +0000)]
Simplify condition (NFC)

llvm-svn: 373352

4 years ago[IndVars] An implementation of loop predication without a need for speculation
Philip Reames [Tue, 1 Oct 2019 17:03:44 +0000 (17:03 +0000)]
[IndVars] An implementation of loop predication without a need for speculation

This patch implements a variation of a well known techniques for JIT compilers - we have an implementation in tree as LoopPredication - but with an interesting twist. This version does not assume the ability to execute a path which wasn't taken in the original program (such as a guard or widenable.condition intrinsic). The benefit is that this works for arbitrary IR from any frontend (including C/C++/Fortran). The tradeoff is that it's restricted to read only loops without implicit exits.

This builds on SCEV, and can thus eliminate the loop varying portion of the any early exit where all exits are understandable by SCEV. A key advantage is that fixing deficiency exposed in SCEV - already found one while writing test cases - will also benefit all of full redundancy elimination (and most other loop transforms).

I haven't seen anything in the literature which quite matches this. Given that, I'm not entirely sure that keeping the name "loop predication" is helpful. Anyone have suggestions for a better name? This is analogous to partial redundancy elimination - since we remove the condition flowing around the backedge - and has some parallels to our existing transforms which try to make conditions invariant in loops.

Factoring wise, I chose to put this in IndVarSimplify since it's a generally applicable to all workloads. I could split this off into it's own pass, but we'd then probably want to add that new pass every place we use IndVars.  One solid argument for splitting it off into it's own pass is that this transform is "too good". It breaks a huge number of existing IndVars test cases as they tend to be simple read only loops.  At the moment, I've opted it off by default, but if we add this to IndVars and enable, we'll have to update around 20 test files to add side effects or disable this transform.

Near term plan is to fuzz this extensively while off by default, reflect and discuss on the factoring issue mentioned just above, and then enable by default.  I also need to give some though to supporting widenable conditions in this framing.

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

llvm-svn: 373351

4 years agoAMDGPU/GlobalISel: Increase max legal size to 1024
Matt Arsenault [Tue, 1 Oct 2019 16:35:06 +0000 (16:35 +0000)]
AMDGPU/GlobalISel: Increase max legal size to 1024

There are 1024 bit register classes defined for AGPRs. Additionally
OpenCL defines vectors up to 16 x i64, and this helps those tests
legalize.

llvm-svn: 373350

4 years ago[X86] Add a VBROADCAST_LOAD ISD opcode representing a scalar load broadcasted to...
Craig Topper [Tue, 1 Oct 2019 16:28:20 +0000 (16:28 +0000)]
[X86] Add a VBROADCAST_LOAD ISD opcode representing a scalar load broadcasted to a vector.

Summary:
This adds the ISD opcode and a DAG combine to create it. There are
probably some places where we can directly create it, but I'll
leave that for future work.

This updates all of the isel patterns to look for this new node.
I had to add a few additional isel patterns for aligned extloads
which we should probably fix with a DAG combine or something. This
does mean that the broadcast load folding for avx512 can no
longer match a broadcasted aligned extload.

There's still some work to do here for combining a broadcast of
a broadcast_load. We also need to improve extractelement or
demanded vector elements of a broadcast_load. I'll try to get
those done before I submit this patch.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 373349

4 years ago[OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangular
Alexey Bataev [Tue, 1 Oct 2019 16:19:10 +0000 (16:19 +0000)]
[OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangular
loop.

Missed check if the condition is also dependent when building final
expressions for the collapsed loop directives.

llvm-svn: 373348

4 years agoELF: Add .interp synthetic sections first in createSyntheticSections().
Peter Collingbourne [Tue, 1 Oct 2019 16:10:13 +0000 (16:10 +0000)]
ELF: Add .interp synthetic sections first in createSyntheticSections().

Our .interp section is not a SyntheticSection. As a result, it terminates the
loop in removeUnusedSyntheticSections(). This has at least two consequences:

- The synthetic .bss and .bss.rel.ro sections are always present in
  dynamically linked executables, even when they are not needed.
- The synthetic .ARM.exidx (and possibly other) sections are always present
  in partitions other than the last one, even when not needed.
  .ARM.exidx in particular is problematic because it assumes that its
  list of code sections is non-empty in getLinkOrderDep(), which can
  lead to a crash if the partition does not have any code sections.

Fix these problems by moving the creation of the .interp sections to the
top of createSyntheticSections(). While here, make the code a little less
error-prone by changing the add() lambdas to take a SyntheticSection instead
of an InputSectionBase.

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

llvm-svn: 373347

4 years ago[AMDGPU] Add VerifyScheduling support.
Jay Foad [Tue, 1 Oct 2019 15:45:47 +0000 (15:45 +0000)]
[AMDGPU] Add VerifyScheduling support.

Summary:
This is cut and pasted from the corresponding GenericScheduler
functions.

Reviewers: arsenm, atrick, tstellar, vpykhtin

Subscribers: MatzeB, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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

llvm-svn: 373346

4 years ago[Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)
David Bolvansky [Tue, 1 Oct 2019 15:44:38 +0000 (15:44 +0000)]
[Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)

llvm-svn: 373345

4 years agoRemove size_t return parameter from FindTypes
Adrian Prantl [Tue, 1 Oct 2019 15:40:41 +0000 (15:40 +0000)]
Remove size_t return parameter from FindTypes

In r368345 I accidentally introduced a regression that would
over-report the number of matches found by FindTypes if the
DeclContext Filter was hit.

This patch simply removes the size_t return parameter altogether —
it's not that useful.

rdar://problem/55500457

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

llvm-svn: 373344