Nate Voorhies [Tue, 28 Jan 2020 19:11:04 +0000 (11:11 -0800)]
[NFC] Removing experimental designation for ninja in docs.
Summary:
Ninja is no longer an experimental tool, documentation changed to
reflect this.
Reviewers: nikola
Reviewed By: nikola
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73567
Jonas Devlieghere [Tue, 28 Jan 2020 23:28:13 +0000 (15:28 -0800)]
Fix another implicit conversion in the directory watcher
Benjamin Kramer [Tue, 28 Jan 2020 23:25:44 +0000 (00:25 +0100)]
[tblgen] Fix implicit conversion only diagnosed by g++ 6
Francis Visoiu Mistrih [Tue, 28 Jan 2020 23:23:28 +0000 (15:23 -0800)]
[NFC] Fix comment typo
Jonas Devlieghere [Tue, 28 Jan 2020 23:19:17 +0000 (15:19 -0800)]
Fix more implicit conversions
Benjamin Kramer [Tue, 28 Jan 2020 23:18:16 +0000 (00:18 +0100)]
[Driver] Fix implicit conversion guarded by #ifdef _WIN32
Benjamin Kramer [Tue, 28 Jan 2020 23:17:07 +0000 (00:17 +0100)]
Fix implicit conversions in example code.
Jonas Devlieghere [Tue, 28 Jan 2020 23:16:56 +0000 (15:16 -0800)]
[lldb/Plugin] Fix implicit conversion in GDBRemote
Jonas Devlieghere [Tue, 28 Jan 2020 23:14:40 +0000 (15:14 -0800)]
[lldb/Reproducer] s/nullptr_t/std::nullptr_t/
Fixes error: unknown type name 'nullptr_t'; did you mean
'std::nullptr_t'.
Benjamin Kramer [Tue, 28 Jan 2020 23:06:33 +0000 (00:06 +0100)]
Fix implicit conversion in the lldb Python plugin
Jonas Devlieghere [Tue, 28 Jan 2020 22:47:29 +0000 (14:47 -0800)]
[lldb/Reproducer] Include result in recording statements
Include the return value in the recording log statements. This helps
diagnose uninstrumented (copy assignment) constructors.
Benjamin Kramer [Tue, 28 Jan 2020 23:02:26 +0000 (00:02 +0100)]
[Support] Fix implicit std::string conversions on Win32.
Benjamin Kramer [Tue, 28 Jan 2020 22:30:02 +0000 (23:30 +0100)]
[ADT] Make StringRef's std::string conversion operator explicit
This has the same behavior as converting std::string_view to
std::string. This is an expensive conversion, so explicit conversions
are helpful for avoiding unneccessary string copies.
Shoaib Meenai [Tue, 28 Jan 2020 01:29:41 +0000 (17:29 -0800)]
[libcxx] Link against android_support when needed
libc++ on Android needs to be linked against libandroid_support on API
levels less than 21 to provide needed functions that aren't in the libc
on those platforms (e.g. posix_memalign for libcxxabi). libc++ from the
NDK is a linker script that pulls in libandroid_support, but for
building libc++ itself, we need to explicitly add libandroid_support as
a dependency. Moreover, libc++ headers reference the functions provided
by libandroid_support, so it needs to be added as a public dependency.
Differential Revision: https://reviews.llvm.org/D73516
Shoaib Meenai [Tue, 28 Jan 2020 01:25:38 +0000 (17:25 -0800)]
[asan] Fix test compilation on Android API <= 17
mlockall and munlockall were introduced in Android API 17, so avoid
referencing them on prior versions.
Differential Revision: https://reviews.llvm.org/D73515
Shoaib Meenai [Tue, 28 Jan 2020 01:04:21 +0000 (17:04 -0800)]
[runtimes] Fix passing lists to runtimes configures
We have to replace the ";" with "|" (since LLVMExternalProjectUtils uses
"|" as the `LIST_SEPARATOR` when invoking `ExternalProject_Add`) in
order for lists to be passed correctly to the runtimes CMake configures.
Remove the special case for `LLVM_ENABLE_RUNTIMES`, since it'll just get
handled by the general logic now.
Differential Revision: https://reviews.llvm.org/D73512
Benjamin Kramer [Tue, 28 Jan 2020 19:23:46 +0000 (20:23 +0100)]
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
Alex Langford [Tue, 28 Jan 2020 01:59:12 +0000 (17:59 -0800)]
[lldb] Delete ValueObject::GetBaseClassPath
Summary:
This method has exactly one call site, which is only actually executed
if `ValueObject::IsBaseClass` returns false. However, the first thing
that `ValueObject::GetBaseClassPath` does is check if `ValueObject::IsBaseClass`
is true. Because this can never be the case, this method always returns false
and is therefore effectively dead.
Differential Revision: https://reviews.llvm.org/D73517
Danilo Carvalho Grael [Tue, 28 Jan 2020 21:09:51 +0000 (16:09 -0500)]
[AArch64][SVE] Add SVE2 mla indexed intrinsics.
Summary:
Add SVE2 mla indexed intrinsics:
- smlalb, smalalt, umlalb, umlalt, smlslb, smlslt, umlslb, umlslt.
Reviewers: efriedma, sdesmalen, dancgr, cameron.mcinally, c-rhodes, rengolin
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, arphaman, psnobl, llvm-commits, amehsan
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73576
Jessica Paquette [Tue, 28 Jan 2020 19:35:44 +0000 (11:35 -0800)]
[AArch64][GlobalISel] Fold G_AND into G_BRCOND
When the G_BRCOND is fed by a eq or ne G_ICMP, it may be possible to fold a
G_AND into the branch by producing a tbnz/tbz instead.
This happens when
1. We have a ne/eq G_ICMP feeding into the G_BRCOND
2. The G_ICMP is a comparison against 0
3. One of the operands of the G_AND is a power of 2 constant
This is very similar to the code in AArch64TargetLowering::LowerBR_CC.
Add opt-and-tbnz-tbz to test this.
Differential Revision: https://reviews.llvm.org/D73573
Francis Visoiu Mistrih [Mon, 27 Jan 2020 18:40:14 +0000 (10:40 -0800)]
[CodeGen] Attach no-builtin attributes to function definitions with no Decl
When using -fno-builtin[-<name>], we don't attach the IR attributes to
function definitions with no Decl, like the ones created through
`CreateGlobalInitOrDestructFunction`.
This results in projects using -fno-builtin or -ffreestanding to start
seeing symbols like _memset_pattern16.
The fix changes the behavior to always add the attribute if LangOptions
requests it.
Differential Revision: https://reviews.llvm.org/D73495
Alex Langford [Thu, 23 Jan 2020 21:49:54 +0000 (13:49 -0800)]
[lldb] Remove ClangASTImporter from Target
Target is one of the classes responsible for vending ClangASTImporter.
Target doesn't need to know anything about ClangASTImporter, so if we
instead have ClangPersistentVariables vend it, we can preserve
existing behavior while improving layering and removing dependencies
from non-plugins to plugins.
Mircea Trofin [Tue, 28 Jan 2020 21:36:46 +0000 (13:36 -0800)]
[llvm] Ensure InlineCost-related fields are initialized
Summary: Small fix - never hurts to have things initialized.
Reviewers: davidxl, eraman
Reviewed By: davidxl
Subscribers: haicheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73420
Michael Spang [Tue, 28 Jan 2020 20:43:07 +0000 (12:43 -0800)]
[GlobalMerge] Preserve symbol visibility when merging globals
Symbols created for merged external global variables have default
visibility. This can break programs when compiling with -Oz
-fvisibility=hidden as symbols that should be hidden will be exported at
link time.
Differential Revision: https://reviews.llvm.org/D73235
Hans Wennborg [Tue, 28 Jan 2020 21:17:31 +0000 (22:17 +0100)]
Revert "[MS] Overhaul how clang passes overaligned args on x86_32"
It broke some Chromium tests, so let's revert until it can be fixed; see
https://crbug.com/1046362
This reverts commit
2af74e27ed7d0832cbdde9cb969aaca7a42e99f9.
Jonas Devlieghere [Tue, 28 Jan 2020 21:23:36 +0000 (13:23 -0800)]
[lldb/Reproducer] Include deserialized value in log statement
Extend the replay log statement to include the deserialized value.
Michał Górny [Tue, 28 Jan 2020 21:14:33 +0000 (22:14 +0100)]
[lldb] [test] Restrict x86-64-write register test to x86-64
Nico Weber [Tue, 28 Jan 2020 21:00:54 +0000 (16:00 -0500)]
[gn build] (manually) port
90a10f00ff8
Nicolas Vasilache [Tue, 28 Jan 2020 20:47:18 +0000 (15:47 -0500)]
[mlir][Linalg][doc] Add Design Document for the Linalg Dialect
Alina Sbirlea [Tue, 28 Jan 2020 19:34:13 +0000 (11:34 -0800)]
[LoopUnrollAndJamPass] Clean unnecessary includes. [NFCI]
Whitney Tsang [Tue, 28 Jan 2020 20:21:48 +0000 (20:21 +0000)]
[NFCI][LoopUnrollAndJam] Minor changes.
Summary:
1. Add assertions.
2. Verify more analyses.
These changes are moved out of https://reviews.llvm.org/D73129 to
simplify that review.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto
Reviewed By: dmgreen
Subscribers: fhahn, hiraditya, zzheng, llvm-commits, prithayan, anhtuyen
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D73204
Petr Hosek [Tue, 28 Jan 2020 07:28:03 +0000 (23:28 -0800)]
[Instrumentation] Set hidden visibility for the bias variable
We have to avoid using a GOT relocation to access the bias variable,
setting the hidden visibility achieves that.
Differential Revision: https://reviews.llvm.org/D73529
Alexandre Ganea [Tue, 28 Jan 2020 19:48:12 +0000 (14:48 -0500)]
Fix compiling with clang-cl inside a Visual Studio 2019 16.4 command prompt.
This was introduced by
0d17410e919124b3a9194b9bdbe2ce39dd779941 and was preventing from compiling with clang-cl on Windows.
The problem was that clang-cl detects the triple from the current env vars (was x86_64-pc-windows-msvc19.24.28315 for me, as I happen to always run inside a VS2019 cmd prompt).
Sanjay Patel [Tue, 28 Jan 2020 19:39:42 +0000 (14:39 -0500)]
[InstCombine] refactor foldVectorCmp(); NFC
We can handle other patterns here as shown in PR44588.
Petr Hosek [Tue, 28 Jan 2020 03:14:32 +0000 (19:14 -0800)]
[CMake] Set ASM compiler for external projects
This is necessary on Windows, otherwise CMake fails. It's not
conventional on Windows to use cl for assembly (you'd use ml or ml64
instead), but CMake has a separate ASM_MASM mode for that, and clang-cl
works fine for assembly so we'll use that on Windows for consistency.
Differential Revision: https://reviews.llvm.org/D73522
Ted Woodward [Tue, 28 Jan 2020 19:31:40 +0000 (13:31 -0600)]
Don't fail step out if remote server doesn't implement qMemoryRegionInfo
Summary:
The return address validation in D71372 will fail if the memory permissions can't be determined. Many embedded stubs either don't implement the qMemoryRegionInfo packet, or don't have memory permissions at all.
Remove the return from the if clause that calls GetLoadAddressPermissions, so this call failing doesn't cause the step out to abort. Instead, assume that the memory permission check doesn't apply to this type of target.
Reviewers: labath, jingham, clayborg, mossberg
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D72513
Roland McGrath [Tue, 28 Jan 2020 19:34:53 +0000 (11:34 -0800)]
[lsan] Support LeakSanitizer runtime on Fuchsia
Support LeakSanitizer runtime on Fuchsia.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D72887
Roland McGrath [Tue, 28 Jan 2020 19:32:08 +0000 (11:32 -0800)]
[Fuchsia] Remove aarch64-fuchsia target-specific -mcmodel=kernel
Under --target=aarch64-fuchsia, -mcmodel=kernel has the effect of
(the default) -mcmodel=small plus -mtp=el1 (which did not exist when
this behavior was added). Fuchsia's kernel now uses -mtp=el1
directly instead of -mcmodel=kernel, so remove this special support.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D73409
Ahmed Taei [Sat, 25 Jan 2020 00:23:16 +0000 (16:23 -0800)]
[mlir] Add primitive transform pattern to rewrite linalg.fill into vector.broadcast form.
Summary:
This diff adds a transformation patter to rewrite linalg.fill as broadcasting a scaler into a vector.
It uses the same preconditioning as matmul (memory is contiguous).
Reviewers: nicolasvasilache
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73391
River Riddle [Tue, 28 Jan 2020 19:19:20 +0000 (11:19 -0800)]
[mlir] Optimize OpResult use case for single result operations.
Summary:
Operation represents all of the uses of each result with one use list, so manipulating the use list of a specific result requires filtering the main use list. This revision adds an optimization for the case of single result operations to avoid this filtering.
Differential Revision: https://reviews.llvm.org/D73430
David Blaikie [Tue, 28 Jan 2020 19:02:16 +0000 (11:02 -0800)]
llvm-symbolizer test: Add a bit of extra detail on how to compile/reproduce this
The details are also in the .test file, but doesn't hurt to make it a
bit clearer.
Fangrui Song [Tue, 28 Jan 2020 08:01:20 +0000 (00:01 -0800)]
[ELF][PPC32] Support --emit-relocs link of R_PPC_PLTREL24
Similar to R_MIPS_GPREL16 and R_MIPS_GPREL32 (D45972).
If the addend of an R_PPC_PLTREL24 is >= 0x8000, it indicates that r30
is relative to the input section .got2.
```
addis 30, 30, .got2+0x8000-.L1$pb@ha
addi 30, 30, .got2+0x8000-.L1$pb@l
...
bl foo+0x8000@PLT
```
After linking, the relocation will be relative to the output section .got2.
To compensate for the shift `address(input section .got2) - address(output section .got2) = ppc32Got2OutSecOff`, adjust by `ppc32Got2OutSecOff`:
```
addis 30, 30, .got2+0x8000-.L1+ppc32Got2OutSecOff$pb@ha
addi 30, 30, .got2+0x8000-.L1+ppc32Got2OutSecOff$pb@ha$pb@l
...
bl foo+0x8000+ppc32Got2OutSecOff@PLT
```
This rule applys to a relocatable link or a non-relocatable link with --emit-relocs.
Reviewed By: Bdragon28
Differential Revision: https://reviews.llvm.org/D73532
Kostya Kortchinsky [Tue, 28 Jan 2020 17:38:59 +0000 (09:38 -0800)]
[scudo][standalone] Fix Android logging
Summary:
Zygote & children's stderr is lost, so use Bionic's provided allocation
free syslog function for `outputRaw`. Get rid of the mutex as it's not
vital and could cause issues with `fork`.
Reviewers: cferris, pcc, eugenis, hctim, morehouse
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73561
LLVM GN Syncbot [Tue, 28 Jan 2020 18:59:31 +0000 (18:59 +0000)]
[gn build] Port
2c03c899d50
Hiroshi Yamauchi [Mon, 27 Jan 2020 18:05:54 +0000 (10:05 -0800)]
[MBFI] Move BranchFolding::MBFIWrapper to its own files. NFC.
Summary:
To avoid header file circular dependency issues in passing updated MBFI (in
MBFIWrapper) to the interface of profile guided size optimizations.
A prep step for (and split off of) D73381.
Reviewers: davidxl
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73494
Yaxun (Sam) Liu [Tue, 28 Jan 2020 18:57:35 +0000 (13:57 -0500)]
Fix test hip-device-libs.hip
Jonas Devlieghere [Tue, 28 Jan 2020 18:57:34 +0000 (10:57 -0800)]
[lldb/Bindings] Sort headers in headers.swig
Kristina Bessonova [Tue, 14 Jan 2020 18:39:04 +0000 (20:39 +0200)]
[llvm-dwarfdump][Statistics] Make calculations of vars in global scope more accurate
It isn't known how many times we've seen the same variable or member in
the global scope (unlike in functions), but there still can be some duplicates
among different CUs.
So, this patch proposes to count variables in the global scope just as a sum of
the number of vars, constant members and artificial entities.
Reviewed by: aprantl
Differential Revision: https://reviews.llvm.org/D73004
Kristina Bessonova [Tue, 14 Jan 2020 18:37:47 +0000 (20:37 +0200)]
[llvm-dwarfdump][Statistics] Distinguish parameters with same name or w/o a name
A few DW_TAG_formal_parameter's of the same function may have the same
name (e.g. variadic (template) functions) or don't have a name at all
(if the parameter isn't used inside the function body), but we still
need to be able to distinguish between them to get correct number of 'total vars'
and 'availability' metric.
Reviewed by: aprantl
Differential Revision: https://reviews.llvm.org/D73003
Kristina Bessonova [Wed, 8 Jan 2020 15:33:51 +0000 (17:33 +0200)]
[llvm-dwarfdump][Statistics] Count more than one conrete out-of-line instances of a function
Here may be more than one out-of-line instance of the same function
among different CUs. All of them should be accounted for to get an accurate
total number of variables/parameters.
Reviewed by: aprantl
Differential Revision: https://reviews.llvm.org/D73002
Sanjay Patel [Tue, 28 Jan 2020 18:21:36 +0000 (13:21 -0500)]
[InstCombine] add tests for cmp with splat operand and splat constant; NFC
See PR44588:
https://bugs.llvm.org/show_bug.cgi?id=44588
LLVM GN Syncbot [Tue, 28 Jan 2020 18:39:09 +0000 (18:39 +0000)]
[gn build] Port
a928d127a52
Konstantin Pyzhov [Tue, 28 Jan 2020 10:41:42 +0000 (05:41 -0500)]
Corrected clang amdgpu-features.cl test for
6d614a82a4230ea69e322f56dc18dcbd815ed37b (AMDGPU MFMA built-ins)
Differential Revision: https://reviews.llvm.org/D72723
Artem Belevich [Wed, 22 Jan 2020 20:44:22 +0000 (12:44 -0800)]
[CUDA] Assume the latest known CUDA version if we've found an unknown one.
This makes clang somewhat forward-compatible with new CUDA releases
without having to patch it for every minor release without adding
any new function.
If an unknown version is found, clang issues a warning (can be disabled
with -Wno-cuda-unknown-version) and assumes that it has detected
the latest known version. CUDA releases are usually supersets
of older ones feature-wise, so it should be sufficient to keep
released clang versions working with minor CUDA updates without
having to upgrade clang, too.
Differential Revision: https://reviews.llvm.org/D73231
Nathan James [Tue, 28 Jan 2020 18:09:53 +0000 (18:09 +0000)]
[clang-tidy] adjust scripts to subsubsections in Release Notes
Summary:
I added subsubsections for typical Clang-tidy entries in Release Notes, so now scripts are aware of this changes.
I don't have GitHub commit access, so please commit changes.
Reviewers: aaron.ballman, alexfh, hokein
Reviewed By: alexfh
Subscribers: njames93, xazax.hun, cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D72527
Amara Emerson [Mon, 27 Jan 2020 23:57:16 +0000 (15:57 -0800)]
[AArch64][GlobalISel] Don't bail out of the select(cmp(a, b)) -> csel optimization with multiple users.
It can still be beneficial to do the optimization if the result of the compare
is used by *another* select.
Differential Revision: https://reviews.llvm.org/D73511
Aaron Ballman [Tue, 28 Jan 2020 18:04:32 +0000 (13:04 -0500)]
Fix a crash when casting _Complex and ignoring the results.
Performing a cast where the result is ignored caused Clang to crash when
performing codegen for the conversion:
_Complex int a;
void fn1() { (_Complex double) a; }
This patch addresses the crash by not trying to emit the scalar conversions,
causing it to be a noop. Fixes PR44624.
Derek Schuff [Thu, 23 Jan 2020 01:40:11 +0000 (17:40 -0800)]
[WebAssembly] Add WebAssembly support to llvm-symbolizer
The only thing missing for basic llvm-symbolizer support is the ability on
lib/Object to get a wasm symbol's section ID, which allows sorting and
computation of the symbols' sizes.
Also, when the WasmAsmParser switches sections on new functions, also add the
section to the list of Dwarf sections if Dwarf is being generated for assembly;
this allows writing of simple tests.
Reviewers: sbc100, jhenderson, aardappel
Differential Revision: https://reviews.llvm.org/D73246
Kristina Bessonova [Sun, 19 Jan 2020 14:28:35 +0000 (16:28 +0200)]
[llvm-dwarfdump][Statistics] Ignore declarations of global variables
Reviewed by: djtodoro
Differential Revision: https://reviews.llvm.org/D73001
Kristina Bessonova [Thu, 9 Jan 2020 20:21:17 +0000 (22:21 +0200)]
[llvm-dwarfdump][Statistics] Ignore DW_TAG_subroutine_type in statistics
DW_TAG_subroutine_type is not really useful for statistics purposes, as it never
has location information. But it may contain DW_TAG_formal_parameter
children that generate number of parameters w/o location and decrease
'availability' metric significantly.
Reviewed by: djtodoro
Differential Revision: https://reviews.llvm.org/D72983
Kristina Bessonova [Tue, 14 Jan 2020 18:36:30 +0000 (20:36 +0200)]
[llvm-dwarfdump][Statistics] Distinguish functions/variables with same name across different CUs
Different variables and functions might have the same name in different CU.
To calculate 'Availability' metric more accurate (i.e. to avoid getting
availability above 100%), we need to have some additional logic to
distinguish between them.
The patch introduces a DIE identifier that consists of a function/variable name
and declaration information: a filename and a line number. This allows
distinguishing different functions/variables (different means declared in
different files/lines) with the same name, keeping duplicates counted
as duplicates.
Reviewed by: aprantl, djtodoro
Differential Revision: https://reviews.llvm.org/D72797
Derek Schuff [Sat, 23 Nov 2019 02:02:10 +0000 (18:02 -0800)]
[llvm-objcopy] Initial support for wasm in llvm-objcopy
Currently only supports simple copying, other operations to follow.
Reviewers: sbc100, alexshap, jhenderson
Differential Revision: https://reviews.llvm.org/D70930
Med Ismail Bennani [Tue, 28 Jan 2020 17:40:08 +0000 (18:40 +0100)]
Revert "[lldb/Target] Add Assert StackFrame Recognizer"
This reverts commit
03a6b858fde5c644ec16b1fddd8e10aa9ef3f0ad.
The test doesn't pass on Debian.
Konstantin Pyzhov [Tue, 28 Jan 2020 09:41:21 +0000 (04:41 -0500)]
Add missing clang tests for
6d614a82a4230ea69e322f56dc18dcbd815ed37b (AMDGPU MFMA built-ins)
Differential Revision: https://reviews.llvm.org/D72723
Florian Hahn [Tue, 28 Jan 2020 17:01:00 +0000 (09:01 -0800)]
[Matrix] Mark expressions shared between multiple remarks.
This patch adds support for explicitly highlighting sub-expressions
shared by multiple leaf nodes. For example consider the following
code
%shared.load = tail call <8 x double> @llvm.matrix.columnwise.load.v8f64.p0f64(double* %arg1, i32 %stride, i32 2, i32 4), !dbg !10, !noalias !10
%trans = tail call <8 x double> @llvm.matrix.transpose.v8f64(<8 x double> %shared.load, i32 2, i32 4), !dbg !10
tail call void @llvm.matrix.columnwise.store.v8f64.p0f64(<8 x double> %trans, double* %arg3, i32 10, i32 4, i32 2), !dbg !10
%load.2 = tail call <30 x double> @llvm.matrix.columnwise.load.v30f64.p0f64(double* %arg3, i32 %stride, i32 2, i32 15), !dbg !10, !noalias !10
%mult = tail call <60 x double> @llvm.matrix.multiply.v60f64.v8f64.v30f64(<8 x double> %trans, <30 x double> %load.2, i32 4, i32 2, i32 15), !dbg !11
tail call void @llvm.matrix.columnwise.store.v60f64.p0f64(<60 x double> %mult, double* %arg2, i32 10, i32 4, i32 15), !dbg !11
We have two leaf nodes (the 2 stores) and the first store stores %trans
which is also used by the matrix multiply %mult. We generate separate
remarks for each leaf (stores). To denote that parts are shared, the
shared expressions are marked as shared (), with a reference to the
other remark that shares it. The operation summary also denotes the
shared operations separately.
Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D72526
Med Ismail Bennani [Thu, 23 Jan 2020 14:11:53 +0000 (15:11 +0100)]
[lldb/Target] Add Assert StackFrame Recognizer
When a thread stops, this checks depending on the platform if the top frame is
an abort stack frame. If so, it looks for an assert stack frame in the upper
frames and set it as the most relavant frame when found.
To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a
"cooked" stop reason description. When the thread is about to stop, it checks
if the current frame is recognized, and if so, it fetches the recognized frame's
attributes and applies them.
rdar://
58528686
Differential Revision: https://reviews.llvm.org/D73303
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Jonathan Roelofs [Mon, 27 Jan 2020 01:16:57 +0000 (18:16 -0700)]
[llvm] Fix broken cases of 'CHECK[^:]*$' in tests
Florian Hahn [Tue, 28 Jan 2020 16:46:27 +0000 (08:46 -0800)]
[LV] Hoist code to mark conditional assumes as dead to caller (NFC).
This is a follow-up suggested in D73423. It is sufficient to just add
the conditional assumes to DeadInstructions once.
Konstantin Pyzhov [Tue, 28 Jan 2020 08:51:27 +0000 (03:51 -0500)]
Summary:
This CL adds clang declarations of built-in functions for AMDGPU MFMA intrinsics and instructions.
OpenCL tests for new built-ins are included.
Differential Revision: https://reviews.llvm.org/D72723
Andrew Ng [Wed, 22 Jan 2020 17:08:09 +0000 (17:08 +0000)]
[LLD] Avoid exiting with a locked mutex NFC
In ErrorHandler::error(), rearrange code to avoid calling exitLld with
the mutex locked. Acquire mutex lock when flushing the output streams in
exitLld.
Differential Revision: https://reviews.llvm.org/D73281
Alexey Bataev [Tue, 28 Jan 2020 16:19:45 +0000 (11:19 -0500)]
[OPENMP50]Check for lastprivate conditional updates in atomic
constructs.
Added analysis in atomic constrcuts to support checks for updates of
conditional lastprivate variables.
Michael Liao [Tue, 28 Jan 2020 16:35:52 +0000 (11:35 -0500)]
Fix warning of `-Wcast-qual`. NFC.
Florian Hahn [Tue, 28 Jan 2020 16:20:40 +0000 (08:20 -0800)]
[LV] Do not try to sink dead instructions.
Dead instructions do not need to be sunk. Currently we try and record
the recipies for them, but there are no recipes emitted for them and
there's nothing to sink. They can be removed from SinkAfter while
marking them for recording.
Fixes PR44634.
Reviewers: rengolin, hsaito, fhahn, Ayal, gilr
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D73423
Yaxun (Sam) Liu [Thu, 23 Jan 2020 22:30:07 +0000 (17:30 -0500)]
[HIP] Fix environment variable HIP_DEVICE_LIB_PATH
Currently device lib path set by environment variable HIP_DEVICE_LIB_PATH
does not work due to extra "-L" added to each entry.
This patch fixes that by allowing argument name to be empty in addDirectoryList.
Differential Revision: https://reviews.llvm.org/D73299
Pavel Labath [Tue, 28 Jan 2020 16:15:26 +0000 (17:15 +0100)]
Revert "[lldb/PDB] Use the new line table constructor"
This reverts commit
bb73210ba9f16c1516f564235c86cbddccd1bd6d due to
failures on the windows bot.
LLVM GN Syncbot [Tue, 28 Jan 2020 15:50:50 +0000 (15:50 +0000)]
[gn build] Port
a32f894f17b
Jonathan Roelofs [Fri, 24 Jan 2020 00:54:15 +0000 (17:54 -0700)]
[ADT] Remove more llvm::make_unique
https://reviews.llvm.org/D73316
Jonathan Roelofs [Sun, 26 Jan 2020 19:05:46 +0000 (12:05 -0700)]
[clang] Fix EOL whitespace. NFC
Kadir Cetinkaya [Thu, 23 Jan 2020 12:28:16 +0000 (13:28 +0100)]
[clang][CodeComplete] Support for designated initializers
Reviewers: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73271
Kostya Kortchinsky [Mon, 27 Jan 2020 22:03:21 +0000 (14:03 -0800)]
[scudo][standalone] Secondary & general other improvements
Summary:
This CL changes multiple things to improve performance (notably on
Android).We introduce a cache class for the Secondary that is taking
care of this mechanism now.
The changes:
- change the Secondary "freelist" to an array. By keeping free secondary
blocks linked together through their headers, we were keeping a page
per block, which isn't great. Also we know touch less pages when
walking the new "freelist".
- fix an issue with the freelist getting full: if the pattern is an ever
increasing size malloc then free, the freelist would fill up and
entries would not be used. So now we empty the list if we get to many
"full" events;
- use the global release to os interval option for the secondary: it
was too costly to release all the time, particularly for pattern that
are malloc(X)/free(X)/malloc(X). Now the release will only occur
after the selected interval, when going through the deallocate path;
- allow release of the `BatchClassId` class: it is releasable, we just
have to make sure we don't mark the batches containing batches
pointers as free.
- change the default release interval to 1s for Android to match the
current Bionic allocator configuration. A patch is coming up to allow
changing it through `mallopt`.
- lower the smallest class that can be released to `PageSize/64`.
Reviewers: cferris, pcc, eugenis, morehouse, hctim
Subscribers: phosek, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73507
Denis Khalikov [Tue, 28 Jan 2020 14:36:01 +0000 (09:36 -0500)]
[mlir][spirv] Add GroupNonUniform arithmetic operations.
Add GroupNonUniform arithmetic operations: FAdd, FMul, IMul.
Unify parser, printer, verifier for GroupNonUniform arithmetic
operations.
Differential Revision: https://reviews.llvm.org/D73491
Kadir Cetinkaya [Tue, 28 Jan 2020 11:24:45 +0000 (12:24 +0100)]
[clangd] Make bin/llvm-lit run standalone clangd tests
Summary:
Currently clangd lit tests can't be run in isolation because we don't
set some of the config parameters. This enables running
./bin/llvm-lit ../clang-tools-extra/clangd/test/
or any other test in that subdirectory.
Reviewers: sammccall
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73538
Nico Weber [Tue, 28 Jan 2020 15:09:52 +0000 (10:09 -0500)]
Prevent building with MSVC 14.24
MSVC 14.24 miscompiles some of LLVM's code, which makes at least these tests fail:
LLVM :: MC/MachO/gen-dwarf-cpp.s
LLVM :: MC/MachO/gen-dwarf-macro-cpp.s
LLVM :: MC/MachO/gen-dwarf-producer.s
LLVM :: MC/MachO/gen-dwarf.s
It seems better to diagnose that at build time. Since both the previous
and the next version have a fix, this might be good enough and we might
not need a real workaround. (We ran into this at
https://crbug.com/1045948)
If you hit this, use either a newer or an older version of MSVC,
or use clang-cl as host compiler.
Differential Revision: https://reviews.llvm.org/D73550
Jonathan Coe [Tue, 28 Jan 2020 14:46:27 +0000 (14:46 +0000)]
[clang-format] Handle quotes and escaped braces in C# interpolated strings
Summary:
This addresses issues raised in https://bugs.llvm.org/show_bug.cgi?id=44454.
There are outstanding issues with multi-line verbatim strings in C# that will be addressed in a follow-up PR.
Reviewers: krasimir, MyDeveloperDay
Reviewed By: krasimir, MyDeveloperDay
Subscribers: MyDeveloperDay
Tags: #clang-format
Differential Revision: https://reviews.llvm.org/D73492
Nico Weber [Tue, 28 Jan 2020 14:27:54 +0000 (09:27 -0500)]
Revert "[Clang] Warn about 'z' printf modifier in old MSVC."
This reverts commit
fe0d1b6a8ac5048b8007e5e7cc2aeb4e3291bda0.
Makes Analysis/taint-generic.c fail on some Windows systems.
Victor Huang [Tue, 28 Jan 2020 14:22:53 +0000 (08:22 -0600)]
[PowerPC][Future] Add pld and pstd to future CPU
Add the prefixed instructions pld and pstd to future CPU. These are load and
store instructions that require new operand types that are 34 bits. This patch
adds the two instructions as well as the operand types required.
Note that this patch also makes a minor change to tablegen to account for the
fact that some instructions are going to require shifts greater than 31 bits
for the new 34 bit instructions.
Differential Revision: https://reviews.llvm.org/D72574
Whitney Tsang [Tue, 28 Jan 2020 03:50:33 +0000 (03:50 +0000)]
[CodeMoverUtils] Improve IsControlFlowEquivalent.
Summary:
Currently IsControlFlowEquivalent determine if two blocks are control
flow equivalent by checking if A dominates B and B post dominates A.
There exists blocks that are control flow equivalent even if they don't
satisfy the A dominates B and B post dominates A condition.
For example,
if (cond)
A
if (cond)
B
In the PR, we determine if two blocks are control flow equivalent by
also checking if the two sets of conditions A and B depends on are
equivalent.
Reviewer: jdoerfert, Meinersbur, dmgreen, etiotto, bmahjour, fhahn,
hfinkel, kbarton
Reviewed By: fhahn
Subscribers: hiraditya, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D71578
Pavel Labath [Tue, 28 Jan 2020 14:03:09 +0000 (15:03 +0100)]
[lldb/PDB] Use the new line table constructor
The old method of adding line sequences one by one can easily go
quadratic if the sequences are not perfectly sorted. The equivalent
change in DWARF brought a considerable improvement in line table
parsing. It is not clear if the same will be the case for PDB, but this
does bring us a step closer towards removing the dangerous API.
Wang, Pengfei [Tue, 28 Jan 2020 14:05:15 +0000 (22:05 +0800)]
Fix sphinx build bot failure. NFCI.
Nico Weber [Tue, 28 Jan 2020 14:03:27 +0000 (09:03 -0500)]
Revert "PR44684: Look through parens and similar constructs when determining"
This reverts commit
af80b8ccc5772c14920d4554b7ca7e15f2fad1c4.
It broke clang-tidy/checkers/modernize-use-uncaught-exceptions.cpp in
check-clang-tools on macOS and Windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13976/steps/stage%201%20check/logs/stdio
Sam Parker [Tue, 28 Jan 2020 13:06:07 +0000 (13:06 +0000)]
[NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>
Nathan [Tue, 28 Jan 2020 13:12:08 +0000 (13:12 +0000)]
[ASTMatchers] Add cxxNoexceptExpr AST matcher
Summary: Adds a cxxNoexceptExpr matcher that matches the [[ https://en.cppreference.com/w/cpp/language/noexcept | noexcept operator ]].
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: merge_guards_bot, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73439
Benjamin Kramer [Tue, 28 Jan 2020 12:51:38 +0000 (13:51 +0100)]
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
This makes the types almost seamlessly interchangeable in C++17
codebases. Eventually we want to replace StringRef with the standard
type, but that requires C++17 being the default and a huge refactoring
job as StringRef has a lot more functionality.
Pavel Labath [Tue, 28 Jan 2020 12:42:34 +0000 (13:42 +0100)]
Revert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)"
This reverts commit
1b12766883006b8aa9d1ff744e57317647aa052a because of
breaking the mac test suite.
I'm not certain this is the cause because of a concurrent build breakage
which masked this problem, but the failure messages are related to
symbol lookup, which makes this very likely.
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[FPEnv] Add pragma FP_CONTRACT support under strict FP.
Summary: Support pragma FP_CONTRACT under strict FP.
Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3
Subscribers: hiraditya, jdoerfert, cfe-commits, llvm-commits, LuoYuanke
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D72820
Miloš Stojanović [Mon, 27 Jan 2020 15:29:26 +0000 (16:29 +0100)]
[mips][NFC] Remove unused instruction formats
`BranchBase` unused sice: rL170663
`FI` unsused since: rL170954
`FFI` unused since: rL190221
Differential revision: https://reviews.llvm.org/D73489
Wang, Pengfei [Wed, 15 Jan 2020 11:08:38 +0000 (19:08 +0800)]
[X86] Add combination for fma and fneg on X86 under strict FP.
Summary: X86 has instructions to calculate fma and fneg at the same time. But we combine the fneg and fma only when fneg is the source operand under strict FP.
Reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3
Subscribers: LuoYuanke, llvm-commits, cfe-commits, jdoerfert, hiraditya
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72824
Peter Smith [Thu, 23 Jan 2020 19:03:25 +0000 (19:03 +0000)]
[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols
ELF for the ARM architecture requires linkers to provide
interworking for symbols that are of type STT_FUNC. Interworking for
other symbols must be encoded directly in the object file. LLD was always
providing interworking, regardless of the symbol type, this breaks some
programs that have branches from Thumb state targeting STT_NOTYPE symbols
that have bit 0 clear, but they are in fact internal labels in a Thumb
function. LLD treats these symbols as ARM and inserts a transition to Arm.
This fixes the problem for in range branches, R_ARM_JUMP24,
R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19. This is expected to be the vast
majority of problem cases as branching to an internal label close to the
function.
There is at least one follow up patch required.
- R_ARM_CALL and R_ARM_THM_CALL may do interworking via BL/BLX
substitution.
In theory range-extension thunks can be altered to not change state when
the symbol type is not STT_FUNC. I will need to check with ld.bfd to see if
this is the case in practice.
Fixes (part of) https://github.com/ClangBuiltLinux/linux/issues/773
Differential Revision: https://reviews.llvm.org/D73474
Peter Smith [Tue, 28 Jan 2020 11:22:48 +0000 (11:22 +0000)]
[LLD][ELF][ARM] clang-format function signature [NFC]
ARM::needsThunk had gone over 80 characters, run clang-format over it to
prevent it wrapping.
James Henderson [Tue, 28 Jan 2020 11:49:30 +0000 (11:49 +0000)]
Revert "[DebugInfo] Make most debug line prologue errors non-fatal to parsing"
This reverts commit
b94191fecdbadc18b342a27df1109754edcb8c4b.
The change broke both an LLD test and the LLDB build.