platform/upstream/llvm.git
5 years ago[lldb] Make TestDeletedExecutable more reliable
Raphael Isemann [Thu, 11 Jul 2019 19:27:33 +0000 (19:27 +0000)]
[lldb] Make TestDeletedExecutable more reliable

Summary:
It seems that calling Popen can return to the caller before the started process has read all the needed information
from its executable. This means that in case we delete the executable while the process is still starting up,
this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently.

This patch fixes this by letting the test synchronize with the inferior after it has started up.

Reviewers: davide

Reviewed By: davide

Subscribers: labath, friss, lldb-commits

Tags: #lldb

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

llvm-svn: 365813

5 years ago[lldb] Don't use __FUNCTION__ as a file name
Raphael Isemann [Thu, 11 Jul 2019 19:26:55 +0000 (19:26 +0000)]
[lldb] Don't use __FUNCTION__ as a file name

Summary:
I saw while debugging that we call this file `ParseInternal`, which is not a very good name for our
fake expression file and also adds this unnecessary link between the way we name this function
and the other source location names we get from the expression parser. This patch is renaming
it to `<lldb-expr>` which is closer to the way Clang names its buffers, it doesn't depend on the
function name (which changes when I refactor this code) and it's easier to grep for.

Reviewers: davide

Reviewed By: davide

Subscribers: abidh, lldb-commits

Tags: #lldb

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

llvm-svn: 365812

5 years ago[NVPTX] Remove now unused atomic.load.add.f32 intrinsics
Benjamin Kramer [Thu, 11 Jul 2019 19:21:59 +0000 (19:21 +0000)]
[NVPTX] Remove now unused atomic.load.add.f32 intrinsics

llvm-svn: 365811

5 years ago[PowerPC][NFC] Update testcase to avoid dead code
Jinsong Ji [Thu, 11 Jul 2019 19:16:33 +0000 (19:16 +0000)]
[PowerPC][NFC] Update testcase to avoid dead code

The original testcase might be optimized out due to dead code,
update the testcase to avoid it.

llvm-svn: 365810

5 years ago[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC
Vedant Kumar [Thu, 11 Jul 2019 19:11:46 +0000 (19:11 +0000)]
[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC

Replace a `llvm::Function *` parameter with a bool, which seems harder
to set to the wrong value by accident.

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

llvm-svn: 365809

5 years ago[Driver] -noprofilelib flag
Petr Hosek [Thu, 11 Jul 2019 19:06:38 +0000 (19:06 +0000)]
[Driver] -noprofilelib flag

This flag is analoguous to other flags like -nostdlib or -nolibc
and could be used to disable linking of profile runtime library.
This is useful in certain environments like kernel, where profile
instrumentation is still desirable, but we cannot use the standard
runtime library.

llvm-svn: 365808

5 years ago[lld-link] implement -thinlto-{prefix,object-suffix}-replace
Bob Haarman [Thu, 11 Jul 2019 18:48:58 +0000 (18:48 +0000)]
[lld-link] implement -thinlto-{prefix,object-suffix}-replace

Summary:
Adds the following two options to lld-link:

-thinlto-prefix-replace: allows replacing a prefix in paths generated
for ThinLTO. This can be used to ensure index files and native object
files are stored in unique directories, allowing multiple distributed
ThinLTO links to proceed concurrently.

-thinlto-object-suffix-replace: allows replacing a suffix in object
file paths involved in ThinLTO. This allows minimized index files to
be used for the thin link while storing the paths to the full bitcode
files for subsequent steps (code generation and final linking).

Reviewers: ruiu, tejohnson, pcc, rnk

Subscribers: mehdi_amini, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 365807

5 years ago[TSan] Move DECLARE_REAL macro outside of namespace
Julian Lettner [Thu, 11 Jul 2019 18:26:33 +0000 (18:26 +0000)]
[TSan] Move DECLARE_REAL macro outside of namespace

This should fix the "undefined reference to
tsan::interception::real_setjmp" linker errors.

llvm-svn: 365806

5 years ago[profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARC
Rainer Orth [Thu, 11 Jul 2019 18:26:24 +0000 (18:26 +0000)]
[profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARC

While working on https://reviews.llvm.org/D40900 (which effectively is about enabling compiler-rt on sparc these days), I came across two failing profile testcases:

  Profile-sparc :: instrprof-merge-match.test
  Profile-sparc :: instrprof-merge.c
  Profile-sparcv9 :: instrprof-merge-match.test
  Profile-sparcv9 :: instrprof-merge.c

All of them crashed with a SIGBUS in __llvm_profile_merge_from_buffer:

  Thread 2 received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 1 (LWP 1)]
  0x00012368 in __llvm_profile_merge_from_buffer (
      ProfileData=0x2384c <main.Buffer> "\377lprofR\201", ProfileSize=360)
      at /vol/llvm/src/llvm/local/projects/compiler-rt/lib/profile/InstrProfilingMerge.c:95
  95        SrcDataEnd = SrcDataStart + Header->DataSize;

where Header is insufficiently aligned for a strict-alignment target like SPARC.

Fixed by forcing the alignment to uint64_t, the members of struct __llvm_profile_header,
in the callers.

Tested on sparcv9-sun-solaris2.11.

https://reviews.llvm.org/D64498

llvm-svn: 365805

5 years ago[clangd][NFC] Decrease template depth limit in RecursiveHierarchyUnbounded test
Jan Korous [Thu, 11 Jul 2019 18:21:21 +0000 (18:21 +0000)]
[clangd][NFC] Decrease template depth limit in RecursiveHierarchyUnbounded test

...to minimize the chance of stack overflow before reaching the limit.

llvm-svn: 365804

5 years ago[X86] Pre commit test cases for D64574. Along with a test case for PR42571. NFC
Craig Topper [Thu, 11 Jul 2019 18:19:27 +0000 (18:19 +0000)]
[X86] Pre commit test cases for D64574. Along with a test case for PR42571. NFC

llvm-svn: 365803

5 years ago[WebAssembly] Assembler: support negative float constants.
Wouter van Oortmerssen [Thu, 11 Jul 2019 18:18:07 +0000 (18:18 +0000)]
[WebAssembly] Assembler: support negative float constants.

Reviewers: dschuff

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

Tags: #llvm

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

llvm-svn: 365802

5 years agoExplicitly define __STDC_FORMAT_MACROS for PRIu64
Mitch Phillips [Thu, 11 Jul 2019 18:07:03 +0000 (18:07 +0000)]
Explicitly define __STDC_FORMAT_MACROS for PRIu64

Summary:
Builds are failing on RHEL machines because of PRIu64.

lvm/projects/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:420:50: error: expected ')'

`snprintf(ThreadBuffer, kThreadBufferLen, "%" PRIu64, ThreadID);`
inttypes.h in RHEL uses PRIu64 macros only when __STDC_FORMAT_MACROS is defined.

Author: DTharun

Reviewers: hctim

Reviewed By: hctim

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

llvm-svn: 365801

5 years ago[lld-link] implement -thinlto-index-only
Bob Haarman [Thu, 11 Jul 2019 18:03:14 +0000 (18:03 +0000)]
[lld-link] implement -thinlto-index-only

Summary:
This implements -thinlto-index-only, -thinlto-index-only:,
and -thinlto-emit-imports-files options in lld-link. They are
analogous to their counterparts in ld.lld: -thinlto-index-only
causes us to perform ThinLTO's thin link and write index files,
but not perform code generation. -thinlto-index-only: does the
same, but also writes a text file listing the native object
files expected to be generated. -thinlto-emit-imports-files
creates a text file next to each index file, listing the files
to import from.

Reviewers: ruiu, tejohnson, pcc, rnk

Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 365800

5 years ago[HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
Yaxun Liu [Thu, 11 Jul 2019 17:50:09 +0000 (17:50 +0000)]
[HIP] Add GPU arch gfx1010, gfx1011, and gfx1012

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

llvm-svn: 365799

5 years ago[CodeGen] NVPTX: Switch from atomic.load.add.f32 to atomicrmw fadd
Benjamin Kramer [Thu, 11 Jul 2019 17:44:11 +0000 (17:44 +0000)]
[CodeGen] NVPTX: Switch from atomic.load.add.f32 to atomicrmw fadd

llvm-svn: 365798

5 years ago[Docs] Add standardized header links to analyzer doc
Nathan Huckleberry [Thu, 11 Jul 2019 17:12:05 +0000 (17:12 +0000)]
[Docs] Add standardized header links to analyzer doc

Summary:
Header links should have some standard form so clang tidy
docs can easily reference them. The form is as follows.

Start with the analyzer full name including packages.
Replace all periods with dashes and lowercase everything.

Ex: core.CallAndMessage -> core-callandmessage

Reviewers: JonasToth, aaron.ballman, NoQ, Szelethus

Reviewed By: aaron.ballman, Szelethus

Subscribers: nickdesaulniers, lebedev.ri, baloghadamsoftware, mgrang, a.sidorin, Szelethus, jfb, donat.nagy, dkrupp, cfe-commits

Tags: #clang

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

llvm-svn: 365797

5 years ago[NVPTX] Use atomicrmw fadd instead of intrinsics
Benjamin Kramer [Thu, 11 Jul 2019 17:11:25 +0000 (17:11 +0000)]
[NVPTX] Use atomicrmw fadd instead of intrinsics

AutoUpgrade the old intrinsics to atomicrmw fadd.

llvm-svn: 365796

5 years agogn build: Merge r365792
Nico Weber [Thu, 11 Jul 2019 17:09:35 +0000 (17:09 +0000)]
gn build: Merge r365792

llvm-svn: 365795

5 years ago[clangd] Avoid template in Task constructor, hopefully fix MSVC build
Sam McCall [Thu, 11 Jul 2019 16:26:53 +0000 (16:26 +0000)]
[clangd] Avoid template in Task constructor, hopefully fix MSVC build

llvm-svn: 365794

5 years ago[clangd] Consume llvm::Error in test after r365792
Sam McCall [Thu, 11 Jul 2019 16:22:50 +0000 (16:22 +0000)]
[clangd] Consume llvm::Error in test after r365792

llvm-svn: 365793

5 years ago[clangd] Implementation of auto type expansion.
Sam McCall [Thu, 11 Jul 2019 16:04:18 +0000 (16:04 +0000)]
[clangd] Implementation of auto type expansion.

Add a tweak for clangd to replace an auto keyword to the deduced type.

This way a user can declare something with auto and then have the
IDE/clangd replace auto with whatever type clangd thinks it is. In case
of long/complext types this makes is reduces writing effort for the
user.

The functionality is similar to the hover over the auto keyword.

Example (from the header):

```
/// Before:
///    auto x = Something();
///    ^^^^
/// After:
///    MyClass x = Something();
///    ^^^^^^^
```

Patch by kuhnel! (Christian Kühnel)
Differential Revision: https://reviews.llvm.org/D62855

llvm-svn: 365792

5 years ago[X86] Merge negated ISD::SUB nodes into X86ISD::SUB equivalent (PR40483)
Sanjay Patel [Thu, 11 Jul 2019 15:56:33 +0000 (15:56 +0000)]
[X86] Merge negated ISD::SUB nodes into X86ISD::SUB equivalent (PR40483)

Follow up to D58597, where it was noted that the commuted ISD::SUB variant
was having problems with lack of combines.

See also D63958 where we untangled setcc/sub pairs.

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

llvm-svn: 365791

5 years ago[scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one
Kostya Kortchinsky [Thu, 11 Jul 2019 15:32:26 +0000 (15:32 +0000)]
[scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one

Summary:
We ran into a problem on Fuchsia where yielding threads would never
be deboosted, ultimately resulting in several threads spinning on the
same TSD, and no possibility for another thread to be scheduled,
dead-locking the process.

While this was fixed in Zircon, this lead to discussions about if
spinning without a break condition was a good decision, and settled on
a new hybrid model that would spin for a while then block.

Currently we are using a number of iterations for spinning that is
mostly arbitrary (based on sanitizer_common values), but this can
be tuned in the future.

Since we are touching `common.h`, we also use this change as a vehicle
for an Android optimization (the page size is fixed in Bionic, so use
a fixed value too).

Reviewers: morehouse, hctim, eugenis, dvyukov, vitalybuka

Reviewed By: hctim

Subscribers: srhines, delcypher, jfb, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 365790

5 years agoFix a few 'no newline at end of file' warnings that Xcode emits
Nico Weber [Thu, 11 Jul 2019 15:26:45 +0000 (15:26 +0000)]
Fix a few 'no newline at end of file' warnings that Xcode emits

(Xcode even has a snazzy "Fix" button, but clicking that inserts two
newlines. So close!)

llvm-svn: 365789

5 years ago[libc++] Implement deduction guides for <unordered_set>
Louis Dionne [Thu, 11 Jul 2019 15:16:39 +0000 (15:16 +0000)]
[libc++] Implement deduction guides for <unordered_set>

Thanks to Arthur O'Dwyer for the patch.
Differential Revision: https://reviews.llvm.org/D58617

llvm-svn: 365788

5 years agogn build: Merge r365773
Nico Weber [Thu, 11 Jul 2019 15:01:50 +0000 (15:01 +0000)]
gn build: Merge r365773

llvm-svn: 365787

5 years ago[OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.
Alexey Bataev [Thu, 11 Jul 2019 14:54:17 +0000 (14:54 +0000)]
[OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.

Summary:
Some OpenMP clauses rely on the values of the variables. If the variable
is not initialized and used in OpenMP clauses that depend on the
variables values, it should be reported that the uninitialized variable
is used in the OpenMP clause expression.
This patch adds initial processing for uninitialized variables in OpenMP
constructs. Currently, it checks for use of the uninitialized variables
in the structured blocks.

Reviewers: NoQ, Szelethus, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet

Subscribers: rnkovacs, guansong, jfb, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 365786

5 years ago[DAGCombine] narrowInsertExtractVectorBinOp - add CONCAT_VECTORS support
Simon Pilgrim [Thu, 11 Jul 2019 14:45:03 +0000 (14:45 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - add CONCAT_VECTORS support

We already split extract_subvector(binop(insert_subvector(v,x),insert_subvector(w,y))) -> binop(x,y).

This patch adds support for extract_subvector(binop(concat_vectors(),concat_vectors())) cases as well.

In particular this means we don't have to wait for X86 lowering to convert concat_vectors to insert_subvector chains, which helps avoid some cases where demandedelts/combine calls occur too late to split large vector ops.

The fast-isel-store.ll load folding regression is annoying but I don't think is that critical.

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

llvm-svn: 365785

5 years agoRegUsageInfoCollector: Skip calling conventions I missed before
Matt Arsenault [Thu, 11 Jul 2019 14:41:40 +0000 (14:41 +0000)]
RegUsageInfoCollector: Skip calling conventions I missed before

llvm-svn: 365784

5 years agoAMDGPU/GlobalISel: Move kernel argument handling to separate function
Matt Arsenault [Thu, 11 Jul 2019 14:18:25 +0000 (14:18 +0000)]
AMDGPU/GlobalISel: Move kernel argument handling to separate function

llvm-svn: 365782

5 years agoFix missing C++ mode comment
Matt Arsenault [Thu, 11 Jul 2019 14:18:22 +0000 (14:18 +0000)]
Fix missing C++ mode comment

llvm-svn: 365781

5 years agoGlobalISel: Use Register
Matt Arsenault [Thu, 11 Jul 2019 14:18:19 +0000 (14:18 +0000)]
GlobalISel: Use Register

llvm-svn: 365780

5 years agoRevert r365775 - "[Object/ELF] - Improve error reporting for notes."
George Rimar [Thu, 11 Jul 2019 14:03:27 +0000 (14:03 +0000)]
Revert r365775 - "[Object/ELF] - Improve error reporting for notes."

It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419

llvm-svn: 365779

5 years ago[clangd] Remove an extra ";", NFC
Haojian Wu [Thu, 11 Jul 2019 13:58:56 +0000 (13:58 +0000)]
[clangd] Remove an extra ";", NFC

llvm-svn: 365778

5 years agoAdded mapping for pointers captured in Lambdas in OpenMP target regions,
Alexey Bataev [Thu, 11 Jul 2019 13:54:26 +0000 (13:54 +0000)]
Added mapping for pointers captured in Lambdas in OpenMP target regions,
by David Truby.

Summary:
This adds a zero length array section mapping for each pointer captured by a lambda that is used in a target region, as per section 2.19.7.1 of the OpenMP 5 specification.

Reviewers: ABataev

Reviewed By: ABataev

Subscribers: guansong, jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 365777

5 years ago[clangd][QueryDriver] Use language from underlying database if possible
Kadir Cetinkaya [Thu, 11 Jul 2019 13:47:46 +0000 (13:47 +0000)]
[clangd][QueryDriver] Use language from underlying database if possible

Reviewers: sammccall

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

Tags: #clang

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

llvm-svn: 365776

5 years ago[Object/ELF] - Improve error reporting for notes.
George Rimar [Thu, 11 Jul 2019 13:47:44 +0000 (13:47 +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: 365775

5 years ago[InstCombine] don't move FP negation out of a constant expression
Sanjay Patel [Thu, 11 Jul 2019 13:44:29 +0000 (13:44 +0000)]
[InstCombine] don't move FP negation out of a constant expression

-(X * ConstExpr) becomes X * (-ConstExpr), so don't reverse that
and infinite loop.

llvm-svn: 365774

5 years ago[clangd] Add priorities to background index queue, extract to separate class
Sam McCall [Thu, 11 Jul 2019 13:34:38 +0000 (13:34 +0000)]
[clangd] Add priorities to background index queue, extract to separate class

Reviewers: kadircet

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 365773

5 years ago[yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.
George Rimar [Thu, 11 Jul 2019 13:26:36 +0000 (13:26 +0000)]
[yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.

Failture:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/35670/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aelf-override-shsize.yaml

Solution:
Change `od` tool invocation to print single bytes.

llvm-svn: 365772

5 years ago[WebAssembly] Import __stack_pointer when building -pie binaries
Sam Clegg [Thu, 11 Jul 2019 13:13:25 +0000 (13:13 +0000)]
[WebAssembly] Import __stack_pointer when building -pie binaries

The -pie binary doesn't know that layout ahead of time so needs to
import the stack pointer from the embedder, just like we do already
for shared libraries.

This change is needed in order to address:
https://github.com/emscripten-core/emscripten/issues/8915

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

llvm-svn: 365771

5 years agoOpaquePtr: switch to GlobalValue::getValueType in a few places. NFC.
Tim Northover [Thu, 11 Jul 2019 13:13:02 +0000 (13:13 +0000)]
OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC.

llvm-svn: 365770

5 years agoOpaquePtr: use byval accessor instead of inspecting pointer type. NFC.
Tim Northover [Thu, 11 Jul 2019 13:12:38 +0000 (13:12 +0000)]
OpaquePtr: use byval accessor instead of inspecting pointer type. NFC.

The accessor can deal with both "byval(ty)" and "ty* byval" forms
seamlessly.

llvm-svn: 365769

5 years agoOpaquePtr: use load instruction directly for type. NFC.
Tim Northover [Thu, 11 Jul 2019 13:12:08 +0000 (13:12 +0000)]
OpaquePtr: use load instruction directly for type. NFC.

llvm-svn: 365768

5 years agoInstructionSimplify: Simplify InstructionSimplify. NFC.
Tim Northover [Thu, 11 Jul 2019 13:11:44 +0000 (13:11 +0000)]
InstructionSimplify: Simplify InstructionSimplify. NFC.

The interface predates CallBase, so both it and implementation were
significantly more complicated than they needed to be. There was even
some redundancy that could be eliminated.

Should also help with OpaquePointers by not trying to derive a
function's type from it's PointerType.

llvm-svn: 365767

5 years ago[yaml2obj] - Allow overriding the sh_size field.
George Rimar [Thu, 11 Jul 2019 12:59:29 +0000 (12:59 +0000)]
[yaml2obj] - Allow overriding the sh_size field.

There is no way to set broken sh_size field currently
for sections. It can be usefull for writing the
test cases.

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

llvm-svn: 365766

5 years ago[NFC] Updated tests for D64285
David Bolvansky [Thu, 11 Jul 2019 12:51:33 +0000 (12:51 +0000)]
[NFC] Updated tests for D64285

llvm-svn: 365765

5 years ago[clangd] Remove the extra ";", NFC
Haojian Wu [Thu, 11 Jul 2019 12:31:18 +0000 (12:31 +0000)]
[clangd] Remove the extra ";", NFC

llvm-svn: 365764

5 years ago[clangd] Fix an assertion crash in "ExtractVariable" tweak
Haojian Wu [Thu, 11 Jul 2019 12:29:01 +0000 (12:29 +0000)]
[clangd] Fix an assertion crash in "ExtractVariable" tweak

Summary:
GetTypePtr requires that the type should not be null, otherwise we hit
an assertion, we should use getTypePtrOrNull instead.

Reviewers: sammccall, SureYeaah

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

Tags: #clang

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

llvm-svn: 365763

5 years ago[llvm-readobj/llvm-readelf] - Report a warning instead of a error when dumping a...
George Rimar [Thu, 11 Jul 2019 12:26:48 +0000 (12:26 +0000)]
[llvm-readobj/llvm-readelf] - Report a warning instead of a error when dumping a broken dynamic section.

It does not make sence to stop dumping the object if the broken
dynamic section was found. In this patch I changed the behavior from
"report an error" to "report a warning". This matches GNU.

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

llvm-svn: 365762

5 years ago[LLDB] Fix FreeBSD build.
David Carlier [Thu, 11 Jul 2019 12:21:04 +0000 (12:21 +0000)]
[LLDB] Fix FreeBSD build.

To align with the LaunchThread change.

Reviewers: MaskRay, mgorny

Reviewed By: MaskRay

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

llvm-svn: 365761

5 years ago[ELF] Handle non-glob patterns before glob patterns in version scripts & fix a corner...
Fangrui Song [Thu, 11 Jul 2019 11:16:51 +0000 (11:16 +0000)]
[ELF] Handle non-glob patterns before glob patterns in version scripts & fix a corner case of --dynamic-list

This fixes PR38549, which is silently accepted by ld.bfd.
This seems correct because it makes sense to let non-glob patterns take
precedence over glob patterns.

lld issues an error because
`assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before `assignExactVersion(ver, v.id, v.name);`.

Move all assignWildcardVersion() calls after assignExactVersion() calls
to fix this.

Also, move handleDynamicList() to the bottom. computeBinding() called by
includeInDynsym() has this cryptic rule:

    if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible)
      return STB_LOCAL;

Before the change:

* foo's version is set to VER_NDX_LOCAL due to `local: *`
* handleDynamicList() is called
  - foo.computeBinding() is STB_LOCAL
  - foo.includeInDynsym() is false
  - foo.isPreemptible is not set (wrong)
* foo's version is set to V1

After the change:

* foo's version is set to VER_NDX_LOCAL due to `local: *`
* foo's version is set to V1
* handleDynamicList() is called
  - foo.computeBinding() is STB_GLOBAL
  - foo.includeInDynsym() is true
  - foo.isPreemptible is set (correct)

Reviewed By: ruiu

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

llvm-svn: 365760

5 years ago[ELF] Warn rather than error when duplicate version assignments occur
Fangrui Song [Thu, 11 Jul 2019 11:16:44 +0000 (11:16 +0000)]
[ELF] Warn rather than error when duplicate version assignments occur

In lvm2, libdevmapper.so is linked with a version script with duplicate
version assignments:

    DM_1_02_138 { global: ... dm_bitset_parse_list; ... };
    DM_1_02_129 { global: ... dm_bitset_parse_list; ... };

ld.bfd silently accepts this while gold issues a warning. We currently
error, thus inhibit producing the executable. Change the error to
warning to allow this case, and improve the message.

There are some cases where ld.bfd error
`anonymous version tag cannot be combined with other version tags`
but we just warn. It is probably OK for now.

Reviewed By: grimar, ruiu

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

llvm-svn: 365759

5 years ago[InstCombine] Reorder recently added/improved pow transformations
David Bolvansky [Thu, 11 Jul 2019 10:55:04 +0000 (10:55 +0000)]
[InstCombine] Reorder recently added/improved pow transformations

Changed cases are now faster with exp2.

llvm-svn: 365758

5 years agoRevert [BitcodeReader] Validate OpNum, before accessing Record array.
Florian Hahn [Thu, 11 Jul 2019 10:53:40 +0000 (10:53 +0000)]
Revert [BitcodeReader] Validate OpNum, before accessing Record array.

This reverts r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164)

llvm-dis runs out of memory while opening invalid-fcmp-opnum.bc on
llvm-hexagon-elf, probably because the bitcode file contains other
suspicious values.

http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/21949

llvm-svn: 365757

5 years ago[clangd] Fix windows buildbots
Kadir Cetinkaya [Thu, 11 Jul 2019 10:41:58 +0000 (10:41 +0000)]
[clangd] Fix windows buildbots

llvm-svn: 365756

5 years ago[X86] Regenerate intrinsics tests. NFCI.
Simon Pilgrim [Thu, 11 Jul 2019 10:40:23 +0000 (10:40 +0000)]
[X86] Regenerate intrinsics tests. NFCI.

llvm-svn: 365755

5 years ago[AMDGPU] Regenerate idot tests. NFCI.
Simon Pilgrim [Thu, 11 Jul 2019 10:37:58 +0000 (10:37 +0000)]
[AMDGPU] Regenerate idot tests. NFCI.

Reduces diff in D63281.

llvm-svn: 365754

5 years ago[llvm-objcopy] Don't change permissions of non-regular output files
Fangrui Song [Thu, 11 Jul 2019 10:17:59 +0000 (10:17 +0000)]
[llvm-objcopy] Don't change permissions of non-regular output files

There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`.
Worse, root can even change the mode bits of /dev/null.

Fix it by checking if the output file is special.

A new overload of llvm::sys::fs::setPermissions with FD as the parameter
is added. Users should provide `perm & ~umask` as the parameter if they
intend to respect umask.

The existing overload of llvm::sys::fs::setPermissions may be deleted if
we can find an implementation of fchmod() on Windows. fchmod() is
usually better than chmod() because it saves syscalls and can avoid race
condition.

Reviewed By: jakehehrlich, jhenderson

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

llvm-svn: 365753

5 years ago[X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabled
Fangrui Song [Thu, 11 Jul 2019 10:10:09 +0000 (10:10 +0000)]
[X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabled

Summary:
As of binutils 2.32, ld has a bogus TLS relaxation error when the GD/LD
code sequence using R_X86_64_GOTPCREL (instead of R_X86_64_GOTPCRELX) is
attempted to be relaxed to IE/LE (binutils PR24784). gold and lld are good.

In gcc/config/i386/i386.md, there is a configure-time check of as/ld
support and the GOT relaxation will not be used if as/ld doesn't support
it:

    if (flag_plt || !HAVE_AS_IX86_TLS_GET_ADDR_GOT)
      return "call\t%P2";
    return "call\t{*%p2@GOT(%1)|[DWORD PTR %p2@GOT[%1]]}";

In clang, -DENABLE_X86_RELAX_RELOCATIONS=OFF is the default. The ld.bfd
bogus error can be reproduced with:

    thread_local int a;
    int main() { return a; }

clang -fno-plt -fpic a.cc -fuse-ld=bfd

GOTPCRELX gained relative good support in 2016, which is considered
relatively new.  It is even difficult to conditionally default to
-DENABLE_X86_RELAX_RELOCATIONS=ON due to cross compilation reasons. So
work around the ld.bfd bug by only using GOT when GOTPCRELX is enabled.

Reviewers: dalias, hjl.tools, nikic, rnk

Reviewed By: nikic

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 365752

5 years ago[clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.
Haojian Wu [Thu, 11 Jul 2019 10:06:24 +0000 (10:06 +0000)]
[clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.

This would fix some mysterious crashes on codeAction in clangd.

llvm-svn: 365751

5 years ago[BitcodeReader] Validate OpNum, before accessing Record array.
Florian Hahn [Thu, 11 Jul 2019 09:57:00 +0000 (09:57 +0000)]
[BitcodeReader] Validate OpNum, before accessing Record array.

Currently invalid bitcode files can cause a crash, when OpNum exceeds
the number of elements in Record, like in the attached bitcode file.

The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698

Reviewers: t.p.northover, thegameg, jfb

Reviewed By: jfb

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

llvm-svn: 365750

5 years ago[ARM][LowOverheadLoops] Correct offset checking
Sam Parker [Thu, 11 Jul 2019 09:56:15 +0000 (09:56 +0000)]
[ARM][LowOverheadLoops] Correct offset checking

This patch addresses a couple of problems:
1) The maximum supported offset of LE is -4094.
2) The offset of WLS also needs to be checked, this uses a
   maximum positive offset of 4094.

The use of BasicBlockUtils has been changed because the block offsets
weren't being initialised, but the isBBInRange checks both positive
and negative offsets.

ARMISelLowering has been tweaked because the test case presented
another pattern that we weren't supporting.

llvm-svn: 365749

5 years ago[clangd] Reland rL365634
Kadir Cetinkaya [Thu, 11 Jul 2019 09:54:31 +0000 (09:54 +0000)]
[clangd] Reland rL365634

This was reverted in rL365678, the failure was due to YAML parsing of
compile_commands.json.

Converting backslashes to forward slashes to fix the issue in unittest.

llvm-svn: 365748

5 years ago[ARM] Remove nonexistent unsigned forms of MVE VQDMLAH.
Simon Tatham [Thu, 11 Jul 2019 09:52:15 +0000 (09:52 +0000)]
[ARM] Remove nonexistent unsigned forms of MVE VQDMLAH.

The VQDMLAH.U8, VQDMLAH.U16 and VQDMLAH.U32 instructions don't
actually exist: the Armv8.1-M architecture spec only lists signed
forms of that instruction. The unsigned ones were added in error: they
existed in an early draft of the spec, but they were removed before
the public version, and we missed that particular spec change.

Also affects the variant forms VQDMLASH, VQRDMLAH and VQRDMLASH.

Reviewers: miyuki

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

Tags: #llvm

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

llvm-svn: 365747

5 years ago[NFC][PowerPC] Added test to track current behaviour of TailDup
Kai Luo [Thu, 11 Jul 2019 09:43:03 +0000 (09:43 +0000)]
[NFC][PowerPC] Added test to track current behaviour of TailDup

llvm-svn: 365746

5 years ago[clangd] Added highlightings for namespace specifiers.
Johan Vikstrom [Thu, 11 Jul 2019 09:29:16 +0000 (09:29 +0000)]
[clangd] Added highlightings for namespace specifiers.

Summary: Added highlightings for namespace specifiers.

Reviewers: hokein, sammccall, ilya-biryukov

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

Tags: #clang

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

llvm-svn: 365745

5 years ago[MIPS GlobalISel] Skip copies in addUseDef and addDefUses
Petar Avramovic [Thu, 11 Jul 2019 09:28:34 +0000 (09:28 +0000)]
[MIPS GlobalISel] Skip copies in addUseDef and addDefUses

Skip copies between virtual registers during search for UseDefs
and DefUses.
Since each operand has one def search for UseDefs is straightforward.
But since operand can have many uses, we have to check all uses of
each copy we traverse during search for DefUses.

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

llvm-svn: 365744

5 years ago[MIPS GlobalISel] RegBankSelect for chains of ambiguous instructions
Petar Avramovic [Thu, 11 Jul 2019 09:22:49 +0000 (09:22 +0000)]
[MIPS GlobalISel] RegBankSelect for chains of ambiguous instructions

When one of the uses/defs of ambiguous instruction is also ambiguous
visit it recursively and search its uses/defs for instruction with
only one mapping available.
When all instruction in a chain are ambiguous arbitrary mapping can
be selected. For s64 operands in ambiguous chain fprb is selected since
it results in less instructions then having to narrow scalar s64 to s32.
For s32 both gprb and fprb result in same number of instructions and
gprb is selected like a general purpose option.

At the moment we always avoid cross register bank copies.
TODO: Implement a model for costs calculations of different mappings
on same instruction and cross bank copies. Allow cross bank copies
when appropriate according to cost model.

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

llvm-svn: 365743

5 years agoRevert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the...
Haojian Wu [Thu, 11 Jul 2019 08:54:28 +0000 (08:54 +0000)]
Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5)

The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments).

llvm-svn: 365742

5 years agoRemove some redundant code from r290372 and improve a comment.
Jay Foad [Thu, 11 Jul 2019 08:49:52 +0000 (08:49 +0000)]
Remove some redundant code from r290372 and improve a comment.

llvm-svn: 365741

5 years ago[ARM][ParallelDSP] Change the search for smlads
Sam Parker [Thu, 11 Jul 2019 07:47:50 +0000 (07:47 +0000)]
[ARM][ParallelDSP] Change the search for smlads

Two functional changes have been made here:
- Now search up from any add instruction to find the chains of
  operations that we may turn into a smlad. This allows the
  generation of a smlad which doesn't accumulate into a phi.
- The search function has been corrected to stop it falsely searching
  up through an invalid path.

The bulk of the changes have been making the Reduction struct a class
and making it more C++y with getters and setters.

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

llvm-svn: 365740

5 years ago[ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia
Petr Hosek [Thu, 11 Jul 2019 07:30:11 +0000 (07:30 +0000)]
[ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia

This is the optimized implementation for Fuchsia provided by the libc.

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

llvm-svn: 365739

5 years ago[test] Silence gcc 7.4 warning [NFC]
Mikael Holmen [Thu, 11 Jul 2019 07:07:23 +0000 (07:07 +0000)]
[test] Silence gcc 7.4 warning [NFC]

Without this gcc 7.4.0 complains with
 ../unittests/Analysis/ValueTrackingTest.cpp:937:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
                          ::testing::ValuesIn(IsBytewiseValueTests));
                                                                   ^

llvm-svn: 365738

5 years agoFix build breakage on Win32.
Rui Ueyama [Thu, 11 Jul 2019 06:56:44 +0000 (06:56 +0000)]
Fix build breakage on Win32.

llvm-svn: 365737

5 years ago[clang-doc] Silence compiler warning with gcc 7.4 [NFC]
Mikael Holmen [Thu, 11 Jul 2019 06:50:10 +0000 (06:50 +0000)]
[clang-doc] Silence compiler warning with gcc 7.4 [NFC]

Without the fix gcc 7.4.0 complains with

/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'llvm::SmallString<16> clang::doc::{anonymous}::HTMLTag::ToString() const':
/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:165:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::HasInlineChildren() const':
/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:142:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::IsSelfClosing() const':
/data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:126:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: all warnings being treated as errors

llvm-svn: 365736

5 years agoAdd NetBSD LSan support
Kamil Rytarowski [Thu, 11 Jul 2019 06:22:35 +0000 (06:22 +0000)]
Add NetBSD LSan support

Summary:
Combine few relatively small changes into one:

 - implement internal_ptrace() and internal_clone() for NetBSD
 - add support for stoptheworld based on the ptrace(2) API
 - define COMPILER_RT_HAS_LSAN for NetBSD
 - enable tests for NetBSD/amd64

Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

The implementation is in theory CPU independent through well defined macros
across all NetBSD ports, however only the x86_64 version was tested.

Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

Reviewed By: vitalybuka

Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

Tags: #llvm

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

llvm-svn: 365735

5 years agoFix build breakage on Darwin.
Rui Ueyama [Thu, 11 Jul 2019 06:12:18 +0000 (06:12 +0000)]
Fix build breakage on Darwin.

llvm-svn: 365734

5 years agoUpdate comments for r365730. NFC.
Rui Ueyama [Thu, 11 Jul 2019 06:08:54 +0000 (06:08 +0000)]
Update comments for r365730. NFC.

llvm-svn: 365733

5 years agoFix build breakage on Win32.
Rui Ueyama [Thu, 11 Jul 2019 06:00:40 +0000 (06:00 +0000)]
Fix build breakage on Win32.

llvm-svn: 365732

5 years ago[WebAssembly] Print error message for llvm.clear_cache intrinsic
Heejin Ahn [Thu, 11 Jul 2019 05:55:47 +0000 (05:55 +0000)]
[WebAssembly] Print error message for llvm.clear_cache intrinsic

Summary:
Wasm does not currently support `llvm.clear_cache` intrinsic, and this
prints a proper error message instead of segfault.

Reviewers: dschuff, sbc100, sunfish

Subscribers: jgravelle-google, llvm-commits

Tags: #llvm

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

llvm-svn: 365731

5 years ago[Coding style change][lld] Rename variables for non-ELF ports
Rui Ueyama [Thu, 11 Jul 2019 05:40:30 +0000 (05:40 +0000)]
[Coding style change][lld] Rename variables for non-ELF ports

This patch does the same thing as r365595 to other subdirectories,
which completes the naming style change for the entire lld directory.

With this, the naming style conversion is complete for lld.

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

llvm-svn: 365730

5 years ago[InstCombine][NFCI] Add test coverage to onehot_merge.ll
Huihui Zhang [Thu, 11 Jul 2019 04:56:37 +0000 (04:56 +0000)]
[InstCombine][NFCI] Add test coverage to onehot_merge.ll

Prep work for upcoming patch D64275.

llvm-svn: 365729

5 years agoIncrease the number of parser diagnostics.
Richard Trieu [Thu, 11 Jul 2019 02:54:15 +0000 (02:54 +0000)]
Increase the number of parser diagnostics.

The reserved range for parser diagnostics is getting close to being filled,
so increase the space for them.

llvm-svn: 365727

5 years ago[SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
Chen Zheng [Thu, 11 Jul 2019 02:18:22 +0000 (02:18 +0000)]
[SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
Differential Revision: https://reviews.llvm.org/D64422

llvm-svn: 365726

5 years agoChange another test I missed in r365724
Nico Weber [Thu, 11 Jul 2019 01:21:17 +0000 (01:21 +0000)]
Change another test I missed in r365724

llvm-svn: 365725

5 years agoclang-cl: Remove -O0 option
Nico Weber [Thu, 11 Jul 2019 01:18:05 +0000 (01:18 +0000)]
clang-cl: Remove -O0 option

cl.exe doesn't understand it; there's /Od instead. See also the review
thread for r229575.

Update lots of compiler-rt tests to use -Od instead of -O0.
Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`

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

llvm-svn: 365724

5 years agoReplace three "strip & accumulate" implementations with a single one
Johannes Doerfert [Thu, 11 Jul 2019 01:14:48 +0000 (01:14 +0000)]
Replace three "strip & accumulate" implementations with a single one

This patch replaces the three almost identical "strip & accumulate"
implementations for constant pointer offsets with a single one,
combining the respective functionalities. The old interfaces are kept
for now.

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

llvm-svn: 365723

5 years ago[NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63
Johannes Doerfert [Thu, 11 Jul 2019 01:14:30 +0000 (01:14 +0000)]
[NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63

We are about to add enum attributes with AttrKind numbers >= 63. This
means we cannot use AttrKind #63 to test for an invalid attribute number
in the RAW format anymore. This patch changes the number of an invalid
attribute to #255. There is no change to the character of the tests.

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

llvm-svn: 365722

5 years agoVarious minor tweaks to CLCompatOptions.td
Nico Weber [Thu, 11 Jul 2019 01:13:38 +0000 (01:13 +0000)]
Various minor tweaks to CLCompatOptions.td

- Add back indentation I accidentally removed in r364901
- Wrap two lines to 80 cols
- Slightly tighten up help text for several flags
- Consistently use "Do not" instead of "Don't"
- Make every option description start with a verb
- Use "Set" instead of "Specify"
- Mark default values of options more consistently
- Remove text about "/Zi" not producing PDBs since it's confusing
  for people not intimately familiar with the implementation of
  the normal PDB pipeline. /Zi lets the linker produce PDBs, which
  is what most users want.
- Consistently use "file" over "filename" in meta var names,
  consistently use "file name" over "filename" in text
- Make all output setting options have consistent language

llvm-svn: 365721

5 years ago[X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.
Craig Topper [Thu, 11 Jul 2019 01:01:39 +0000 (01:01 +0000)]
[X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.

We use the functions that convert to three address to do the
conversion, but changing an 8 or 16 bit will cause it to create
a virtual register. This can't be done after register allocation
where this pass runs.

I've switched the pass completely to a white list of instructions
that can be converted to LEA instead of a blacklist that was
incorrect. This will avoid surprises if we enhance the three
address conversion function to include additional instructions
in the future.

Fixes PR42565.

llvm-svn: 365720

5 years ago[lldb] Disable TestDollarInVariable.py on Windows
Raphael Isemann [Thu, 11 Jul 2019 00:35:31 +0000 (00:35 +0000)]
[lldb] Disable TestDollarInVariable.py on Windows

It seems on Windows we don't handle the lldb_expr_result variable correctly:

```
AssertionError: False is not True : 'expr $__lldb_expr_result' returns expected result, got '(int &) $0 = 0x0000000000000000'
```

I'll disable the test until I can find a way to debug this on Windows.

llvm-svn: 365719

5 years ago[swig] Add workaround for old swig
Jonas Devlieghere [Thu, 11 Jul 2019 00:12:59 +0000 (00:12 +0000)]
[swig] Add workaround for old swig

Apparently, when using swig 1.3.40, properties to set values do not work
without the `__swig_setmethods__` workaround. I conditionally added this
back for SBTypeCategory, as it's causing a test failure on GreenDragon,
while I investigate this further.

llvm-svn: 365718

5 years ago[AMDGPU] gfx908 atomic fadd and atomic pk_fadd
Stanislav Mekhanoshin [Thu, 11 Jul 2019 00:10:17 +0000 (00:10 +0000)]
[AMDGPU] gfx908 atomic fadd and atomic pk_fadd

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

llvm-svn: 365717

5 years ago[CGDebugInfo] Fix -femit-debug-entry-values crash on os_log_helpers
Vedant Kumar [Thu, 11 Jul 2019 00:09:16 +0000 (00:09 +0000)]
[CGDebugInfo] Fix -femit-debug-entry-values crash on os_log_helpers

An os_log_helper FunctionDecl may not have a body. Ignore these for the
purposes of debug entry value emission.

Fixes an assertion failure seen in a stage2 build of clang:

Assertion failed: (FD->hasBody() && "Functions must have body here"),
function analyzeParametersModification

llvm-svn: 365716

5 years ago[AMDGPU] gfx908 dot instruction support
Stanislav Mekhanoshin [Thu, 11 Jul 2019 00:00:27 +0000 (00:00 +0000)]
[AMDGPU] gfx908 dot instruction support

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

llvm-svn: 365715

5 years agoAttempt to fix bots after r365703
Nico Weber [Wed, 10 Jul 2019 23:50:16 +0000 (23:50 +0000)]
Attempt to fix bots after r365703

llvm-svn: 365714

5 years agorL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108...
Sterling Augustine [Wed, 10 Jul 2019 23:38:00 +0000 (23:38 +0000)]
rL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the...

Summary:
...template argument.

Remove the forward declaration and include the appropriate header instead.
Remove CompileCommand too, which is also in the header.

llvm-svn: 365713

5 years agoRevert [llvm-objcopy] Allow strip symtab from executables and DSOs
Jordan Rupprecht [Wed, 10 Jul 2019 23:32:44 +0000 (23:32 +0000)]
Revert [llvm-objcopy] Allow strip symtab from executables and DSOs

This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37)

This patch doesn't work with binaries built w/ `--emit-relocs`, e.g.

```
$ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo
llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation
```

llvm-svn: 365712