Commit Graph

340782 Commits

Author SHA1 Message Date
Benjamin Kramer 05c19705d8 [tblgen] Fix implicit conversion only diagnosed by g++ 6 2020-01-29 00:25:44 +01:00
Francis Visoiu Mistrih b1a8189d7d [NFC] Fix comment typo 2020-01-28 15:23:28 -08:00
Jonas Devlieghere 00d834e087 Fix more implicit conversions 2020-01-28 15:19:27 -08:00
Benjamin Kramer a153d78c7e [Driver] Fix implicit conversion guarded by #ifdef _WIN32 2020-01-29 00:18:45 +01:00
Benjamin Kramer c9909c22fe Fix implicit conversions in example code. 2020-01-29 00:17:35 +01:00
Jonas Devlieghere 9a8d42e608 [lldb/Plugin] Fix implicit conversion in GDBRemote 2020-01-28 15:16:56 -08:00
Jonas Devlieghere e9326ed906 [lldb/Reproducer] s/nullptr_t/std::nullptr_t/
Fixes error: unknown type name 'nullptr_t'; did you mean
'std::nullptr_t'.
2020-01-28 15:15:13 -08:00
Benjamin Kramer 19580c3755 Fix implicit conversion in the lldb Python plugin 2020-01-29 00:07:50 +01:00
Jonas Devlieghere 620f5faf1f [lldb/Reproducer] Include result in recording statements
Include the return value in the recording log statements. This helps
diagnose uninstrumented (copy assignment) constructors.
2020-01-28 15:03:13 -08:00
Benjamin Kramer 159709f04f [Support] Fix implicit std::string conversions on Win32. 2020-01-29 00:02:26 +01:00
Benjamin Kramer 777180a32b [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.
2020-01-28 23:47:07 +01:00
Shoaib Meenai 076da521f3 [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
2020-01-28 14:36:24 -08:00
Shoaib Meenai d8f6950828 [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
2020-01-28 14:36:19 -08:00
Shoaib Meenai 2e745ba6b0 [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
2020-01-28 14:36:14 -08:00
Benjamin Kramer adcd026838 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.
2020-01-28 23:25:25 +01:00
Alex Langford 5eaf44f99f [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
2020-01-28 14:11:53 -08:00
Danilo Carvalho Grael 1f85dfb2af [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
2020-01-28 17:15:33 -05:00
Jessica Paquette dba29f7c3b [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
2020-01-28 14:00:31 -08:00
Francis Visoiu Mistrih 4e799ada58 [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
2020-01-28 13:59:08 -08:00
Alex Langford c4f6fbe971 [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.
2020-01-28 13:40:49 -08:00
Mircea Trofin 7f434b91a9 [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
2020-01-28 13:38:45 -08:00
Michael Spang a2fb2c0ddc [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
2020-01-28 13:26:18 -08:00
Hans Wennborg eaabaf7e04 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 2af74e27ed.
2020-01-28 22:25:07 +01:00
Jonas Devlieghere 8e21d7b924 [lldb/Reproducer] Include deserialized value in log statement
Extend the replay log statement to include the deserialized value.
2020-01-28 13:24:01 -08:00
Michał Górny 6dea61215d [lldb] [test] Restrict x86-64-write register test to x86-64 2020-01-28 22:15:23 +01:00
Nico Weber 776937c3e8 [gn build] (manually) port 90a10f00ff 2020-01-28 16:00:54 -05:00
Nicolas Vasilache 1d58a7c82f [mlir][Linalg][doc] Add Design Document for the Linalg Dialect 2020-01-28 15:48:04 -05:00
Alina Sbirlea 4aa8cdfeeb [LoopUnrollAndJamPass] Clean unnecessary includes. [NFCI] 2020-01-28 12:31:08 -08:00
Whitney Tsang cd0cff4392 [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
2020-01-28 20:24:23 +00:00
Petr Hosek 127d3abf25 [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
2020-01-28 12:07:03 -08:00
Alexandre Ganea b8c39e9462 Fix compiling with clang-cl inside a Visual Studio 2019 16.4 command prompt.
This was introduced by 0d17410e91 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).
2020-01-28 14:57:57 -05:00
Sanjay Patel 7a717d82ff [InstCombine] refactor foldVectorCmp(); NFC
We can handle other patterns here as shown in PR44588.
2020-01-28 14:40:48 -05:00
Petr Hosek 56b7f595d2 [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
2020-01-28 11:39:21 -08:00
Ted Woodward 04488c485a 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
2020-01-28 13:36:06 -06:00
Roland McGrath 90a10f00ff [lsan] Support LeakSanitizer runtime on Fuchsia
Support LeakSanitizer runtime on Fuchsia.

Patch By: mcgrathr

Differential Revision: https://reviews.llvm.org/D72887
2020-01-28 11:34:53 -08:00
Roland McGrath 2b0e6fe2e2 [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
2020-01-28 11:32:08 -08:00
Ahmed Taei 16e82d855a [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
2020-01-28 11:21:56 -08:00
River Riddle 60b8842084 [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
2020-01-28 11:20:54 -08:00
David Blaikie b96e6859c9 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.
2020-01-28 11:07:47 -08:00
Fangrui Song e11b709b19 [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
2020-01-28 11:04:04 -08:00
Kostya Kortchinsky a1f6ff2681 [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
2020-01-28 11:03:39 -08:00
LLVM GN Syncbot b8461fc0c7 [gn build] Port 2c03c899d5 2020-01-28 18:59:31 +00:00
Hiroshi Yamauchi 2c03c899d5 [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
2020-01-28 10:58:46 -08:00
Yaxun (Sam) Liu b8d9ac0870 Fix test hip-device-libs.hip 2020-01-28 13:58:18 -05:00
Jonas Devlieghere 3065ef0bf8 [lldb/Bindings] Sort headers in headers.swig 2020-01-28 10:58:07 -08:00
Kristina Bessonova 4b0a7fe008 [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
2020-01-28 20:52:20 +02:00
Kristina Bessonova 5499e2f455 [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
2020-01-28 20:52:20 +02:00
Kristina Bessonova 57839e5178 [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
2020-01-28 20:52:19 +02:00
Sanjay Patel 276a6b8889 [InstCombine] add tests for cmp with splat operand and splat constant; NFC
See PR44588:
https://bugs.llvm.org/show_bug.cgi?id=44588
2020-01-28 13:42:20 -05:00
LLVM GN Syncbot e7d5a8d0b4 [gn build] Port a928d127a5 2020-01-28 18:39:09 +00:00