platform/upstream/llvm.git
3 years ago[Remarks] Emit remarks for "auto-init" !annotations
Francis Visoiu Mistrih [Wed, 24 Feb 2021 19:17:19 +0000 (11:17 -0800)]
[Remarks] Emit remarks for "auto-init" !annotations

Using the !annotation metadata, emit remarks pointing to code added by
`-ftrivial-auto-var-init` that survived the optimizer.

Example:

```
auto-init.c:4:7: remark: Initialization inserted by -ftrivial-auto-var-init. [-Rpass-missed=annotation-remarks]
  int buf[1024];
      ^
```

The tests are testing various situations like calls/stores/other
instructions, with debug locations, and extra debug information on
purpose: more patches will come to improve the reporting to make it more
user-friendly, and these tests will show how the reporting evolves.

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

3 years agoAdd more historic DWARF vendor extensions
Adrian Prantl [Wed, 24 Feb 2021 01:52:21 +0000 (17:52 -0800)]
Add more historic DWARF vendor extensions

The maintainer of libdwarf kindly provided this patch with a bunch of
historic DWARF extensions that are missing from Dwarf.def. This list
is helpful to avoid potential conflicts in the user-defined vendor
extension space in the future.

Patch by David Anderson!

[Relanded with an updated test.]

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

3 years ago[Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.
Zequan Wu [Wed, 17 Feb 2021 02:45:56 +0000 (18:45 -0800)]
[Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

It would be beneficial to allow not_tail_called attribute to be applied to
virtual functions. I don't see any drawback of allowing this.

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

3 years agoBPF: Implement TTI.getCmpSelInstrCost() properly
Yonghong Song [Wed, 24 Feb 2021 18:02:48 +0000 (10:02 -0800)]
BPF: Implement TTI.getCmpSelInstrCost() properly

The Select insn in BPF is expensive as BPF backend
needs to resolve with conditionals.  This patch set
the getCmpSelInstrCost() to SCEVCheapExpansionBudget
for Select insn to prevent some Select insn related
optimizations.

This change is motivated during bcc code review for
   https://github.com/iovisor/bcc/pull/3270
where IndVarSimplifyPass eventually caused generating
the following asm code:
  ;       for (i = 0; (i < VIRTIO_MAX_SGS) && (i < num); i++) {
      14:       16 05 40 00 00 00 00 00 if w5 == 0 goto +64 <LBB0_6>
      15:       bc 51 00 00 00 00 00 00 w1 = w5
      16:       04 01 00 00 ff ff ff ff w1 += -1
      17:       67 05 00 00 20 00 00 00 r5 <<= 32
      18:       77 05 00 00 20 00 00 00 r5 >>= 32
      19:       a6 01 01 00 05 00 00 00 if w1 < 5 goto +1 <LBB0_4>
      20:       b7 05 00 00 06 00 00 00 r5 = 6
  00000000000000a8 <LBB0_4>:
      21:       b7 02 00 00 00 00 00 00 r2 = 0
      22:       b7 01 00 00 00 00 00 00 r1 = 0
  ;       for (i = 0; (i < VIRTIO_MAX_SGS) && (i < num); i++) {
      23:       7b 1a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r1
      24:       7b 5a c0 ff 00 00 00 00 *(u64 *)(r10 - 64) = r5
Note that insn #15 has w1 = w5 and w1 is refined later but r5(w5) is
eventually saved on stack at insn #24 for later use. This cause
later verifier failures.

With this change, IndVarSimplifyPass won't do the above
transformation any more.

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

3 years ago[www] Add cxx_status tracking for C++23.
Richard Smith [Thu, 25 Feb 2021 22:47:02 +0000 (14:47 -0800)]
[www] Add cxx_status tracking for C++23.

Convert the list of standards to a table; it's starting to get unwieldy.

3 years ago[MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while)
Rob Suderman [Thu, 25 Feb 2021 22:34:49 +0000 (14:34 -0800)]
[MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while)

Includes a lowering for tosa.const, tosa.if, and tosa.while to Standard/SCF dialects. TosaToStandard is
used for constant lowerings and TosaToSCF handles the if/while ops.

Reviewed By: silvas

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

3 years agoFix constructor declarations that are invalid in C++20 onwards.
Richard Smith [Tue, 23 Feb 2021 22:07:13 +0000 (14:07 -0800)]
Fix constructor declarations that are invalid in C++20 onwards.

Under C++ CWG DR 2237, the constructor for a class template C must be
written as 'C(...)' not as 'C<T>(...)'. This fixes a build failure with
GCC in C++20 mode.

In passing, remove some other redundant '<T>' qualification from the
affected classes.

3 years ago[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms
Martin Storsjö [Thu, 25 Feb 2021 12:12:46 +0000 (14:12 +0200)]
[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms

This avoids having to query pathconf for a max size for
preallocating a buffer for the return value.

This is an extension to the POSIX getcwd() spec.

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

3 years ago[libcxx] [test] Add a MinGW target
Martin Storsjö [Thu, 22 Oct 2020 18:33:10 +0000 (21:33 +0300)]
[libcxx] [test] Add a MinGW target

This can't easily be autodetected (unless LIBCXX_TARGET_TRIPLE is
specified, or unless we query what the compiler's default target is,
which only is supported by clang), but can be chosen manually via
LIBCXX_TARGET_INFO.

This chooses mingw style lib naming, and uses -nostdlibc++ instead
of -nodefaultlib -nostdlib (as the latter requires specifying a lot of
details manually - this is done in the cmake config though).

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

3 years ago[libcxx] [cmake] Add asm to the runtimes build languages
Martin Storsjö [Wed, 24 Feb 2021 13:51:24 +0000 (15:51 +0200)]
[libcxx] [cmake] Add asm to the runtimes build languages

This fixes building libunwind with a new enough version of cmake.

(libunwind treats its asm sources as C depending on the cmake version
on some platforms; this fixes builds when such workarounds aren't used,
when cmake treats asm correctly on its own.)

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

3 years ago[libcxx] [test] Ifdef out uses of create_fifo on windows
Martin Storsjö [Mon, 19 Oct 2020 07:57:36 +0000 (10:57 +0300)]
[libcxx] [test] Ifdef out uses of create_fifo on windows

Restructure code in directory_entry.obs/file_type_obs.pass.cpp
and directory_entry.obs/hard_link_count.pass.cpp to reduce the
amount of ifdeffery needed.

In file_type_obs.pass.cpp, we can't inline the calls to
env.create_* into the lambda calls (e.g. "test_path(env.create_*())"),
because the lambda removes the referenced file, and the hardlink
must be created while the earlier test file exists.

In hard_link_count.pass.cpp, move restoration of the original
directory permissions to the end of the lambda, so that new
directory entries can be created after the lambda has run once.

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

3 years ago[libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const...
Martin Storsjö [Thu, 25 Feb 2021 10:53:39 +0000 (12:53 +0200)]
[libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char*

On Windows, path::value_type is wchar_t, so one can't pass the return
value of path::c_str() directly to std::remove().

This matches what was done for tests under std/input.output/filesystems
in 81db3c31aafec72f1cfec2a9da4381ece7f97a29 and
3784bdf2176f38cc30134fab776efb43506c0c54.

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

3 years ago[PM] Show the pass argument in pre/post-pass IR dumps
Nicolas Guillemot [Thu, 25 Feb 2021 19:56:48 +0000 (11:56 -0800)]
[PM] Show the pass argument in pre/post-pass IR dumps

This patch adds each pass' pass argument in the header for IR dumps.
For example:

Before:

```
    *** IR Dump Before InstructionSelect ***
```

After:

```
    *** IR Dump Before InstructionSelect (instruction-select) ***
```

The goal is to make it easier to know what argument to pass to
command line options like `debug-only` or `run-pass` to further
investigate a given pass.

3 years ago[OpenMP] libomp minor cleanup
AndreyChurbanov [Thu, 25 Feb 2021 21:44:51 +0000 (00:44 +0300)]
[OpenMP] libomp minor cleanup

Cleanup changes:
- check value read from file;
- remove dead code;
- make unsigned variable to read hexadecimal number to;
- add debug assertion to check ref count.

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

3 years ago[lldb/Core] Change large function threshold variable into a setting.
Med Ismail Bennani [Thu, 25 Feb 2021 21:28:51 +0000 (21:28 +0000)]
[lldb/Core] Change large function threshold variable into a setting.

This patch replaces the static large function threshold variable with a
global debugger setting (`stop-disassembly-max-size`).

The default threshold is now set to 32KB (instead of 8KB) and can be modified.

rdar://74726362

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
3 years ago[NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor...
Dan Liew [Sat, 13 Feb 2021 00:10:33 +0000 (16:10 -0800)]
[NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor-kind=` flag.

This change simplifies `clang/lib/Frontend/CompilerInvocation.cpp`
because we no longer need to manually parse the flag and set codegen
options in the frontend. However, we still need to manually parse the
flag in the driver because:

* The marshalling infrastructure doesn't operate there.
* We need to do some platform specific checks in the driver
  that will likely never be supported by any kind of marshalling
  infrastructure.

rdar://71609176

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

3 years ago[OpenMP] libomp: fix ittnotify stack stitching for teams construct
AndreyChurbanov [Thu, 25 Feb 2021 21:23:24 +0000 (00:23 +0300)]
[OpenMP] libomp: fix ittnotify stack stitching for teams construct

Stitching id could be overridden causing reference of destroyed object
when number of teams is 1. The patch separates stitching id store
location for teams and parallel nested in teams.

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

3 years agoRewrite MSVC toolchain discovery with VFS
Arthur Eubanks [Thu, 25 Feb 2021 03:58:40 +0000 (19:58 -0800)]
Rewrite MSVC toolchain discovery with VFS

This fixes an issue where the toolchain discovery doesn't respect the
VFS's current working directory, specifically clangd not respecting a
relative /winsysroot.

Reviewed By: rnk

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

3 years ago[clang,NFC] Fix typos in file headers
Vitaly Buka [Thu, 25 Feb 2021 20:45:46 +0000 (12:45 -0800)]
[clang,NFC] Fix typos in file headers

3 years ago[scudo][standalone] Compact pointers for Caches/Batches
Kostya Kortchinsky [Wed, 10 Feb 2021 18:17:18 +0000 (10:17 -0800)]
[scudo][standalone] Compact pointers for Caches/Batches

This CL introduces configuration options to allow pointers to be
compacted in the thread-specific caches and transfer batches. This
offers the possibility to have them use 32-bit of space instead of
64-bit for the 64-bit Primary, thus cutting the size of the caches
and batches by nearly half (and as such the memory used in size
class 0). The cost is an additional read from the region information
in the fast path.

This is not a new idea, as it's being used in the sanitizer_common
64-bit primary. The difference here is that it is configurable via
the allocator config, with the possibility of not compacting at all.

This CL enables compacting pointers in the Android and Fuchsia default
configurations.

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

3 years ago[CodeGen] Call ConvertTypeForMem instead of ConvertType
Akira Hatanaka [Thu, 25 Feb 2021 20:11:18 +0000 (12:11 -0800)]
[CodeGen] Call ConvertTypeForMem instead of ConvertType

This fixes a crash that occurs when the type passed to the method is
`_Bool`.

rdar://74493389

3 years ago[Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with...
Dan Liew [Fri, 12 Feb 2021 02:56:14 +0000 (18:56 -0800)]
[Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with `-mkernel` or `-fapple-kext`.

rdar://71609176

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

3 years ago[Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option.
Dan Liew [Wed, 10 Feb 2021 07:02:50 +0000 (23:02 -0800)]
[Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option.

The new `-fsanitize-address-destructor-kind=` option allows control over how module
destructors are emitted by ASan.

The new option is consumed by both the driver and the frontend and is propagated into
codegen options by the frontend.

Both the legacy and new pass manager code have been updated to consume the new option
from the codegen options.

It would be nice if the new utility functions (`AsanDtorKindToString` and
`AsanDtorKindFromString`) could live in LLVM instead of Clang so they could be
consumed by other language frontends. Unfortunately that doesn't work because
the clang driver doesn't link against the LLVM instrumentation library.

rdar://71609176

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

3 years agoAdd a nullptr check.
Adrian Prantl [Thu, 25 Feb 2021 19:54:58 +0000 (11:54 -0800)]
Add a nullptr check.

This doesn't actually reproduce with a dbg.declare(i8* null, ...)
which produces a non-null null Value, but I have seen this show up in
crash logs. I'm suspecting that there may be another pass forcibly
setting the operand to a nullptr.

3 years ago[SanitizerCoverage] Drop !associated on metadata sections
Fangrui Song [Thu, 25 Feb 2021 19:59:23 +0000 (11:59 -0800)]
[SanitizerCoverage] Drop !associated on metadata sections

In SanitizerCoverage, the metadata sections (`__sancov_guards`,
`__sancov_cntrs`, `__sancov_bools`) are referenced by functions.  After
inlining, such a `__sancov_*` section can be referenced by more than one
functions, but its sh_link still refers to the original function's section.
(Note: a SHF_LINK_ORDER section referenced by a section other than its linked-to
section violates the invariant.)

If the original function's section is discarded (e.g. LTO internalization +
`ld.lld --gc-sections`), ld.lld may report a `sh_link points to discarded section` error.

This above reasoning means that `!associated` is not appropriate to be called by
an inlinable function. Non-interposable functions are inline candidates, so we
have to drop `!associated`. A `__sancov_pcs` is not referenced by other sections
but is expected to parallel a metadata section, so we have to make sure the two
sections are retained or discarded at the same time. A section group does the
trick.  (Note: we have a module ctor, so `getUniqueModuleId` guarantees to
return a non-empty string, and `GetOrCreateFunctionComdat` guarantees to return
non-null.)

For interposable functions, we could keep using `!associated`, but
LTO can change the linkage to `internal` and allow such functions to be inlinable,
so we have to drop `!associated`, too. To not interfere with section
group resolution, we need to use the `noduplicates` variant (section group flag 0).
(This allows us to get rid of the ModuleID parameter.)
In -fno-pie and -fpie code (mostly dso_local), instrumented interposable
functions have WeakAny/LinkOnceAny linkages, which are rare. So the
section group header overload should be low.

This patch does not change the object file output for COFF (where `!associated` is ignored).

Reviewed By: morehouse, rnk, vitalybuka

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

3 years ago[libc++] Fix incorrect forwarding in tuple's assignment operator
Louis Dionne [Wed, 24 Feb 2021 19:53:21 +0000 (14:53 -0500)]
[libc++] Fix incorrect forwarding in tuple's assignment operator

Also, add a bunch of tests for tuple and pair's assignment operators
involving reference types.

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

3 years ago[mlir] Mark OpState::getAttrs() deprecated.
Christian Sigg [Thu, 25 Feb 2021 18:35:53 +0000 (19:35 +0100)]
[mlir] Mark OpState::getAttrs() deprecated.

Fix call sites.

The method will be removed 2 weeks later.

Reviewed By: rriddle

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

3 years agoadds more checks to -Wfree-nonheap-object
Christopher Di Bella [Fri, 12 Feb 2021 00:24:16 +0000 (00:24 +0000)]
adds more checks to -Wfree-nonheap-object

This commit adds checks for the following:

* labels
* block expressions
* random integers cast to `void*`
* function pointers cast to `void*`

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

3 years ago[test] Improve SanitizerCoverage tests
Fangrui Song [Thu, 25 Feb 2021 19:20:40 +0000 (11:20 -0800)]
[test] Improve SanitizerCoverage tests

3 years ago[OpenMP] Fix accidental addition of use omp_lib_kinds
Peyton, Jonathan L [Thu, 25 Feb 2021 18:47:33 +0000 (12:47 -0600)]
[OpenMP] Fix accidental addition of use omp_lib_kinds

Fortran header accidentally had use omp_lib_kinds added inside a
subroutine and function. This patch removes the lines.

3 years ago[lld-macho] Basic support for linkage and visibility attributes in LTO
Jez Ng [Thu, 25 Feb 2021 18:27:40 +0000 (13:27 -0500)]
[lld-macho] Basic support for linkage and visibility attributes in LTO

When parsing bitcode, convert LTO Symbols to LLD Symbols in order to perform
resolution. The "winning" symbol will then be marked as Prevailing at LTO
compilation time. This is similar to what the other LLD ports do.

This change allows us to handle `linkonce` symbols correctly, and to deal with
duplicate bitcode symbols gracefully. Previously, both scenarios would result in
an assertion failure inside the LTO code, complaining that multiple Prevailing
definitions are not allowed.

While at it, I also added basic logic around visibility. We don't do anything
useful with it yet, but we do check that its value is valid. LLD-ELF appears to
use it only to set FinalDefinitionInLinkageUnit for LTO, which I think is just a
performance optimization.

From my local experimentation, the linker itself doesn't seem to do anything
differently when encountering linkonce / linkonce_odr / weak / weak_odr. So I've
only written a test for one of them. LLD-ELF has more, but they seem to mostly
be testing the intermediate bitcode output of their LTO backend...? I'm far from
an expert here though, so I might very well be missing things.

Reviewed By: #lld-macho, MaskRay, smeenai

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

3 years agoOption to ignore llvm[.compiler].used uses in hasAddressTaken()
Stanislav Mekhanoshin [Thu, 4 Feb 2021 23:35:43 +0000 (15:35 -0800)]
Option to ignore llvm[.compiler].used uses in hasAddressTaken()

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

3 years ago[DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode()
Simon Pilgrim [Thu, 25 Feb 2021 17:49:01 +0000 (17:49 +0000)]
[DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode()

As discussed on D97276 we should be able to always do this in node creation, we don't need a combine.

3 years agoOption to ignore assume like intrinsic uses in hasAddressTaken()
Stanislav Mekhanoshin [Thu, 4 Feb 2021 22:38:40 +0000 (14:38 -0800)]
Option to ignore assume like intrinsic uses in hasAddressTaken()

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

3 years agoSupport `#pragma clang section` directives on MachO targets
Jon Roelofs [Tue, 23 Feb 2021 16:01:27 +0000 (08:01 -0800)]
Support `#pragma clang section` directives on MachO targets

rdar://59560986

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

3 years ago[X86] Remove custom lowering of vXi1 ADD/SUB now that they are canonicalized to XOR...
Craig Topper [Thu, 25 Feb 2021 16:52:39 +0000 (08:52 -0800)]
[X86] Remove custom lowering of vXi1 ADD/SUB now that they are canonicalized to XOR in getNode.

Reviewed By: RKSimon

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

3 years ago[AMDGPU] require s-memtime-inst for __builtin_amdgcn_s_memtime
Stanislav Mekhanoshin [Wed, 24 Feb 2021 23:14:30 +0000 (15:14 -0800)]
[AMDGPU] require s-memtime-inst for __builtin_amdgcn_s_memtime

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

3 years ago[SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class
Rong Xu [Sat, 20 Feb 2021 00:03:20 +0000 (16:03 -0800)]
[SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class

This patch makes SampleProfileLoaderBaseImpl a template class so it
can be used in CodeGen transformation.

Noticeable changes:
 * use one template parameter and use IRTraits to get other used
   types an type specific functions.
 * remove the temporary "inline" keywords in previous refactor
   patch.
 * change the template function findEquivalencesFor to a regular
   function. This function has a single caller with type of
   PostDominatorTree. It's simpler to use the type directly
   because MachinePostDominatorTree is not a derived type of
   template DominatorTreeBase.

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

3 years ago[mlir] Check 'iter_args' in 'isLoopParallel' utility
Diego Caballero [Thu, 25 Feb 2021 15:56:51 +0000 (17:56 +0200)]
[mlir] Check 'iter_args' in 'isLoopParallel' utility

Fix 'isLoopParallel' utility so that 'iter_args' is taken into account
and loops with loop-carried dependences are not classified as parallel.

Reviewed By: tungld, vinayaka-polymage

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

3 years ago[MLIR][affine-loop-fusion] Handle defining ops between the source and dest loops
Tung D. Le [Thu, 25 Feb 2021 16:00:11 +0000 (18:00 +0200)]
[MLIR][affine-loop-fusion] Handle defining ops between the source and dest loops

This patch handles defining ops between the source and dest loop nests, and prevents loop nests with `iter_args` from being fused.

If there is any SSA value in the dest loop nest whose defining op has dependence from the source loop nest, we cannot fuse the loop nests.

If there is a `affine.for` with `iter_args`, prevent it from being fused.

Reviewed By: dcaballe, bondhugula

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

3 years ago[CodeGen] Format code comment to 80 columns. NFC.
Fraser Cormack [Thu, 25 Feb 2021 15:55:21 +0000 (15:55 +0000)]
[CodeGen] Format code comment to 80 columns. NFC.

3 years ago[IndVars] Add test cases inspired by PR48965.
Florian Hahn [Thu, 25 Feb 2021 15:32:50 +0000 (15:32 +0000)]
[IndVars] Add test cases inspired by PR48965.

3 years ago[RISCV] Teach CleanupVSETVLI to remove 'vsetvli zero, zero, vtype' when the vtype...
Craig Topper [Thu, 25 Feb 2021 15:43:55 +0000 (07:43 -0800)]
[RISCV] Teach CleanupVSETVLI to remove 'vsetvli zero, zero, vtype' when the vtype matches the previous vsetvli or vsetivli

Reviewed By: frasercrmck, arcbbb

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

3 years ago[arm builtin crosscompile docs] add COMPILER_RT_BUILD_MEMPROF=OFF
Nico Weber [Thu, 25 Feb 2021 15:44:50 +0000 (10:44 -0500)]
[arm builtin crosscompile docs] add COMPILER_RT_BUILD_MEMPROF=OFF

Reported by artok on irc, thanks!

3 years ago[arm builtin crosscompile docs] alphabetize flags, no behavior change
Nico Weber [Thu, 25 Feb 2021 15:44:16 +0000 (10:44 -0500)]
[arm builtin crosscompile docs] alphabetize flags, no behavior change

3 years ago[RISCV] Add isel pattern to match X > -1 to bgez.
Craig Topper [Thu, 25 Feb 2021 15:30:50 +0000 (07:30 -0800)]
[RISCV] Add isel pattern to match X > -1 to bgez.

Reviewed By: asb

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

3 years agoFix a test case that should check whether or not it is passed into lld
Albion Fung [Thu, 25 Feb 2021 15:31:40 +0000 (10:31 -0500)]
Fix a test case that should check whether or not it is passed into lld

This test case was causing a PowerPC buildbot to fail as it happened to
be named lld-multistage,
which matches with the original regex and therefore fails the check-not.
This should better represent the desired check.

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

3 years ago[clang][sema] Ignore xor-used-as-pow if both sides are macros
Timm Bäder [Thu, 25 Feb 2021 07:18:45 +0000 (08:18 +0100)]
[clang][sema] Ignore xor-used-as-pow if both sides are macros

This happens in codebases a lot, which use xor where both sides are
macros. Using xor in that case is not the common error-prone 2^6 code
that the warning was introduced for.

Don't diagnose such a use of xor.

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

3 years ago[mlir][NFC] Add missing namespace qualifier to ODS generated code
Vladislav Vinogradov [Sun, 21 Feb 2021 12:20:16 +0000 (15:20 +0300)]
[mlir][NFC] Add missing namespace qualifier to ODS generated code

Use `::mlir::Region` inside array ref for `VariadicRegion`.

Reviewed By: rriddle

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

3 years ago[RISCV] Update RVV ISA section-header comments. NFC.
Fraser Cormack [Thu, 25 Feb 2021 14:07:58 +0000 (14:07 +0000)]
[RISCV] Update RVV ISA section-header comments. NFC.

Some of the section headers had become stale with the transition from
RVV specification version 0.9 to 0.10. This patch brings them up to
date.

3 years ago[RISCV] Support fixed-length vector i2fp/fp2i conversions
Fraser Cormack [Wed, 24 Feb 2021 10:18:28 +0000 (10:18 +0000)]
[RISCV] Support fixed-length vector i2fp/fp2i conversions

This patch extends the support for scalable-vector int->fp and fp->int
conversions by additionally handling fixed-length vectors.

The existing scalable-vector lowering re-expresses widening/narrowing by
x4+ conversions as standard nodes. The fixed-length vector support slots
in at "the end" of this process by lowering the now equally-sized and
widening/narrowing by x2 nodes to our custom VL versions.

Reviewed By: craig.topper

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

3 years ago[clang][flang] Improve the consistency of the code-base
Shao-Ce Sun [Thu, 25 Feb 2021 13:25:43 +0000 (21:25 +0800)]
[clang][flang] Improve the consistency of the code-base

In clang:
Replace argc_ with Argc
Replace argv_ with Argv
Replace argv with Args
In flang:
Replace argc_ with argc
Replace argv_ with argv
Replace argv with args

Reviewed By: awarzynski, aganea

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

3 years ago[clang][driver] Set the input type to Fortran when reading from stdin
Andrzej Warzynski [Tue, 16 Feb 2021 13:31:53 +0000 (13:31 +0000)]
[clang][driver] Set the input type to Fortran when reading from stdin

This patch makes sure that for the following invocation of the new Flang
driver, clangDriver sets the input type to Fortran:
```
flang-new -E -
```
This change does not affect `clang`, i.e. for the following invocation
the input type is set to C:
```
clang -E -
```

This change leverages the fact that for `flang-new` the driver is in
Flang mode.

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

3 years ago[clang] Remove a superfluous semicolon, silencing GCC warnings. NFC.
Martin Storsjö [Thu, 25 Feb 2021 12:50:56 +0000 (14:50 +0200)]
[clang] Remove a superfluous semicolon, silencing GCC warnings. NFC.

3 years ago[clang][cli] NFC: Remove ArgList infrastructure for recording queries
Jan Svoboda [Thu, 25 Feb 2021 12:45:52 +0000 (13:45 +0100)]
[clang][cli] NFC: Remove ArgList infrastructure for recording queries

This patch removes the infrastructure for recording queries in `ArgList`, partially reverting D94472.

The infrastructure was used during command line round-trip to determine which arguments should a certain subset of `CompilerInvocation` generate.

Since D96280, the command line arguments are being generated all at once, making this code no longer necessary.

Reviewed By: dexonsmith

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

3 years ago[clang][cli] NFC: Remove intermediate command line parsing functions
Jan Svoboda [Thu, 25 Feb 2021 12:30:21 +0000 (13:30 +0100)]
[clang][cli] NFC: Remove intermediate command line parsing functions

Patch D96280 moved command line round-tripping from each parsing functions into single `CreateFromArgs` function.

This patch cleans up the individual parsing functions, essentially merging `ParseXxxImpl` with `ParseXxx`, as the distinction is not necessary anymore.

Reviewed By: dexonsmith

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

3 years ago[lldb][NFC] Document ClangASTImporter
Raphael Isemann [Thu, 25 Feb 2021 12:23:31 +0000 (13:23 +0100)]
[lldb][NFC] Document ClangASTImporter

3 years ago[RISCV] Support fixed-length vector FP_ROUND & FP_EXTEND
Fraser Cormack [Tue, 23 Feb 2021 15:25:26 +0000 (15:25 +0000)]
[RISCV] Support fixed-length vector FP_ROUND & FP_EXTEND

This patch extends the support for vector FP_ROUND and FP_EXTEND by
including support for fixed-length vector types. Since fixed-length
vectors use "VL" nodes and scalable vectors can use the standard nodes,
there is slightly more to do in the fixed-length case. A helper function
was introduced to try and reduce the divergent paths. It is expected
that this function will similarly come in useful for lowering the
int-to-fp and fp-to-int operations for fixed-length vectors.

Reviewed By: craig.topper

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

3 years agoPass GPU events instead of streams across async regions.
Christian Sigg [Wed, 24 Feb 2021 14:02:30 +0000 (15:02 +0100)]
Pass GPU events instead of streams across async regions.

Lower !gpu.async.tokens returned from async.execute regions to events instead of streams.

Make !gpu.async.token returned from !async.execute single-use.
This allows creating one event per use and destroying them without leaking or ref-counting.
Technically we only need this for stream/event-based lowering. I kept the code separate
from the rest of the gpu-async-region pass so that we can make this optional or move
to a separate pass as needed.

Reviewed By: herhut

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

3 years ago[RISCV] Support fixed-length vector truncates
Fraser Cormack [Mon, 22 Feb 2021 16:51:24 +0000 (16:51 +0000)]
[RISCV] Support fixed-length vector truncates

This patch extends support for our custom-lowering of scalable-vector
truncates to include those of fixed-length vectors. It does this by
co-opting the custom RISCVISD::TRUNCATE_VECTOR node and adding mask and
VL operands. This avoids unnecessary duplication of patterns and
inflation of the ISel table.

Some truncates go through CONCAT_VECTORS which currently isn't
efficiently handled, as it goes through the stack. This can be improved
upon in the future.

Reviewed By: craig.topper

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

3 years ago[RISCV] Support fixed-length vector sign/zero extension
Fraser Cormack [Wed, 17 Feb 2021 09:08:24 +0000 (09:08 +0000)]
[RISCV] Support fixed-length vector sign/zero extension

This patch adds support for the custom lowering sign- and zero-extension
of fixed-length vector types. It does so through custom nodes. Since the
source and destination types are (necessarily) of different sizes, it is
possible that the source type is legal whilst the larger destination
type isn't. In this case the legalization makes heavy use of
EXTRACT_SUBVECTOR.

Reviewed By: craig.topper

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

3 years ago[RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering
Fraser Cormack [Mon, 22 Feb 2021 14:14:10 +0000 (14:14 +0000)]
[RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering

This patch unifies the two disparate paths for lowering
EXTRACT_SUBVECTOR operations under one roof. Consequently, with this
patch it is possible to support any fixed-length subvector extraction,
not just "cast-like" ones.

Reviewed By: craig.topper

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

3 years ago[NFC] Fix build failure after 83d134c3c4222e8b8d3d90c099f749a3b3abc8e0
Evgeniy Brevnov [Thu, 25 Feb 2021 11:42:08 +0000 (18:42 +0700)]
[NFC] Fix build failure after 83d134c3c4222e8b8d3d90c099f749a3b3abc8e0

3 years ago[X86] Regenerate sdiv_fix.ll tests. NFCI.
Simon Pilgrim [Thu, 25 Feb 2021 11:37:33 +0000 (11:37 +0000)]
[X86] Regenerate sdiv_fix.ll tests. NFCI.

3 years ago[NARY-REASSOCIATE] Support reassociation of min/max
Evgeniy Brevnov [Wed, 24 Feb 2021 11:10:22 +0000 (18:10 +0700)]
[NARY-REASSOCIATE] Support reassociation of min/max

Support reassociation for min/max. With that we should be able to transform min(min(a, b), c) -> min(min(a, c), b) if min(a, c) is already available.

Reviewed By: mkazantsev

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

3 years ago[X86][SSE] Move unaryshuffle(xor(x,-1)) -> xor(unaryshuffle(x),-1) fold into helper...
Simon Pilgrim [Thu, 25 Feb 2021 10:55:32 +0000 (10:55 +0000)]
[X86][SSE] Move unaryshuffle(xor(x,-1)) -> xor(unaryshuffle(x),-1) fold into helper. NFCI.

We should be able to extend this "canonicalizeShuffleWithBinOps" to handle more generic binop cases where either/both operands can be cheaply shuffled.

3 years agoSupport standalone build of clang-tidy unittest
serge-sans-paille [Tue, 16 Feb 2021 14:47:18 +0000 (15:47 +0100)]
Support standalone build of clang-tidy unittest

Apply the same pattern as the one used in clangd/unittests/CMakeLists.txt

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

3 years ago[lldb][NFC] Remove some obsolete comments in ClangASTImporter.cpp
Raphael Isemann [Thu, 25 Feb 2021 10:44:17 +0000 (11:44 +0100)]
[lldb][NFC] Remove some obsolete comments in ClangASTImporter.cpp

The first two comments are incomplete and reference obsolete code. The
last one is just commented out code (that also doesn't look correct).

3 years ago[lldb] Let ClangASTImporter assert that the target AST has an external source
Raphael Isemann [Thu, 25 Feb 2021 10:28:43 +0000 (11:28 +0100)]
[lldb] Let ClangASTImporter assert that the target AST has an external source

This prevents people from accidentially using this code outside the
intended setup.

3 years agoPrefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk
Harmen Stoppels [Thu, 25 Feb 2021 10:31:42 +0000 (11:31 +0100)]
Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

Allow users to use a non-system version of perl, python and awk, which is useful
in certain package managers.

Reviewed By: JDevlieghere, MaskRay

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

3 years ago[CodeGen] Canonicalise adds/subs of i1 vectors using XOR
David Sherwood [Mon, 22 Feb 2021 16:00:38 +0000 (16:00 +0000)]
[CodeGen] Canonicalise adds/subs of i1 vectors using XOR

When calling SelectionDAG::getNode() to create an ADD or SUB
of two vectors with i1 element types we can canonicalise this
to use XOR instead, where 1+1 is treated as wrapping around
to 0 and 0-1 wraps to 1.

I've added the following tests for SVE targets:

  CodeGen/AArch64/sve-pred-arith.ll

and modified some X86 tests to reflect the much simpler codegen
required.

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

3 years agoAArch64: relax address-space assertion in FastISel.
Tim Northover [Thu, 25 Feb 2021 10:13:59 +0000 (10:13 +0000)]
AArch64: relax address-space assertion in FastISel.

Some people are using alternative address spaces to track GC data, but
otherwise they behave exactly the same. This is the only place in the backend
we even try to care about it so it's really not achieving anything.

3 years ago[clang][cli] Round-trip the whole CompilerInvocation
Jan Svoboda [Thu, 25 Feb 2021 09:10:40 +0000 (10:10 +0100)]
[clang][cli] Round-trip the whole CompilerInvocation

Finally, this patch moves from round-tripping one `CompilerInvocation` at a time to round-tripping the invocation as a whole.

This patch includes only the code required to make round-tripping the whole invocation work. More cleanups will be done in a follow-up patch.

Depends on D96847, D97041 & D97042.

Reviewed By: dexonsmith

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

3 years ago[clang][cli] Store additional optimization remarks info
Jan Svoboda [Thu, 25 Feb 2021 08:05:08 +0000 (09:05 +0100)]
[clang][cli] Store additional optimization remarks info

After a revision of D96274 changed `DiagnosticOptions` to not store all remark arguments **as-written**, it is no longer possible to reconstruct the arguments accurately from the class.

This is caused by the fact that for `-Rpass=regexp` and friends, `DiagnosticOptions` store only the group name `pass` and not `regexp`. This is the same representation used for the plain `-Rpass` argument.

Note that each argument must be generated exactly once in `CompilerInvocation::generateCC1CommandLine`, otherwise each subsequent call would produce more arguments than the previous one. Currently this works out because of the way `RoundTrip` splits the responsibilities for certain arguments based on what arguments were queried during parsing. However, this invariant breaks when we move to single round-trip for the whole `CompilerInvocation`.

This patch ensures that for one `-Rpass=regexp` argument, we don't generate two arguments (`-Rpass` from `DiagnosticOptions` and `-Rpass=regexp` from `CodeGenOptions`) by shifting the responsibility for handling both cases to `CodeGenOptions`. To distinguish between the cases correctly, additional information is stored in `CodeGenOptions`.

The `CodeGenOptions` parser of `-Rpass[=regexp]` arguments also looks at `-Rno-pass` and `-R[no-]everything`, which is necessary for generating the correct argument regardless of the ordering of `CodeGenOptions`/`DiagnosticOptions` parsing/generation.

Reviewed By: dexonsmith

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

3 years ago[AArch64] Add abs intrinsic costs
Stelios Ioannou [Wed, 24 Feb 2021 12:51:30 +0000 (12:51 +0000)]
[AArch64] Add abs intrinsic costs

This patch adds cost-modelling for abs vector intrinsic.

Change-Id: I89007971bfb15f5b4a02a2eadfd43018e9a73976

3 years ago[clangd] NFC, remove an extra "class" keyword.
Haojian Wu [Thu, 25 Feb 2021 08:32:36 +0000 (09:32 +0100)]
[clangd] NFC, remove an extra "class" keyword.

3 years ago[clang][cli] Remove marshalling from Opt{In,Out}FFlag
Jan Svoboda [Thu, 25 Feb 2021 07:47:59 +0000 (08:47 +0100)]
[clang][cli] Remove marshalling from Opt{In,Out}FFlag

We can now express all marshalling semantics in `Opt{In,Out}FFlag` via `BoolFOption`.

This patch moves remaining `Opt{In,Out}FFlag` instances using marshalling to `BoolFOption` and removes marshalling capabilities from `Opt{In,Out}FFlag` entirely.

This simplifies the decisions developers have to make when creating new boolean options:
  * For simple cc1 flag pairs, use `Bool{,F,G}Option`.
  * For cc1 flag pairs that require complex marshalling logic, use `Opt{In,Out}FFlag` and implement marshalling manually.

Reviewed By: dexonsmith

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

3 years ago[clang][cli] Add MarshallingInfoEnum multiclass
Jan Svoboda [Thu, 25 Feb 2021 07:38:57 +0000 (08:38 +0100)]
[clang][cli] Add MarshallingInfoEnum multiclass

This patch introduces a tablegen multiclass called `MarshallingInfoEnum`. It has the same semantics as `MarshallingInfoString` had in combination with `AutoNormalizeEnum`, but it's easier to use and follows the convention used for other `MarshallingInfoXxx` multiclasses.

Reviewed By: dexonsmith

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

3 years ago[mlir][nfc] Fix typo in documentation comment
Marius Brehler [Thu, 25 Feb 2021 07:32:14 +0000 (08:32 +0100)]
[mlir][nfc] Fix typo in documentation comment

3 years ago[mlir] Fix emitting attribute documentation
Marius Brehler [Tue, 23 Feb 2021 10:30:25 +0000 (11:30 +0100)]
[mlir] Fix emitting attribute documentation

This fixes the documentation emitted for type parameters. Also adds a
missing empty line, rendered as line break in mark down.

Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
Reviewed By: rriddle

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

3 years ago[clang][RecoveryAST] Add design doc to clang internal manual.
Haojian Wu [Thu, 18 Feb 2021 08:48:18 +0000 (09:48 +0100)]
[clang][RecoveryAST] Add design doc to clang internal manual.

Hopefully it would be useful for new developers.

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

3 years ago[debugserver] Fix logic to extract app bundle from file path
Jonas Devlieghere [Thu, 25 Feb 2021 07:02:20 +0000 (23:02 -0800)]
[debugserver] Fix logic to extract app bundle from file path

Fix the logic to find the app bundle in a path by correctly accounting
for paths containing multiple occurrences of `.app`. The new logic will
correctly extract `com.app.Foo.app` from `com.app.Foo.app/com.app.Foo`.

rdar://74666208

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

3 years agoOpenMP: Fix object clobbering issue when using save-temps
Pushpinder Singh [Tue, 23 Feb 2021 12:43:57 +0000 (07:43 -0500)]
OpenMP: Fix object clobbering issue when using save-temps

There are two preconditions to reproduce the issue,
 1. Use -save-temps option
 2. Provide the -o option with name equal to the input file name
    without the file extension. For e.g. clang a.c -o a

With the -o specified, the AssembleJobAction after OffloadWrapperJobAction
will produce the object file with same name as host code object file.
Due to this clash, the OffloadWrapperAction overwrites the initial host
object file, which results in lld error. This also fixes the `multiple definition of __dummy.omp_offloading.entry'` issue in D96769 .

Reviewed By: jdoerfert

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

3 years ago[RISCV] Reuse existing SDLoc and XLenVT in the switch in RISCVISelDAGToDAG::Select...
Craig Topper [Thu, 25 Feb 2021 05:38:51 +0000 (21:38 -0800)]
[RISCV] Reuse existing SDLoc and XLenVT in the switch in RISCVISelDAGToDAG::Select. NFC

A SDLoc and XLenVT were already created above the switch.

3 years ago[docs][JITLink] Reintroduce JITLink design/API doc with fixes and improvements.
Lang Hames [Wed, 24 Feb 2021 21:30:47 +0000 (08:30 +1100)]
[docs][JITLink] Reintroduce JITLink design/API doc with fixes and improvements.

This document was originally introduced in ab4648504b2, and was reverted in
912bc4980e9 while I investigated a number of shpinx bot errors. This commit
reintroduces the document with fixes for those errors, as well as some
improvements to the wording and formatting.

3 years ago[NARY][NFC] New tests for upcoming changes.
Evgeniy Brevnov [Wed, 24 Feb 2021 12:28:02 +0000 (19:28 +0700)]
[NARY][NFC] New tests for upcoming changes.

3 years ago[NFC][AIX] Rename aix-csr-vector.ll to aix-csr-vector-extabi.ll
Zarko Todorovski [Thu, 25 Feb 2021 03:12:01 +0000 (22:12 -0500)]
[NFC][AIX] Rename aix-csr-vector.ll to aix-csr-vector-extabi.ll

3 years ago[Coroutine] Check indirect uses of alloca when checking lifetime info
Xun Li [Thu, 25 Feb 2021 02:29:23 +0000 (18:29 -0800)]
[Coroutine] Check indirect uses of alloca when checking lifetime info

In the existing logic, we look at the lifetime.start marker of each alloca, and check all uses of the alloca, to see if any pair of the lifetime marker and an use of alloca crosses suspension point.
This approach is unfortunately incorrect. An use of alloca does not need to be a direct use, but can be an indirect use through alias.
Only checking direct uses can miss cases where indirect uses are crossing suspension point.
This can be demonstrated in the newly added test case 007.
In the test case, both x and y are only directly used prior to suspend, but they are captured into an alias, merged through a PHINode (so they couldn't be materialized), and used after CoroSuspend.
If we only check whether the lifetime starts cross suspension points with direct uses, we will put the allocas to the stack, and then capture their addresses in the frame.

Instead of fixing it in D96441 and D96566, this patch takes a different approach which I think is better.
We still checks the lifetime info in the same way as before, but with two differences:
1. The collection of liftime.start is moved into AllocaUseVisitor to make the logic more concentrated.
2. When looking at lifetime.start and use pairs, we not only checks the direct uses as before, but in this patch we check all uses collected by AllocaUseVisitor, which would include all indirect uses through alias. This will make the analysis more accurate without throwing away the lifetime optimization.

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

3 years ago[docs] Add a release note for the removing of -Wreturn-std-move-in-c++11
Yang Fan [Wed, 24 Feb 2021 09:01:51 +0000 (17:01 +0800)]
[docs] Add a release note for the removing of -Wreturn-std-move-in-c++11

`-Wreturn-std-move-in-c++11` has been removed in fbee4a0c79cc4ee87c34e51342742a5bc6fcf872.

Reviewed By: aaronpuchert, amccarth

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

3 years ago[flang][fir][NFC] Remove dead code.
Eric Schweitz [Thu, 25 Feb 2021 00:06:17 +0000 (16:06 -0800)]
[flang][fir][NFC] Remove dead code.

This patch removes OpaqueAttr as it is no longer used.

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

3 years ago[flang][fir][NFC] Move remaining types to TableGen type definition
Valentin Clement [Thu, 25 Feb 2021 01:22:49 +0000 (20:22 -0500)]
[flang][fir][NFC] Move remaining types to TableGen type definition

Move the remaing of FIR types to TableGen type definition. This follow suggestion in D96422.

Reviewed By: schweitz, jeanPerier, rriddle

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

3 years ago[ThinLTO][NewPM] Clean up dead code under -O0
Arthur Eubanks [Wed, 24 Feb 2021 21:36:38 +0000 (13:36 -0800)]
[ThinLTO][NewPM] Clean up dead code under -O0

We're running into undefined references using ThinLTO with -O0 on
Windows/Chrome. This fixes that.

This matches the legacy PM.

Reviewed By: tejohnson

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

3 years ago[X86] Support amx-bf16 intrinsic.
Liu, Chen3 [Wed, 24 Feb 2021 03:25:35 +0000 (11:25 +0800)]
[X86] Support amx-bf16 intrinsic.

Adding support for intrinsics of AMX-BF16.
This patch alse fix a bug that AMX-INT8 instructions will be selected with wrong
predicate.

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

3 years ago[lld-macho] add code signature for native arm64 macOS
Greg McGary [Thu, 7 Jan 2021 02:11:44 +0000 (18:11 -0800)]
[lld-macho] add code signature for native arm64 macOS

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

3 years ago[test] Improve SanitizerCoverage tests on !associated and comdat
Fangrui Song [Thu, 25 Feb 2021 00:51:41 +0000 (16:51 -0800)]
[test] Improve SanitizerCoverage tests on !associated and comdat

3 years agoupdate AMDGPU _Float16 support in clang doc
Yaxun (Sam) Liu [Wed, 24 Feb 2021 15:24:48 +0000 (10:24 -0500)]
update AMDGPU _Float16 support in clang doc

Reviewed by: Matt Arsenault

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

3 years ago[llvm] Check availability for os_signpost
Jonas Devlieghere [Thu, 25 Feb 2021 00:23:12 +0000 (16:23 -0800)]
[llvm] Check availability for os_signpost

Add availability checks to the os_signpost code so this can be used with
an older deployment target.

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

3 years agoImprove attribute documentation for nodebug on typedefs
David Blaikie [Thu, 25 Feb 2021 00:25:37 +0000 (16:25 -0800)]
Improve attribute documentation for nodebug on typedefs

(followup to 8472fa6c54c9d044adcd147f6826bccebd730f30 )

3 years ago[RISCV] Teach VSETVLI inserter to use VSETIVLI when possible.
Craig Topper [Thu, 25 Feb 2021 00:07:32 +0000 (16:07 -0800)]
[RISCV] Teach VSETVLI inserter to use VSETIVLI when possible.

We always create the VL operand using a register, but if we can
determine that it came from an ADDI X0, imm with a sufficiently
small immediate, we can use VSETIVLI.

Reviewed By: frasercrmck

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

3 years ago[RISCV] Use a ComplexPattern for zexti32 to match sexti32.
Craig Topper [Wed, 24 Feb 2021 23:55:19 +0000 (15:55 -0800)]
[RISCV] Use a ComplexPattern for zexti32 to match sexti32.

We just started using a ComplexPattern for sexti32. This updates
zexti32 to match.

Reviewed By: luismarques

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