platform/upstream/llvm.git
5 years ago[OpenMP] Remove OMP spec versioning
Jonathan Peyton [Fri, 12 Jul 2019 21:45:36 +0000 (21:45 +0000)]
[OpenMP] Remove OMP spec versioning

Remove all older OMP spec versioning from the runtime and build system.

Patch by Terry Wilmarth

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

llvm-svn: 365963

5 years agoRemove __VERSION__
Sylvestre Ledru [Fri, 12 Jul 2019 21:45:08 +0000 (21:45 +0000)]
Remove __VERSION__

Summary:
It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad
it is probably time to remove it

Reviewers: rnk, dexonsmith

Reviewed By: rnk

Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 365962

5 years ago[test][AArch64] Relax the opcode tests for FP min/max instructions.
Douglas Yung [Fri, 12 Jul 2019 21:39:45 +0000 (21:39 +0000)]
[test][AArch64] Relax the opcode tests for FP min/max instructions.

llvm-svn: 365961

5 years agoAdd option to disable variant narrowing conversion changes.
Eric Fiselier [Fri, 12 Jul 2019 21:32:11 +0000 (21:32 +0000)]
Add option to disable variant narrowing conversion changes.

The paper P0608R3 - "A sane variant converting constructor" disallows
narrowing conversions in variant. It was meant to address this
surprising problem:

  std::variant<std::string, bool> v = "abc";
  assert(v.index() == 1); // constructs a bool.

However, it also disables every potentially narrowing conversion. For
example:

  variant<unsigned> v = 0; // ill-formed
  variant<string, double> v2 = 42; // ill-formed (int -> double narrows)

These latter changes break code. A lot of code. Within Google it broke
on the order of a hundred thousand target with thousands of root causes
responsible for the breakages.

Of the breakages related to the narrowing restrictions, none of them
exposed outstanding bugs. However, the breakages caused by boolean
conversions (~13 root causes), all but one of them were bugs.

For this reasons, I am adding a flag to disable the narrowing conversion
changes but not the boolean conversions one.

One purpose of this flag is to allow users to opt-out of breaking changes
in variant until the offending code can be cleaned up. For non-trivial
variant usages the amount of cleanup may be significant.

This flag is also required to support automated tooling, such as
clang-tidy, that can automatically fix code broken by this change.
In order for clang-tidy to know the correct alternative to construct,
it must know what alternative was being constructed previously, which
means running it over the old version of std::variant.

Because this change breaks so much code, I will be implementing the
aforementioned clang-tidy check in the very near future.

Additionally I'm plan present this new information to the committee so they can
re-consider if this is a breaking change we want to make.

I think libc++ should very seriously consider pulling this change
before the 9.0 release branch is cut. But that's a separate discussion
that I will start on the lists.

For now this is the minimal first step.

llvm-svn: 365960

5 years ago[InstCombine] Disable fold from D64285 for non-integer types
David Bolvansky [Fri, 12 Jul 2019 21:14:21 +0000 (21:14 +0000)]
[InstCombine] Disable fold from D64285 for non-integer types

llvm-svn: 365959

5 years agoFactor out resolveFrameOffsetReference (NFC).
Evgeniy Stepanov [Fri, 12 Jul 2019 21:13:55 +0000 (21:13 +0000)]
Factor out resolveFrameOffsetReference (NFC).

Split AArch64FrameLowering::resolveFrameIndexReference in two parts
* Finding frame offset for the index.
* Finding base register and offset to that register.

The second part will be used to implement a virtual frame pointer in
armv8.5 MTE stack instrumentation lowering.

Reviewers: pcc, vitalybuka, hctim, ostannard

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

Tags: #llvm

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

llvm-svn: 365958

5 years ago[builtins] Fix assembly in arm sync-ops.h
Nikita Popov [Fri, 12 Jul 2019 20:52:02 +0000 (20:52 +0000)]
[builtins] Fix assembly in arm sync-ops.h

This assembly is part of a macro that was reformatted in D60351.
The missing space between push and { results in:

    Error: bad instruction `push{r4, r5,r6,lr}'

llvm-svn: 365957

5 years agoRevert driver: Don't warn about assembler flags being unused when not assembling
Reid Kleckner [Fri, 12 Jul 2019 20:44:57 +0000 (20:44 +0000)]
Revert driver: Don't warn about assembler flags being unused when not assembling

This reverts r365703 (git commit 101c1afdfd1c88f05da94c6fd317b489bb704f40)
and r365714.

This broke some autoconf-style assembler flags checks in the Linux
build:
https://github.com/ClangBuiltLinux/linux/issues/598

llvm-svn: 365956

5 years ago[clangd] Fix off-by-one in CodeComplete and assertion in Dex
Sam McCall [Fri, 12 Jul 2019 20:35:41 +0000 (20:35 +0000)]
[clangd] Fix off-by-one in CodeComplete and assertion in Dex

llvm-svn: 365955

5 years agoReland [clang] DirectoryWatcher
Jan Korous [Fri, 12 Jul 2019 20:34:10 +0000 (20:34 +0000)]
Reland [clang] DirectoryWatcher

This reverts commit f561227d133224d2d6a5a016abe4be051fa75501.

- DirectoryWatcher
- Fix the build for platforms that don't have DW implementated.
- Fix the threading dependencies (thanks to compnerd).

llvm-svn: 365954

5 years agoAMDGPU: Drop remnants of byval support for shaders
Matt Arsenault [Fri, 12 Jul 2019 20:12:17 +0000 (20:12 +0000)]
AMDGPU: Drop remnants of byval support for shaders

Before 2018, mesa used to use byval interchangably with inreg, which
didn't really make sense. Fix tests still using it to avoid breaking
in a future commit.

llvm-svn: 365953

5 years agoFix missing use of defined() in include guard
David Tenty [Fri, 12 Jul 2019 20:12:15 +0000 (20:12 +0000)]
Fix missing use of defined() in include guard

Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365952

5 years ago[LanguageRuntime] Move CPPLanguageRuntime into a plugin
Alex Langford [Fri, 12 Jul 2019 20:09:32 +0000 (20:09 +0000)]
[LanguageRuntime] Move CPPLanguageRuntime into a plugin

Summary: This seems better suited to be in a plugin.

Reviewers: JDevlieghere, clayborg, jingham, compnerd, labath

Subscribers: mgorny, lldb-commits

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

llvm-svn: 365951

5 years ago[ObjectContainerBSDArchive] Simplify a few things (NFC)
Jonas Devlieghere [Fri, 12 Jul 2019 20:08:41 +0000 (20:08 +0000)]
[ObjectContainerBSDArchive] Simplify a few things (NFC)

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

llvm-svn: 365950

5 years ago[SystemZ] Fix addcarry of addcarry of const carry (PR42606)
Nikita Popov [Fri, 12 Jul 2019 20:03:34 +0000 (20:03 +0000)]
[SystemZ] Fix addcarry of addcarry of const carry (PR42606)

This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
D64213. Instead of only checking if the carry comes from a matching
operation, we now check the full chain of carries. Otherwise we might
custom lower the outermost addcarry, but then generically legalize
an inner addcarry.

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

llvm-svn: 365949

5 years agoRevert "Reland [clang] DirectoryWatcher"
Jan Korous [Fri, 12 Jul 2019 19:54:36 +0000 (19:54 +0000)]
Revert "Reland [clang] DirectoryWatcher"

This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268.

llvm-svn: 365948

5 years agoReland [clang] DirectoryWatcher
Jan Korous [Fri, 12 Jul 2019 19:47:55 +0000 (19:47 +0000)]
Reland [clang] DirectoryWatcher

This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79.

+ Fix the build for platforms that don't have DW implementated.

llvm-svn: 365947

5 years ago[X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompa...
Craig Topper [Fri, 12 Jul 2019 19:26:35 +0000 (19:26 +0000)]
[X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI

llvm-svn: 365946

5 years ago[DebugInfo] Add column info for inline sites
Jonas Devlieghere [Fri, 12 Jul 2019 19:25:45 +0000 (19:25 +0000)]
[DebugInfo] Add column info for inline sites

The column field is missing for all inline sites, currently it's always
zero. This changes populates DW_AT_call_column field for inline sites.
Test case modified to cover this change.

Patch by: Wenlei He

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

llvm-svn: 365945

5 years ago[libcxxabi] Don't process exceptions in cxa_handlers when they're disabled
Petr Hosek [Fri, 12 Jul 2019 19:10:59 +0000 (19:10 +0000)]
[libcxxabi] Don't process exceptions in cxa_handlers when they're disabled

When exceptions are disabled, avoid their processing altogether.
This avoids pulling in the depenency on demangler significantly
reducing binary size when statically linking against libc++abi
built without exception support.

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

llvm-svn: 365944

5 years agoThe variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG...
Sterling Augustine [Fri, 12 Jul 2019 18:51:08 +0000 (18:51 +0000)]
The variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG" fail with unused variable messages.

Summary: Move the logic into the assert itself.

Subscribers: hiraditya, sanjoy, llvm-commits

Tags: #llvm

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

llvm-svn: 365943

5 years ago[SystemZ] Fix build bot failure after r365932
Ulrich Weigand [Fri, 12 Jul 2019 18:44:51 +0000 (18:44 +0000)]
[SystemZ] Fix build bot failure after r365932

Insert LLVM_FALLTHROUGH to avoid compiler warning.

llvm-svn: 365942

5 years ago[x86] add test for bogus cmov (PR40483); NFC
Sanjay Patel [Fri, 12 Jul 2019 18:38:29 +0000 (18:38 +0000)]
[x86] add test for bogus cmov (PR40483); NFC

llvm-svn: 365941

5 years ago[AMDGPU] Extend MIMG opcode to 8 bits
Stanislav Mekhanoshin [Fri, 12 Jul 2019 18:38:06 +0000 (18:38 +0000)]
[AMDGPU] Extend MIMG opcode to 8 bits

This is NFC, but required for future commit.

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

llvm-svn: 365940

5 years ago[Core] Generalize ValueObject::MaybeCalculateCompleteType
Alex Langford [Fri, 12 Jul 2019 18:34:37 +0000 (18:34 +0000)]
[Core] Generalize ValueObject::MaybeCalculateCompleteType

Summary:
Instead of hardcoding ClangASTContext and ObjCLanguageRuntime, we can
generalize this by creating the method GetRuntimeType in
LanguageRuntime and moving the current MaybeCalculateCompleteType
implementation into ObjCLanguageruntime::GetRuntimeType

Reviewers: jingham, clayborg, JDevlieghere

Subscribers: lldb-commits

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

llvm-svn: 365939

5 years agoAddition to rL365925, removing remaining virtuals
Stefan Stipanovic [Fri, 12 Jul 2019 18:34:06 +0000 (18:34 +0000)]
Addition to rL365925, removing remaining virtuals

llvm-svn: 365938

5 years ago[clang-doc] Add html links to references
Julie Hockett [Fri, 12 Jul 2019 18:32:00 +0000 (18:32 +0000)]
[clang-doc] Add html links to references

<a> tags are added for the parents and members of records and return type and
params of functions. The link redirects to the reference's info file.

The directory path where each info file will be saved is now generated in the
serialization phase and stored as an attribute in each Info.

Bitcode writer and reader were modified to handle the new attributes.

Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

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

llvm-svn: 365937

5 years agoSlightly simplify MappedBlockStream::createIndexedStream() calls
Nico Weber [Fri, 12 Jul 2019 18:24:38 +0000 (18:24 +0000)]
Slightly simplify MappedBlockStream::createIndexedStream() calls

All callers had a PDBFile object at hand, so call
Pdb.createIndexedStream() instead, which pre-populates all the arguments
(and returns nullptr for kInvalidStreamIndex).

Also change safelyCreateIndexedStream() to only take the string index,
and update callers. Make the method public and call it in two places
that manually did the bounds checking before.

No intended behavior change.

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

llvm-svn: 365936

5 years ago[WebAssembly] Make pthread imply bulk-memory, mutable-globals
Thomas Lively [Fri, 12 Jul 2019 18:23:13 +0000 (18:23 +0000)]
[WebAssembly] Make pthread imply bulk-memory, mutable-globals

Summary:
This paves the way for using passive segments in pthread builds, which
will make separate memory files unnecessary. Mutable globals are also
necessary for the upcoming implementation of TLS.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits

Tags: #clang

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

llvm-svn: 365935

5 years agoAdd explicit newline at end of `llvm-pdbutil dump`
Nico Weber [Fri, 12 Jul 2019 18:22:47 +0000 (18:22 +0000)]
Add explicit newline at end of `llvm-pdbutil dump`

All dump modes I checked didn't print a trailing newline, so add one.

llvm-svn: 365934

5 years ago[SystemZ] Add support for new cpu architecture - arch13
Ulrich Weigand [Fri, 12 Jul 2019 18:14:51 +0000 (18:14 +0000)]
[SystemZ] Add support for new cpu architecture - arch13

This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.

This includes:
- Basic support for the new processor and its features.
- Support for low-level builtins mapped to new LLVM intrinsics.
- New high-level intrinsics in vecintrin.h.
- Indicate support by defining  __VEC__ == 10303.

Note: No currently available Z system supports the arch13
architecture.  Once new systems become available, the
official system name will be added as supported -march name.

llvm-svn: 365933

5 years ago[SystemZ] Add support for new cpu architecture - arch13
Ulrich Weigand [Fri, 12 Jul 2019 18:13:16 +0000 (18:13 +0000)]
[SystemZ] Add support for new cpu architecture - arch13

This patch series adds support for the next-generation arch13
CPU architecture to the SystemZ backend.

This includes:
- Basic support for the new processor and its features.
- Assembler/disassembler support for new instructions.
- CodeGen for new instructions, including new LLVM intrinsics.
- Scheduler description for the new processor.
- Detection of arch13 as host processor.

Note: No currently available Z system supports the arch13
architecture.  Once new systems become available, the
official system name will be added as supported -march name.

llvm-svn: 365932

5 years agoRemove unused methods in Sancov.
Leonard Chan [Fri, 12 Jul 2019 18:09:09 +0000 (18:09 +0000)]
Remove unused methods in Sancov.

llvm-svn: 365931

5 years ago[WebAssembly] i32.const operands should be signed
Thomas Lively [Fri, 12 Jul 2019 17:55:07 +0000 (17:55 +0000)]
[WebAssembly] i32.const operands should be signed

Summary:
This was causing large addresses to be emitted as negative numbers,
which rightfully caused crashes in binaryen.

Reviewers: aheejin, dschuff

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

Tags: #llvm

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

llvm-svn: 365930

5 years ago[X86] Add NEG to isUseDefConvertible.
Craig Topper [Fri, 12 Jul 2019 17:52:17 +0000 (17:52 +0000)]
[X86] Add NEG to isUseDefConvertible.

We can use the C flag from NEG to detect that the input was zero.

Really we could probably use the Z flag too. But C matches what
we'd do for usubo 0, X.

Haven't found a test case for this due to the usubo formation
in CGP. But I verified if I comment out the CGP code this
transformation catches some of the same cases.

llvm-svn: 365929

5 years ago[X86][AVX] Add PR34359 shuffle test case.
Simon Pilgrim [Fri, 12 Jul 2019 17:42:32 +0000 (17:42 +0000)]
[X86][AVX] Add PR34359 shuffle test case.

llvm-svn: 365926

5 years ago[Attributor] Removing unnecessary `virtual` keywords.
Stefan Stipanovic [Fri, 12 Jul 2019 17:42:14 +0000 (17:42 +0000)]
[Attributor] Removing unnecessary `virtual` keywords.

Some function in the Attributor framework are unnecessarily
marked virtual. This patch removes virtual keyword

Reviewers: jdoerfert

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 365925

5 years ago[Attributor] Deduce "nofree" function attribute
Hideto Ueno [Fri, 12 Jul 2019 17:38:51 +0000 (17:38 +0000)]
[Attributor] Deduce "nofree" function attribute

Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365924

5 years ago[libc++] Add XFAILs for CTAD tests on older compilers
Louis Dionne [Fri, 12 Jul 2019 17:30:57 +0000 (17:30 +0000)]
[libc++] Add XFAILs for CTAD tests on older compilers

llvm-svn: 365923

5 years agoRevert [clang-shlib] Fix clang-shlib for PRIVATE dependencies
Shoaib Meenai [Fri, 12 Jul 2019 17:23:35 +0000 (17:23 +0000)]
Revert [clang-shlib] Fix clang-shlib for PRIVATE dependencies

This reverts r365825 (git commit 3173c60f96c3ccfc17d403a192ae58e720153c23)

This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it.

llvm-svn: 365922

5 years agoCodeGet: Init 32bit pointers with 0xFFFFFFFF
Vitaly Buka [Fri, 12 Jul 2019 17:21:55 +0000 (17:21 +0000)]
CodeGet: Init 32bit pointers with 0xFFFFFFFF

Summary:
Patch makes D63967 effective for 32bit platforms and improves pattern
initialization there. It cuts size of 32bit binary compiled with
-ftrivial-auto-var-init=pattern by 2% (3% with -Os).

Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
```
                   master           patch      diff
Os pattern   7.915580e+05    7.698424e+05 -0.028387
O3 pattern   9.953688e+05    9.752952e+05 -0.019325
```

Zero vs Pattern on master
```
               zero       pattern      diff
Os     7.689712e+05  7.915580e+05  0.031380
O3     9.744796e+05  9.953688e+05  0.021133
```

Zero vs Pattern with the patch
```
               zero       pattern      diff
Os     7.689712e+05  7.698424e+05  0.000789
O3     9.744796e+05  9.752952e+05  0.000742
```

Reviewers: pcc, eugenis, glider, jfb

Reviewed By: jfb

Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits

Tags: #clang

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

llvm-svn: 365921

5 years ago[IndVars] Use exit count reasoning to discharge obviously untaken exits
Philip Reames [Fri, 12 Jul 2019 17:05:35 +0000 (17:05 +0000)]
[IndVars] Use exit count reasoning to discharge obviously untaken exits

Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.

As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.

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

llvm-svn: 365920

5 years agoDump actual line numbers when dumping the AST to JSON.
Aaron Ballman [Fri, 12 Jul 2019 16:53:57 +0000 (16:53 +0000)]
Dump actual line numbers when dumping the AST to JSON.

The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately.

llvm-svn: 365919

5 years agoFix some minor coding-style issues in git-llvm.
James Y Knight [Fri, 12 Jul 2019 16:41:28 +0000 (16:41 +0000)]
Fix some minor coding-style issues in git-llvm.

llvm-svn: 365918

5 years agoAllow the 'git-llvm' tool to push to svn from the split repositories
James Y Knight [Fri, 12 Jul 2019 16:40:46 +0000 (16:40 +0000)]
Allow the 'git-llvm' tool to push to svn from the split repositories
for 'test-suite', 'lnt', 'zorg', and 'www'.

This is done by looking at the pathname of the git remote named
'origin', which is not 100% reliable, but should work in most cases.

llvm-svn: 365917

5 years ago[FunctionAttrs] Add a test for "nofree" function attribute
Hideto Ueno [Fri, 12 Jul 2019 16:29:14 +0000 (16:29 +0000)]
[FunctionAttrs] Add a test for "nofree" function attribute

This patch adds a test for nofree function attribute.

llvm-svn: 365916

5 years ago[Support] Move the static initializer install_out_memory_new_handler to InitLLVM
Fangrui Song [Fri, 12 Jul 2019 16:23:25 +0000 (16:23 +0000)]
[Support] Move the static initializer install_out_memory_new_handler to InitLLVM

An application linking against LLVMSupport should not get the gratuitous
set::std_new_handler call.

Reviewed By: jfb

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

llvm-svn: 365915

5 years agoAdd missing <atomic> include to appease MSVC builds.
Simon Pilgrim [Fri, 12 Jul 2019 16:16:23 +0000 (16:16 +0000)]
Add missing <atomic> include to appease MSVC builds.

llvm-svn: 365914

5 years agoMinor cleanup.
Artem Belevich [Fri, 12 Jul 2019 16:13:29 +0000 (16:13 +0000)]
Minor cleanup.

Simplify things a bit by removing unnecessary full type qualification.
This also happens to avoid a build break with now-unsupported
Visual Studio 2015.

Differential Review: https://reviews.llvm.org/D64588

llvm-svn: 365913

5 years agoTest commit
Hideto Ueno [Fri, 12 Jul 2019 16:08:32 +0000 (16:08 +0000)]
Test commit

llvm-svn: 365912

5 years agoSupport for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)
Jordan Rose [Fri, 12 Jul 2019 16:05:09 +0000 (16:05 +0000)]
Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)

Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
long-running jobs are doing, as inspired by BSD tools (including on
macOS), by dumping the current PrettyStackTrace.

This adds a new kind of signal handler for non-fatal "info" signals,
similar to the "interrupt" handler that already exists for SIGINT
(Ctrl-C). It then uses that handler to update a "generation count"
managed by the PrettyStackTrace infrastructure, which is then checked
whenever a PrettyStackTraceEntry is pushed or popped on each
thread. If the generation has changed---i.e. if the user has pressed
Ctrl-T---the stack trace is dumped, though unfortunately it can't
include the deepest entry because that one is currently being
constructed/destructed.

https://reviews.llvm.org/D63750

llvm-svn: 365911

5 years ago[AMDGPU] Fix DPP combiner check for exec modification
Jay Foad [Fri, 12 Jul 2019 15:59:40 +0000 (15:59 +0000)]
[AMDGPU] Fix DPP combiner check for exec modification

Summary:
r363675 changed the exec modification helper function, now called
execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
all instructions in the basic block, even beyond the last use. That
meant that the DPP combiner no longer worked in any basic block that
ended with a control flow instruction, and in particular it didn't work
on code sequences generated by the atomic optimizer.

Fix it by reinstating the old behaviour but in a new helper function
execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
scanned.

Reviewers: arsenm, vpykhtin

Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 365910

5 years ago[clang-format][tests] Explicitly specify style in some tests
Rafael Stahl [Fri, 12 Jul 2019 15:56:18 +0000 (15:56 +0000)]
[clang-format][tests] Explicitly specify style in some tests

Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.

Reviewers: djasper, klimek, MyDeveloperDay, krasimir

Reviewed By: MyDeveloperDay

Subscribers: lebedev.ri, cfe-commits

Tags: #clang

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

llvm-svn: 365909

5 years ago[lldb] Let table gen create command option initializers.
Raphael Isemann [Fri, 12 Jul 2019 15:30:55 +0000 (15:30 +0000)]
[lldb] Let table gen create command option initializers.

Summary:
We currently have man large arrays containing initializers for our command options.
These tables are tricky maintain as we don't have any good place to check them for consistency and
it's also hard to read (`nullptr, {}, 0` is not very descriptive).

This patch fixes this by letting table gen generate those tables. This way we can have a more readable
syntax for this (especially for all the default arguments) and we can let TableCheck check them
for consistency (e.g. an option with an optional argument can't have `eArgTypeNone`, naming of flags', etc.).

Also refactoring the related data structures can now be done without changing the hundred of option initializers.

For example, this line:
```
{LLDB_OPT_SET_ALL, false, "hide-aliases",         'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Hide aliases in the command list."},
```
becomes this:
```
  def hide_aliases : Option<"hide-aliases", "a">, Desc<"Hide aliases in the command list.">;
```

For now I just moved a few initializers to the new format to demonstrate the change. I'll slowly migrate the other
option initializers tables  in separate patches.

Reviewers: JDevlieghere, davide, sgraenitz

Reviewed By: JDevlieghere

Subscribers: jingham, xiaobai, labath, mgorny, abidh, lldb-commits

Tags: #lldb

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

llvm-svn: 365908

5 years ago[LegacyPassManager] Small ModuleCount cleanup
Fangrui Song [Fri, 12 Jul 2019 15:18:29 +0000 (15:18 +0000)]
[LegacyPassManager] Small ModuleCount cleanup

llvm-svn: 365907

5 years agoRevert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed...
Russell Gallop [Fri, 12 Jul 2019 15:15:56 +0000 (15:15 +0000)]
Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."

New test is failing on Windows bot

This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf.

llvm-svn: 365906

5 years agocmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON
Tom Stellard [Fri, 12 Jul 2019 15:11:28 +0000 (15:11 +0000)]
cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON

Summary:
If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
installed.

Fixes PR42575.

Reviewers: beanz, smeenai

Subscribers: mgorny, cfe-commits

Tags: #clang

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

Conflicts:
clang/tools/clang-shlib/CMakeLists.txt

llvm-svn: 365905

5 years ago[AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32
Jay Foad [Fri, 12 Jul 2019 15:02:59 +0000 (15:02 +0000)]
[AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32

Summary:
D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
make any sense to apply them to f16 operands; they would interpret the
bits of the value as an f32, giving nonsensical results. This patch
restricts them to f32 operands.

Reviewers: arsenm, hakzsam

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

Tags: #llvm

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

llvm-svn: 365904

5 years agoDelete dead stores
Fangrui Song [Fri, 12 Jul 2019 14:58:15 +0000 (14:58 +0000)]
Delete dead stores

llvm-svn: 365903

5 years agocmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Tom Stellard [Fri, 12 Jul 2019 14:40:18 +0000 (14:40 +0000)]
cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros

Summary:
This will simplify the macros by allowing us to remove the hard-coded
list of libraries that should be installed when
LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.

Reviewers: beanz, smeenai

Reviewed By: beanz

Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 365902

5 years agoDelete dead stores
Fangrui Song [Fri, 12 Jul 2019 14:04:34 +0000 (14:04 +0000)]
Delete dead stores

llvm-svn: 365901

5 years agoDump floating-point values as strings when dumping to JSON.
Aaron Ballman [Fri, 12 Jul 2019 13:57:41 +0000 (13:57 +0000)]
Dump floating-point values as strings when dumping to JSON.

This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model.

llvm-svn: 365900

5 years agoRevert "[clangd] Implement typeHierarchy/resolve for subtypes"
Russell Gallop [Fri, 12 Jul 2019 13:35:58 +0000 (13:35 +0000)]
Revert "[clangd] Implement typeHierarchy/resolve for subtypes"

Causing test failure on Windows bot

This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4.

llvm-svn: 365899

5 years ago[Driver] Delete dead code
Fangrui Song [Fri, 12 Jul 2019 13:21:58 +0000 (13:21 +0000)]
[Driver] Delete dead code

llvm-svn: 365898

5 years ago[gn] Tag unneeded variable.
Bryant Wong [Fri, 12 Jul 2019 13:09:39 +0000 (13:09 +0000)]
[gn] Tag unneeded variable.

When only building targets without assembly parsers (e.g. `llvm_targets_to_build
= ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
assigned-but-unused variable.

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

llvm-svn: 365897

5 years ago[DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.
Simon Pilgrim [Fri, 12 Jul 2019 13:00:35 +0000 (13:00 +0000)]
[DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.

First step towards supporting 'free' subvector extractions other than concat_vectors.

llvm-svn: 365896

5 years ago[LIT] Emit timeout error message only if timeout was reached
Alexey Bader [Fri, 12 Jul 2019 12:48:43 +0000 (12:48 +0000)]
[LIT] Emit timeout error message only if timeout was reached

Summary:
This improves readability of LIT output: previously
error messages gets emitted that say that there was no error:

error: command reached timeout: False

Patch by Alexey Sachkov.

Reviewers: ddunbar, mgorny, modocache

Reviewed By: mgorny

Subscribers: delcypher, llvm-commits

Tags: #llvm

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

llvm-svn: 365895

5 years ago[clangd] Fixed toHalfOpenFileRange
Shaurya Gupta [Fri, 12 Jul 2019 11:42:31 +0000 (11:42 +0000)]
[clangd] Fixed toHalfOpenFileRange

Summary:
- Fixed toHalfOpenFileRange to work for macros as well as template
instantiations
- Added unit tests

Breaking test case for older version of toHalfOpenFileRange:
\# define FOO(X) X++
int a = 1;
int b = FOO(a);
toHalfOpenFileRange for the sourceRange of VarDecl for b returned the
wrong Range.

Reviewers: sammccall, kadircet

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

Tags: #clang

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

llvm-svn: 365894

5 years ago[InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))
David Bolvansky [Fri, 12 Jul 2019 11:31:16 +0000 (11:31 +0000)]
[InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))

Summary:
(select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y))
(select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y))

Fixes PR41173

Alive proof by @lebedev.ri (thanks)
Name: PR41173
  %cmp = icmp slt i32 %x, 1
  %shr = lshr i32 %x, %y
  %shr1 = ashr i32 %x, %y
  %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr
  =>
  %retval.0 = ashr i32 %x, %y

Optimization: PR41173
Done: 1
Optimization is correct!

Reviewers: lebedev.ri, spatel

Reviewed By: lebedev.ri

Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri

Tags: #llvm

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

llvm-svn: 365893

5 years agoFix test case of llvm-nm using implicit a.out
Alex Brachet [Fri, 12 Jul 2019 10:44:06 +0000 (10:44 +0000)]
Fix test case of llvm-nm using implicit a.out

llvm-svn: 365892

5 years ago[test/Object, obj2yaml] - Move test cases from test/Object and cleanup.
George Rimar [Fri, 12 Jul 2019 10:29:29 +0000 (10:29 +0000)]
[test/Object, obj2yaml] - Move test cases from test/Object and cleanup.

test/Object is not correct place to have tests that check obj2yaml
functionality, because we have test/tools/obj2yaml folder for that.

In this patch I merged a few test cases with their YAMLs from Inputs
folder, converted one of binary inputs and moved them to
tools/obj2yaml folder.

There are still another tests that might need the same, so it is initial step.

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

llvm-svn: 365891

5 years ago[libomptarget] Fix typos and grammar in error messages, NFC.
Jonas Hahnfeld [Fri, 12 Jul 2019 10:21:55 +0000 (10:21 +0000)]
[libomptarget] Fix typos and grammar in error messages, NFC.

llvm-svn: 365890

5 years ago[tools] [llvm-nm] Default to reading from stdin not a.out
Alex Brachet [Fri, 12 Jul 2019 10:20:01 +0000 (10:20 +0000)]
[tools] [llvm-nm] Default to reading from stdin not a.out

Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]].

Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson

Reviewed By: jhenderson, MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 365889

5 years ago[clangd] Prioritize indexing of files that share a basename with the open file.
Sam McCall [Fri, 12 Jul 2019 10:18:42 +0000 (10:18 +0000)]
[clangd] Prioritize indexing of files that share a basename with the open file.

Summary:
In practice, opening Foo.h will still often result in Foo.cpp making the
second index build instead of the first, as the rebuild policy doesn't
know to wait.

Reviewers: kadircet

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 365888

5 years ago[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.
Sam McCall [Fri, 12 Jul 2019 10:11:40 +0000 (10:11 +0000)]
[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

Summary:
It's common to use compiler wrappers by setting CC="gomacc clang++".
This results in both args appearing in compile_commands.json, and clang's driver
can't handle this.

This patch attempts to recognize this pattern (by looking for well-known
wrappers) and dropping argv0 in this case.

It conservatively ignores other cases for now:
 - wrappers with unknown names
 - wrappers that accept -flags
 - wrappers where the compiler to use is implied (usually cc or gcc)

This is done at the JSONCompilationDatabase level rather than somewhere more
fundamental, as (hopefully) this isn't a general conceptual problem, but a messy
aspect of the nature of the ecosystem around compile_commands.json.
i.e. compilation databases more tightly tied to the build system should not have
this problem.

Reviewers: phosek, klimek

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 365887

5 years agoRevert "[DwarfDebug] Dump call site debug info"
Djordje Todorovic [Fri, 12 Jul 2019 09:45:12 +0000 (09:45 +0000)]
Revert "[DwarfDebug] Dump call site debug info"

A build failure was found on the SystemZ platform.

This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc.

llvm-svn: 365886

5 years ago[clangd] Move the expandAuto tweak from global namespace into annoymous namespace.
Haojian Wu [Fri, 12 Jul 2019 09:38:53 +0000 (09:38 +0000)]
[clangd] Move the expandAuto tweak from global namespace into annoymous namespace.

llvm-svn: 365885

5 years ago[Object/ELF] - Improve error reporting for notes.
George Rimar [Fri, 12 Jul 2019 09:29:12 +0000 (09:29 +0000)]
[Object/ELF] - Improve error reporting for notes.

This patch improves the error messages reported for
note sections and phdrs and also makes a cleanup for
existent test case.

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

llvm-svn: 365884

5 years ago[NFC][PowerPC] Added test for MachinePRE.
Kai Luo [Fri, 12 Jul 2019 09:10:35 +0000 (09:10 +0000)]
[NFC][PowerPC] Added test for MachinePRE.

llvm-svn: 365883

5 years ago[clangd] Don't run the prepare for tweaks that are disabled.
Haojian Wu [Fri, 12 Jul 2019 08:50:20 +0000 (08:50 +0000)]
[clangd] Don't run the prepare for tweaks that are disabled.

Summary: Previously, we ran the prepare, even for the tweaks that are disabled.

Reviewers: sammccall

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

Tags: #clang

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

llvm-svn: 365882

5 years ago[RISCV] Allow parsing dot '.' in assembly
Sam Elliott [Fri, 12 Jul 2019 08:36:07 +0000 (08:36 +0000)]
[RISCV] Allow parsing dot '.' in assembly

Summary:
Useful for jumps, such as `j .`.

I am not sure who should review this. Do not hesitate to change the reviewers if needed.

Reviewers: asb, jrtc27, lenary

Reviewed By: lenary

Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

Tags: #llvm

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

Patch by John LLVM (JohnLLVM)

llvm-svn: 365881

5 years agoEnable compiler-rt on SPARC
Rainer Orth [Fri, 12 Jul 2019 08:30:17 +0000 (08:30 +0000)]
Enable compiler-rt on SPARC

This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward:

- Add 32 and 64-bit sparc to compiler-rt

- lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc)

There's one issue of note: many asan tests fail to compile on Solaris/SPARC:

fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.

Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The
goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc,
which doesn't have the problem above and works just fine.

With this patch, sparcv9-sun-solaris2.11 test results are pretty good:

Failing Tests (9):
    Builtins-sparc-sunos :: divtc3_test.c
    Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
    Builtins-sparcv9-sunos :: divtc3_test.c
[...]
    UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp
    UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp

The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal
patches either currently in review or about to be submitted.

Tested on sparcv9-sun-solaris2.11.

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

llvm-svn: 365880

5 years ago[Sanitizers] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/MemoryMappingLayout.DumpL...
Rainer Orth [Fri, 12 Jul 2019 08:27:50 +0000 (08:27 +0000)]
[Sanitizers] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/MemoryMappingLayout.DumpListOfModules on Solaris

The MemoryMappingLayout.DumpListOfModules currently FAILs on Solaris:

  [ RUN      ] MemoryMappingLayout.DumpListOfModules
  /vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc:52: Failure
  Value of: found
    Actual: false
  Expected: true
  [  FAILED  ] MemoryMappingLayout.DumpListOfModules (22 ms)

The problem is that the test expects the executable name from modules[i].full_name(),
however the pr_mapname field of struct prmap is just the entry in /proc/<pid>/object,
which is "a.out" instead of "Sanitizer-i386-Test".  Fortunately, the real name can
be determined by looking in proc/<pid>/path where "a.out" is a symlink to the
real path.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 365879

5 years agoTest commit. NFC.
Bryant Wong [Fri, 12 Jul 2019 08:25:59 +0000 (08:25 +0000)]
Test commit. NFC.

Formatting fix.

llvm-svn: 365878

5 years ago[Driver] Delete --no-add-needed for RHEL7 or newer
Fangrui Song [Fri, 12 Jul 2019 06:46:47 +0000 (06:46 +0000)]
[Driver] Delete --no-add-needed for RHEL7 or newer

This is really not needed. gcc driver doesn't add this option.
BTW, since binutils 2.22, --no-copy-dt-needed-entries (new name of
--no-add-needed) is the default.

llvm-svn: 365877

5 years ago[YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots
Fangrui Song [Fri, 12 Jul 2019 06:23:24 +0000 (06:23 +0000)]
[YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots

llvm-svn: 365876

5 years agoFix odd variable names.
Rui Ueyama [Fri, 12 Jul 2019 06:12:27 +0000 (06:12 +0000)]
Fix odd variable names.

llvm-svn: 365875

5 years ago[test] Delete trailing spaces from YAML tests after D65566/r365869
Fangrui Song [Fri, 12 Jul 2019 06:01:37 +0000 (06:01 +0000)]
[test] Delete trailing spaces from YAML tests after D65566/r365869

llvm-svn: 365874

5 years ago[test] Delete trailing spaces from YAML tests
Fangrui Song [Fri, 12 Jul 2019 05:59:28 +0000 (05:59 +0000)]
[test] Delete trailing spaces from YAML tests

llvm-svn: 365873

5 years agotest/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that should alway...
Fangrui Song [Fri, 12 Jul 2019 05:51:36 +0000 (05:51 +0000)]
test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that should always be available

Follow-up of D64317/r365587.

llvm-svn: 365872

5 years ago[AMDGPU] Fixed comment. NFC.
Stanislav Mekhanoshin [Fri, 12 Jul 2019 05:13:10 +0000 (05:13 +0000)]
[AMDGPU] Fixed comment. NFC.

llvm-svn: 365871

5 years ago[mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6
Simon Atanasyan [Fri, 12 Jul 2019 04:58:45 +0000 (04:58 +0000)]
[mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6

There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink
tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly
selects the `JALRC16` compact 2-byte instruction which takes a target
instruction address from a register only and assign `R_MIPS_32` relocation
for this instruction. This relocation completely overwrites `JALRC16`
and nearby instructions.

This patch adds missed matching patterns, selects `BALC` instruction and
assign a correct `R_MICROMIPS_PC26_S1` relocation.

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

llvm-svn: 365870

5 years ago[YAMLIO] Remove trailing spaces when outputting maps
Fangrui Song [Fri, 12 Jul 2019 04:51:31 +0000 (04:51 +0000)]
[YAMLIO] Remove trailing spaces when outputting maps

llvm::yaml::Output::paddedKey unconditionally outputs spaces, which
are superfluous if the value to be dumped is a sequence or map.
Change `bool NeedsNewLine` to `StringRef Padding` so that it can be
overridden to `\n` if the value is a sequence or map.

An empty map/sequence is special. It is printed as `{}` or `[]` without
a newline, while a non-empty map/sequence follows a newline. To handle
this distinction, add another variable `PaddingBeforeContainer` and does
the special handling in endMapping/endSequence.

Reviewed By: grimar, jhenderson

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

llvm-svn: 365869

5 years ago[windows] re-call signal in sigint_handler for Windows
Nathan Lanza [Fri, 12 Jul 2019 04:43:46 +0000 (04:43 +0000)]
[windows] re-call signal in sigint_handler for Windows

Summary:
Windows requires re-setting the signal handler each time it is used
and thus ctrl-c was not behaving properly on Windows

Reviewers: jfb

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

llvm-svn: 365868

5 years ago[clangd] Implement typeHierarchy/resolve for subtypes
Nathan Ridge [Fri, 12 Jul 2019 03:26:32 +0000 (03:26 +0000)]
[clangd] Implement typeHierarchy/resolve for subtypes

Summary:
This allows the client to resolve subtypes one level at a time.

For supertypes, this is not necessary, because we eagerly compute
supertypes and return all levels.

Reviewers: sammccall

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

Tags: #clang

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

llvm-svn: 365867

5 years ago[X86][PowerPC] Support -mlong-double-128
Fangrui Song [Fri, 12 Jul 2019 02:32:15 +0000 (02:32 +0000)]
[X86][PowerPC] Support -mlong-double-128

This patch makes the driver option -mlong-double-128 available for X86
and PowerPC. The CC1 option -mlong-double-128 is available on all targets
for users to test on unsupported targets.

On PowerPC, -mlong-double-128 uses the IBM extended double format
because we don't support -mabi=ieeelongdouble yet (D64283).

Reviewed By: rnk

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

llvm-svn: 365866

5 years agodocs/GithubMove.rst: Add link to GitHub migration status page
Tom Stellard [Fri, 12 Jul 2019 02:31:50 +0000 (02:31 +0000)]
docs/GithubMove.rst: Add link to GitHub migration status page

llvm-svn: 365865

5 years agoReturn Undef from isBytewiseValue for empty arrays or structs
Vitaly Buka [Fri, 12 Jul 2019 02:23:07 +0000 (02:23 +0000)]
Return Undef from isBytewiseValue for empty arrays or structs

Reviewers: pcc, eugenis

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 365864

5 years agoNFC: Unforget a colon in a few CHECK: directives.
Artem Dergachev [Fri, 12 Jul 2019 02:16:56 +0000 (02:16 +0000)]
NFC: Unforget a colon in a few CHECK: directives.

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

llvm-svn: 365863

5 years ago[PowerPC] Default to -fomit-frame-pointer when optimization is enabled
Fangrui Song [Fri, 12 Jul 2019 02:14:08 +0000 (02:14 +0000)]
[PowerPC] Default to -fomit-frame-pointer when optimization is enabled

NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC.
Make it do so for other platforms.

llvm-svn: 365862