platform/upstream/llvm.git
3 years ago[libc][NFC] Make x86_64 fenv functions msan safe.
Siva Chandra Reddy [Mon, 8 Mar 2021 23:12:22 +0000 (15:12 -0800)]
[libc][NFC] Make x86_64 fenv functions msan safe.

These functions used inline asm to read FPU state. This change adds
explicit unpoisoning in these functions as the sanitizers don't see the
read operations.

3 years ago[ValueTracking] Move matchSimpleRecurrence out of line
Benjamin Kramer [Mon, 8 Mar 2021 23:04:47 +0000 (00:04 +0100)]
[ValueTracking] Move matchSimpleRecurrence out of line

The header only has a forward declaration of PHINode available, and this
function doesn't seem to get much out of inlining.

3 years ago[flang] Fix bad dereference of NULLIFY pointer object
Peter Steinfeld [Mon, 8 Mar 2021 16:21:30 +0000 (08:21 -0800)]
[flang] Fix bad dereference of NULLIFY pointer object

When we have a subprogram that has been determined to contain errors, we do not
perform name resolution on its execution part.  In this case, if the subprogram
contains a NULLIFY statement, the parser::Name of a pointer object in a NULLIFY
statement will not have had name resolution performed on it.  Thus, its symbol
will not have been set.  Later, however, we do semantic checking on the NULLIFY
statement.  The code that did this assumed that the parser::Name of the
pointer object was non-null.

I fixed this by just removing the null pointer check for the "symbol" member of
the "parser::Name" of the pointer object when doing semantic checking for
NULLIFY statements.  I also added a test that will make the compiler crash
without this change.

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

3 years ago[AIX][TLS] Generate 64-bit general-dynamic access code sequence
Lei Huang [Fri, 5 Mar 2021 22:17:06 +0000 (16:17 -0600)]
[AIX][TLS] Generate 64-bit general-dynamic access code sequence

Add support for the TLS general dynamic access model to assembly
files on AIX 64-bit.

Reviewed By: sfertile

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

3 years agoscudo: Support memory tagging in the secondary allocator.
Peter Collingbourne [Tue, 22 Dec 2020 02:39:03 +0000 (18:39 -0800)]
scudo: Support memory tagging in the secondary allocator.

This patch enhances the secondary allocator to be able to detect buffer
overflow, and (on hardware supporting memory tagging) use-after-free
and buffer underflow.

Use-after-free detection is implemented by setting memory page
protection to PROT_NONE on free. Because this must be done immediately
rather than after the memory has been quarantined, we no longer use the
combined allocator quarantine for secondary allocations. Instead, a
quarantine has been added to the secondary allocator cache.

Buffer overflow detection is implemented by aligning the allocation
to the right of the writable pages, so that any overflows will
spill into the guard page to the right of the allocation, which
will have PROT_NONE page protection. Because this would require the
secondary allocator to produce a header at the correct position,
the responsibility for ensuring chunk alignment has been moved to
the secondary allocator.

Buffer underflow detection has been implemented on hardware supporting
memory tagging by tagging the memory region between the start of the
mapping and the start of the allocation with a non-zero tag. Due to
the cost of pre-tagging secondary allocations and the memory bandwidth
cost of tagged accesses, the allocation itself uses a tag of 0 and
only the first four pages have memory tagging enabled.

This is a reland of commit 7a0da8894348 which was reverted in commit
9678b07e42ee. This reland includes the following changes:

- Fix the calculation of BlockSize which led to incorrect statistics
  returned by mallinfo().
- Add -Wno-pedantic to silence GCC warning.
- Optionally add some slack at the end of secondary allocations to help
  work around buggy applications that read off the end of their
  allocation.

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

3 years ago[InstCombine] add tests for min/max intrinsics with not ops; NFC
Sanjay Patel [Mon, 8 Mar 2021 22:37:52 +0000 (17:37 -0500)]
[InstCombine] add tests for min/max intrinsics with not ops; NFC

3 years ago[ValueTracking] move/add helper to get inverse min/max; NFC
Sanjay Patel [Mon, 8 Mar 2021 22:19:04 +0000 (17:19 -0500)]
[ValueTracking] move/add helper to get inverse min/max; NFC

We will need to this functionality to improve min/max folds
in instcombine when we canonicalize to intrinsics.

3 years ago[SelectionDAG] Don't scalarize vector fpround sources that don't need it.
Jessica Paquette [Mon, 8 Mar 2021 19:32:58 +0000 (11:32 -0800)]
[SelectionDAG] Don't scalarize vector fpround sources that don't need it.

Similar to the workaround code in ScalarizeVecRes_UnaryOp, ScalarizeVecRes_SETCC
, ScalarizeVecRes_VSELECT, etc.

If we have a case like this:

```
define <1 x half> @func(<1 x float> %x) {
  %tmp = fptrunc <1 x float> %x to <1 x half>
  ret <1 x half> %tmp
}
```

On AArch64, the <1 x float> is legal. So, this will crash if we call
GetScalarizedVector on it.

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

3 years ago[CSSPGO][llvm-profgen] Change sample count of dangling probe in llvm-profgen
wlei [Tue, 16 Feb 2021 20:55:06 +0000 (12:55 -0800)]
[CSSPGO][llvm-profgen] Change sample count of dangling probe in llvm-profgen

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

3 years ago[mlir][IR][NFC] Move the remaining builtin types to ODS
River Riddle [Mon, 8 Mar 2021 22:25:47 +0000 (14:25 -0800)]
[mlir][IR][NFC] Move the remaining builtin types to ODS

This will allow for removing the duplicated type documentation from LangRef and instead link to the builtin dialect documentation.

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

3 years ago[mlir][IR][NFC] Define the Location classes in ODS instead of C++
River Riddle [Mon, 8 Mar 2021 22:25:38 +0000 (14:25 -0800)]
[mlir][IR][NFC] Define the Location classes in ODS instead of C++

This also removes the need for LocationDetail.h.

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

3 years ago[Sanitizer][RISCV] Fix internal_clone
Luís Marques [Mon, 8 Mar 2021 22:28:19 +0000 (22:28 +0000)]
[Sanitizer][RISCV] Fix internal_clone

A RISC-V implementation of `internal_clone` was introduced in D87573, as
part of the RISC-V ASan patch set by @EccoTheDolphin. That function was
never used/tested until I ported LSan for RISC-V, as part of D92403. That
port revealed problems in the original implementation, so I provided a fix
in D92403. Unfortunately, my choice of replacing the assembly with regular
C++ code wasn't correct. The clone syscall arguments specify a separate
stack, so non-inlined calls, spills, etc. aren't going to work. This wasn't
a problem in practice for optimized builds of Compiler-RT, but it breaks
for debug builds. This patch fixes the original problem while keeping the
assembly.

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

3 years agoAdd intrinsics_gen as a dependency of libRemarks
Jon Roelofs [Mon, 8 Mar 2021 21:34:58 +0000 (13:34 -0800)]
Add intrinsics_gen as a dependency of libRemarks

Builds were failing with errors like:

```
fatal error: 'llvm/IR/Attributes.inc' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~
```

rdar://75179147

3 years ago[tsan] Use large address space mapping on Apple Silicon Macs
Kuba Mracek [Mon, 8 Mar 2021 22:09:02 +0000 (14:09 -0800)]
[tsan] Use large address space mapping on Apple Silicon Macs

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

3 years ago[PowerPC] Removing _massv place holder
Masoud Ataei [Mon, 8 Mar 2021 21:43:24 +0000 (21:43 +0000)]
[PowerPC] Removing _massv place holder

Since P8 is the oldest machine supported by MASSV pass,
_massv place holder is removed and the oldest version of
MASSV functions is assumed. If the P9 vector specific is
detected in the compilation process, the P8 prefix will
be updated to P9.

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

3 years ago[InstSimplify] cttz(1<<x) --> x
Sanjay Patel [Mon, 8 Mar 2021 20:42:01 +0000 (15:42 -0500)]
[InstSimplify] cttz(1<<x) --> x

https://alive2.llvm.org/ce/z/TDacYu
https://alive2.llvm.org/ce/z/KF84S3

3 years ago[InstSimplify] add tests for cttz of shifted-1; NFC
Sanjay Patel [Mon, 8 Mar 2021 20:29:26 +0000 (15:29 -0500)]
[InstSimplify] add tests for cttz of shifted-1; NFC

3 years ago[gn build] Port 5c26be214d9f
LLVM GN Syncbot [Mon, 8 Mar 2021 21:01:52 +0000 (21:01 +0000)]
[gn build] Port 5c26be214d9f

3 years ago[AArch64][GlobalISel] Lower G_BUILD_VECTOR -> G_DUP
Jessica Paquette [Mon, 1 Mar 2021 19:58:07 +0000 (11:58 -0800)]
[AArch64][GlobalISel] Lower G_BUILD_VECTOR -> G_DUP

If we have

```
%vec = G_BUILD_VECTOR %reg, %reg, ..., %reg
```

Then lower it to

```
%vec = G_DUP %reg
```

Also update the selector to handle constant splats on G_DUP.

This will not combine when the splat is all zeros or ones. Tablegen-imported
patterns rely on these being G_BUILD_VECTOR.

Minor code size improvements on CTMark at -Os.

Also adds some utility functions to make it a bit easier to recognize splats,
and an AArch64-specific splat helper.

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

3 years agoRevert "[LICM] Make promotion faster"
Alina Sbirlea [Mon, 8 Mar 2021 20:50:36 +0000 (12:50 -0800)]
Revert "[LICM] Make promotion faster"

Revert 3d8f842712d49b0767832b6e3f65df2d3f19af4e
Revision triggers a miscompile sinking a store incorrectly outside a
threading loop. Detected by tsan.
Reverting while investigating.

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

3 years ago[gn build] Port 5eb7a5814a5c
LLVM GN Syncbot [Mon, 8 Mar 2021 20:33:54 +0000 (20:33 +0000)]
[gn build] Port 5eb7a5814a5c

3 years ago[gn build] Port 5509748f2ce5
LLVM GN Syncbot [Mon, 8 Mar 2021 20:33:53 +0000 (20:33 +0000)]
[gn build] Port 5509748f2ce5

3 years ago[gn build] Port 503343191e12
LLVM GN Syncbot [Mon, 8 Mar 2021 20:33:53 +0000 (20:33 +0000)]
[gn build] Port 503343191e12

3 years ago[cfe][driver][M68k](8/8) Clang driver support
Min-Yih Hsu [Mon, 8 Mar 2021 00:33:30 +0000 (16:33 -0800)]
[cfe][driver][M68k](8/8) Clang driver support

Add M68k-specific toolchain and driver configurations / options.

Authors: myhsu, m4yers, glaubitz

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

3 years ago[cfe][M68k](7/8) Clang basic support
Min-Yih Hsu [Mon, 8 Mar 2021 00:33:22 +0000 (16:33 -0800)]
[cfe][M68k](7/8) Clang basic support

This is the first patch supporting M68k in Clang
 - Register M68k as a target
 - Target specific CodeGen support
 - Target specific attribute support

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k][test](6/8) Add all of the tests
Min-Yih Hsu [Mon, 8 Mar 2021 00:32:37 +0000 (16:32 -0800)]
[M68k][test](6/8) Add all of the tests

And a small utilities -- extract-section.py -- that helps extracting
specific object file section and printing in textual format. This
utility is just a workaround for tests inside `Encoding`. Hopefully in
the future we can replace dependencies in those tests with existing tools
(e.g. llvm-readobj). Please refer to this bug for more context:
https://bugs.llvm.org/show_bug.cgi?id=49245

Note that since we don't have AsmParser for now, we are testing the MC
part using MIR as input and put those tests under the `Encoding` folder.
In the future when AsmParser (and disassembler) is finished, those tests
will be moved to `test/MC/M68k`.

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k](5/8) Target-specific lowering
Min-Yih Hsu [Mon, 8 Mar 2021 00:32:18 +0000 (16:32 -0800)]
[M68k](5/8) Target-specific lowering

 - TargetMachine implementation for M68k
 - ISel, ISched for M68k
 - Other lowering (e.g. FrameLowering)
 - AsmPrinter

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k](4/8) MC layer and object file support
Min-Yih Hsu [Mon, 8 Mar 2021 00:32:03 +0000 (16:32 -0800)]
[M68k](4/8) MC layer and object file support

 - Add the M68k-specific MC layer implementation
 - Add ELF support for M68k
 - Add M68k-specifc CC and reloc

TODO: Currently AsmParser and disassembler are not implemented yet.
Please use this bug to track the status:
https://bugs.llvm.org/show_bug.cgi?id=48976

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k](3/8) Skeleton and target description files
Min-Yih Hsu [Mon, 8 Mar 2021 00:31:53 +0000 (16:31 -0800)]
[M68k](3/8) Skeleton and target description files

 - Infrastructure for the target (i.e. build files, target triple etc.)
 - All of the target description TableGen file

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k][MIR](2/8) Changes in the target-independent MIR part
Min-Yih Hsu [Mon, 8 Mar 2021 00:31:39 +0000 (16:31 -0800)]
[M68k][MIR](2/8) Changes in the target-independent MIR part

 - Add new callback in `TargetInstrInfo` --
  `isPCRelRegisterOperandLegal` -- to query whether pc-rel
   register MachineOperand is legal.
 - Add new function to search DebugLoc in a reverse ordering

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k][TableGen](1/8) TableGen related changes
Min-Yih Hsu [Mon, 8 Mar 2021 00:30:54 +0000 (16:30 -0800)]
[M68k][TableGen](1/8) TableGen related changes

 - Add a new TableGen backend: CodeBeads
 - Add support to generate logical operand information

For the first item, it is currently a workaround of M68k's (complex)
instruction encoding. A typical architecture, especially CISC one like
X86, normally uses `MCInstrDesc::TSFlags` to carry instruction encoding
info. However, at the early days of M68k backend development, we found
it difficult to fit every possible encoding into the 64-bit
`MCInstrDesc::TSFlags`. Therefore CodeBeads was invented to provide
an alternative, arbitrary length container for instruciton encoding
info. However, in the long term we incline not to use a new TG
backend for less common pattern like what we encountered in M68k. A bug
has been created to host to discussion on migrating from CodeBeads to
more concise solution: https://bugs.llvm.org/show_bug.cgi?id=48792

The second item was also served for similar purpose. It created utility
functions that tell you the index of a `MachineOperand` in a
`MachineInst` given a logical operand index. In normal cases a logical
operand is the same as `MachineOperand`, but for operands using complex
addressing mode a logical operand might be consisting of multiple
`MachineOperand`. The TableGen-ed `getLogicalOperandIdx`, for instance,
can give you the mapping between these two concepts. Nevertheless, we
hope to remove this feature in the future if possible. Since it's not
really useful for the targets supported by LLVM now either.

Authors: myhsu, m4yers, glaubitz

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

3 years ago[M68k][CODE_OWNERS](0/8) Add code owner for the M68k target
Min-Yih Hsu [Mon, 8 Mar 2021 00:29:47 +0000 (16:29 -0800)]
[M68k][CODE_OWNERS](0/8) Add code owner for the M68k target

Assign yours truely as code owner for the upcoming M68k target

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

3 years ago[clang] Don't set CLANG_DEFAULT_UNWINDLIB to none if rtlib is set to compiler-rt
Martin Storsjö [Sun, 7 Mar 2021 12:41:04 +0000 (14:41 +0200)]
[clang] Don't set CLANG_DEFAULT_UNWINDLIB to none if rtlib is set to compiler-rt

002dd47bdd674fad8186650f07458b1e062545df was meant to not be any
functional change, but it turned out it was.

With CLANG_DEFAULT_RTLIB set to compiler-rt, CLANG_DEFAULT_UNWINDLIB used
to bet set to an empty string, but now was set to "none".

If one only overrode rtlib to libgcc, one previously would get libgcc
as unwind lib, but now didn't. This caused test failures, fixed in
41476d89b82647c1ff690fdc805c859262d571e5.

Secondly, for the android target, the previous default was to link
libunwind, which this now changed.

Reinstate the exact same behaviour as before (removing the previously
typoed cmake check) and fix the option comment in one place to match
the other one above.

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

3 years ago[dfsan] Remove hardcoded shadow width in struct.ll
George Balatsouras [Sat, 6 Mar 2021 01:19:27 +0000 (17:19 -0800)]
[dfsan] Remove hardcoded shadow width in struct.ll

As a preparation step for fast8 support, we need to update the tests
to pass in both modes. That requires generalizing the shadow width
and remove any hard coded references that assume it's always 2 bytes.

Reviewed By: stephan.yichao.zhao

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

3 years ago[AIX][TLS] Add assert check of valid csect type for the storage mapping class XCOFF...
Victor Huang [Mon, 8 Mar 2021 20:17:57 +0000 (14:17 -0600)]
[AIX][TLS] Add assert check of valid csect type for the storage mapping class XCOFF::XMC_UL

This patch adds the assert check inside the constructor for the csect (MCSectionXCOFF) to ensure
valid csect type used for the storage mappping class XCOFF:XMC_UL.

3 years ago[gn build] (manually) port ebe6161c54b9
Nico Weber [Mon, 8 Mar 2021 19:56:33 +0000 (14:56 -0500)]
[gn build] (manually) port ebe6161c54b9

3 years ago[WebAssembly] Add new relocation for location relative data
Yuta Saito [Mon, 8 Mar 2021 19:23:33 +0000 (11:23 -0800)]
[WebAssembly] Add new relocation for location relative data

This `R_WASM_MEMORY_ADDR_SELFREL_I32` relocation represents an offset
between its relocating address and the symbol address. It's very similar
to `R_X86_64_PC32` but restricted to be used for only data segments.

```
S + A - P
```

A: Represents the addend used to compute the value of the relocatable
field.
P: Represents the place of the storage unit being relocated.
S: Represents the value of the symbol whose index resides in the
relocation entry.

Proposal: https://github.com/WebAssembly/tool-conventions/issues/162

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

3 years agoconstify getUnderlyingObject implementation [nfc]
Philip Reames [Mon, 8 Mar 2021 19:32:31 +0000 (11:32 -0800)]
constify getUnderlyingObject implementation [nfc]

3 years ago[SystemZ][z/OS] Missing locale functions libc++
Muiez Ahmed [Mon, 8 Mar 2021 19:20:22 +0000 (19:20 +0000)]
[SystemZ][z/OS] Missing locale functions libc++

The aim is to add the missing z/OS specific locale functions for libc++ (newlocale, freelocale and uselocale).

Reviewed By: ldionne, #libc, curdeius

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

3 years ago[OpenMP] NFC: temporarily disable assertion until the bug with dependences is fixed
AndreyChurbanov [Mon, 8 Mar 2021 19:17:45 +0000 (22:17 +0300)]
[OpenMP] NFC: temporarily disable assertion until the bug with dependences is fixed

3 years agoFix: [DebugInfo] Support representation of multiple location operands in SDDbgValue
Stephen Tozer [Mon, 8 Mar 2021 19:13:24 +0000 (19:13 +0000)]
Fix: [DebugInfo] Support representation of multiple location operands in SDDbgValue

Removes a "default" label from a fully covered switch, causing errors on
-Wcovered-switch-default builds.

3 years ago[MLIR][TOSA] Added lowerings for Reduce operations to Linalg
Rob Suderman [Mon, 8 Mar 2021 18:56:44 +0000 (10:56 -0800)]
[MLIR][TOSA] Added lowerings for Reduce operations to Linalg

Lowerings for min, max, prod, and sum reduction operations on int and float
values. This includes reduction tests for both cases.

Reviewed By: mravishankar

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

3 years ago[DebugInfo] Support representation of multiple location operands in SDDbgValue
gbtozers [Mon, 28 Sep 2020 13:02:51 +0000 (14:02 +0100)]
[DebugInfo] Support representation of multiple location operands in SDDbgValue

This patch modifies the class that represents debug values during ISel,
SDDbgValue, to support multiple location operands (to represent a dbg.value that
uses a DIArgList). Part of this class's functionality has been split off into a
new class, SDDbgOperand.

The new class SDDbgOperand represents a single value, corresponding to an SSA
value or MachineOperand in the IR and MIR respectively. Members of SDDbgValue
that were previously related to that specific value (as opposed to the
variable or DIExpression), such as the Kind enum, have been moved to
SDDbgOperand. SDDbgValue now contains an array of SDDbgOperand instead, allowing
it to hold more than one of these values.

All changes outside SDDbgValue are simply updates to use the new interface.

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

3 years ago[mlir] NFC: Add #endif comment.
Christian Sigg [Mon, 8 Mar 2021 18:23:24 +0000 (19:23 +0100)]
[mlir] NFC: Add #endif comment.

3 years ago[nfc] [lldb] Removed unused operator== for DWARFAbbreviationDeclaration and DWARFAttr...
Jan Kratochvil [Mon, 8 Mar 2021 18:16:59 +0000 (19:16 +0100)]
[nfc] [lldb] Removed unused operator== for DWARFAbbreviationDeclaration and DWARFAttribute

Also DWARFAttribute::operator== was buggy as it was ignoring its `m_value`.

3 years agoFix ppc build bot after 239a6181
Philip Reames [Mon, 8 Mar 2021 18:00:56 +0000 (10:00 -0800)]
Fix ppc build bot after 239a6181

(Yes, I checked, return undef is the right result for the function.)

3 years ago[instcombine] Collapse trivial or recurrences
Philip Reames [Mon, 8 Mar 2021 17:17:11 +0000 (09:17 -0800)]
[instcombine] Collapse trivial or recurrences

If we have a recurrence of the form <Start, Or, Step> we know that the value taken by the recurrence stabilizes on the first iteration (provided step is loop invariant). We can exploit that fact to remove the loop carried dependence in the recurrence.

Differential Revision: https://reviews.llvm.org/D97578 (or part)

3 years ago[instcombine] Collapse trivial and recurrences
Philip Reames [Mon, 8 Mar 2021 17:13:51 +0000 (09:13 -0800)]
[instcombine] Collapse trivial and recurrences

If we have a recurrence of the form <Start, And, Step> we know that the value taken by the recurrence stabilizes on the first iteration (provided step is loop invariant). We can exploit that fact to remove the loop carried dependence in the recurrence.

Differential Revision: https://reviews.llvm.org/D97578 (and part)

3 years ago[RISCV] Make use of DAG.getNeutralElement in lowerVECREDUCE to avoid repeating the...
Craig Topper [Mon, 8 Mar 2021 17:11:08 +0000 (09:11 -0800)]
[RISCV] Make use of DAG.getNeutralElement in lowerVECREDUCE to avoid repeating the same list of constants. NFC

Reviewed By: frasercrmck, khchen

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

3 years ago[RISCV] Add explicit i64 types to RV64 isel patterns to stop tablegen from generating...
Craig Topper [Mon, 8 Mar 2021 17:00:17 +0000 (09:00 -0800)]
[RISCV] Add explicit i64 types to RV64 isel patterns to stop tablegen from generating unneeded i32 patterns for RV32 HwMode.

3 years ago[CSSPGO] llvm-profdata support for CS profile.
Hongtao Yu [Fri, 5 Mar 2021 02:09:54 +0000 (18:09 -0800)]
[CSSPGO] llvm-profdata support for CS profile.

Context-sensitive AutoFDO profile has a different name scheme where full calling contexts are encoded as function names. When processing CS proifle, llvm-profdata should use full contexts instead of leaf function names.

Reviewed By: wmi, wenlei, wlei

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

3 years ago[OpenMP][Clang][NVPTX] Only build one bitcode library for each SM
Shilei Tian [Mon, 8 Mar 2021 17:02:55 +0000 (12:02 -0500)]
[OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

In D97003, CUDA 9.2 is the minimum requirement for OpenMP offloading on
NVPTX target. We don't need to have macros in source code to select right functions
based on CUDA version. we don't need to compile multiple bitcode libraries of
different CUDA versions for each SM. We don't need to worry about future
compatibility with newer CUDA version.

`-target-feature +ptx61` is used in this patch, which corresponds to the highest
PTX version that CUDA 9.2 can support.

Reviewed By: jdoerfert

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

3 years ago[gvn] Precisely propagate equalities to phi operands
Philip Reames [Mon, 8 Mar 2021 16:33:05 +0000 (08:33 -0800)]
[gvn] Precisely propagate equalities to phi operands

The code used for propagating equalities (e.g. assume facts) was conservative in two ways - one of which this patch fixes. Specifically, it shifts the code reasoning about whether a use is dominated by the end of the assume block to consider phi uses to exist on the predecessor edge. This matches the dominator tree handling for dominates(Edge, Use), and simply extends it to dominates(BB, Use).

Note that the decision to use the end of the block is itself a conservative choice. The more precise option would be to use the later of the assume and the value, and replace all uses after that. GVN handles that case separately (with the replace operand mechanism) because it used to be expensive to ask dominator questions within blocks. With the new instruction ordering support, we should probably rewrite this code at some point to simplify.

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

3 years ago[nfc] [lldb] [testsuite] Cleanup of recently added dwarf5-line-strp.s
Jan Kratochvil [Mon, 8 Mar 2021 16:41:14 +0000 (17:41 +0100)]
[nfc] [lldb] [testsuite] Cleanup of recently added dwarf5-line-strp.s

3 years ago[InstCombine] Add a combine for a shuffle of similar bitcasts
Sanne Wouda [Wed, 24 Feb 2021 13:05:11 +0000 (13:05 +0000)]
[InstCombine] Add a combine for a shuffle of similar bitcasts

Some intrinsics wrapper code has the habit of ignoring the type of the
elements in vectors, thinking of vector registers as a "bag of bits". As
a consequence, some operations are shared between vectors of different
types are shared. For example, functions that rearrange elements in a
vector can be shared between vectors of int32 and float.

This can result in bitcasts in awkward places that prevent the backend
from recognizing some instructions. For AArch64 in particular, it
inhibits the selection of dup from a general purpose register (GPR), and
mov from GPR to a vector lane.

This patch adds a pattern in InstCombine to move the bitcasts past the
shufflevector if this is possible. Sometimes this even allows
InstCombine to remove the bitcast entirely, as in the included tests.

Alternatively this could be done with a few extra patterns in the
AArch64 backend, but InstCombine seems like a better place for this.

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

3 years agoRehome an orphaned comment [NFC]
Sanne Wouda [Fri, 19 Feb 2021 16:59:33 +0000 (16:59 +0000)]
Rehome an orphaned comment [NFC]

As seen in 35827164c4, the "shuffle x, x, mask" comment has drifted away
from the implementation of the pattern. Put it back.

3 years ago[lldb][NFC] Code style fixes for ClangModulesDeclVendor
Raphael Isemann [Mon, 8 Mar 2021 13:00:23 +0000 (14:00 +0100)]
[lldb][NFC] Code style fixes for ClangModulesDeclVendor

Doxygenify comments and remove {} around one line if's.

3 years ago[Assembler] Fix global icmp test
Nikita Popov [Mon, 8 Mar 2021 16:24:41 +0000 (17:24 +0100)]
[Assembler] Fix global icmp test

Remove test that no longer folds after
f08148e874088a07b972203a183db00de9c38a70.

3 years ago[InstCombine] Pre-commit tests for redundant phis with pointer casts.
Florian Hahn [Fri, 5 Mar 2021 16:10:19 +0000 (16:10 +0000)]
[InstCombine] Pre-commit tests for redundant phis with pointer casts.

Pre-commit tests for D98058.

3 years ago[ConstantFold] Handle icmp of global and null consistently
Nikita Popov [Mon, 8 Mar 2021 16:18:01 +0000 (17:18 +0100)]
[ConstantFold] Handle icmp of global and null consistently

Return UGT rather than NE for icmp @g, null, which is slightly
stronger. This is consistent with what we do for more complex
folds. It is somewhat silly that @g ugt null does not get folded
while (gep @g) ugt null does.

3 years ago[ConstProp] Fix folding of pointer icmp with signed predicates
Nikita Popov [Mon, 8 Mar 2021 16:12:12 +0000 (17:12 +0100)]
[ConstProp] Fix folding of pointer icmp with signed predicates

While @g ugt null is always true (ignoring weak symbols),
@g sgt null is not necessarily the case -- that would imply that
it is forbidden to place globals in the high half of the address
space.

3 years ago[ConstProp] Add more tests for pointer icmp folding (NFC)
Nikita Popov [Mon, 8 Mar 2021 16:04:28 +0000 (17:04 +0100)]
[ConstProp] Add more tests for pointer icmp folding (NFC)

3 years ago[nfc] [lldb] Remove unused function DWARFAttribute::set
Jan Kratochvil [Mon, 8 Mar 2021 16:04:07 +0000 (17:04 +0100)]
[nfc] [lldb] Remove unused function DWARFAttribute::set

3 years agoApply update_test_checks.py to test/Transforms/Util/assume-builder.ll (NFC)
Juneyoung Lee [Mon, 8 Mar 2021 16:03:03 +0000 (01:03 +0900)]
Apply update_test_checks.py to test/Transforms/Util/assume-builder.ll (NFC)

3 years ago[mlir][Shape] Allow shape.split_at to return extent tensors and lower it to std.subtensor
Benjamin Kramer [Mon, 8 Mar 2021 14:23:28 +0000 (15:23 +0100)]
[mlir][Shape] Allow shape.split_at to return extent tensors and lower it to std.subtensor

split_at can return an error if the split index is out of bounds. If the
user knows that the index can never be out of bounds it's safe to use
extent tensors. This has a straight-forward lowering to std.subtensor.

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

3 years agoAArch64/MacOS: switch default CPU to apple-a13.
Tim Northover [Mon, 8 Mar 2021 15:00:28 +0000 (15:00 +0000)]
AArch64/MacOS: switch default CPU to apple-a13.

The DevKits had A12 processors, but they're all gone now and real hardware has
an A13.

3 years ago[lldb] Fix error message in IRInterpreter
Andy Yankovsky [Mon, 8 Mar 2021 12:41:33 +0000 (13:41 +0100)]
[lldb] Fix error message in IRInterpreter

`memory_read_error` -> `memory_write_error`

Reviewed By: teemperor

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

3 years agoFix 2: [DebugInfo] Support DIArgList in DbgVariableIntrinsic
Stephen Tozer [Mon, 8 Mar 2021 15:42:41 +0000 (15:42 +0000)]
Fix 2: [DebugInfo] Support DIArgList in DbgVariableIntrinsic

Changes to function calls in LocalTest resulted in comparisons between
unsigned values and signed literals; the latter have been updated to be
unsigned to prevent this warning.

3 years ago[OpenMP] Fix potential integer overflow in dynamic schedule code
Peyton, Jonathan L [Mon, 1 Feb 2021 20:08:51 +0000 (14:08 -0600)]
[OpenMP] Fix potential integer overflow in dynamic schedule code

Restrict the chunk_size * chunk_num to only occur for valid
chunk_nums and reimplement calculating the limit to avoid overflow.

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

3 years ago[AIX][TLS] Generate 32-bit general-dynamic access code sequence
Nemanja Ivanovic [Thu, 4 Mar 2021 14:07:22 +0000 (08:07 -0600)]
[AIX][TLS] Generate 32-bit general-dynamic access code sequence

Adds support for the TLS general dynamic access model to
assembly files on AIX 32-bit.

To generate the correct code sequence when accessing a TLS variable
`v`, we first create two TOC entry nodes, one for the variable offset, one
for the region handle. These nodes are followed by a `PPCISD::TLSGD_AIX`
node (new node introduced by this patch).
The `PPCISD::TLSGD_AIX` node (`TLSGDAIX` pseudo instruction) is
expanded to 2 copies (to put the variable offset and region handle in
the right registers) and a call to `__tls_get_addr`.

This patch also changes the way TC entries are generated in asm files.
If the generated TC entry is for the region handle of a TLS variable,
we add the `@m` relocation and the `.` prefix to the entry name.
For example:

```
L..C0:
  .tc .v[TC],v[TL]@m -> region handle
L..C1:
  .tc v[TC],v[TL] -> variable offset
```

Reviewed By: nemanjai, sfertile

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

3 years agoRun non-filechecked commands in update_cc_test_checks.py
Giorgis Georgakoudis [Fri, 19 Feb 2021 18:45:40 +0000 (10:45 -0800)]
Run non-filechecked commands in update_cc_test_checks.py

Some tests in clang require running non-filechecked commands to generate the actual filecheck input. For example, tests for openmp offloading require generating the host bc without any checking, before running the clang command to actually generate the filechecked IR of the target device. This patch enables `update_cc_test_checks.py` to run non-filechecked run lines in-place.

Reviewed By: jdoerfert

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

3 years agoAdd Semantic check for Flang OpenMP 4.5 - 2.7.1 Do Loop restrictions for Threadprivate.
Yashaswini [Mon, 8 Mar 2021 14:41:17 +0000 (20:11 +0530)]
Add Semantic check for Flang OpenMP 4.5 - 2.7.1 Do Loop restrictions for Threadprivate.
Implementation of Do loop threadprivate check.

Files:

resolve-directives.cpp

Testcases:

omp-do04-positivecase.f90
omp-do04.f90

Reviewed by: Kiran Chandramohan @kiranchandramohan

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

3 years agoFix: [DebugInfo] Support DIArgList in DbgVariableIntrinsic
Stephen Tozer [Mon, 8 Mar 2021 14:55:41 +0000 (14:55 +0000)]
Fix: [DebugInfo] Support DIArgList in DbgVariableIntrinsic

This patch removed the only use of a lambda capture, triggering an error
on `-Werror -Wunused-lambda-capture` builds.

3 years ago[SystemZ][z/OS] Add support to validate a HLASM Label.
Anirudh Prasad [Mon, 8 Mar 2021 14:52:07 +0000 (09:52 -0500)]
[SystemZ][z/OS] Add support to validate a HLASM Label.

- This patch adds in support to determine whether a particular label
  is valid for the hlasm variant
- The label syntax being checked is that of an ordinary HLASM symbol
  (Reference, Chapter 2 (Coding and Structure) - Terms, Literals and
  Expressions - Terms - Symbols - Ordinary Symbol)
- To achieve this, the virtual function isLabel defined in
  MCTargetAsmParser.h is made use of
- The isLabel function is overridden in SystemZAsmParser for the
  hlasm variant, and the syntax is checked appropriately
- Things remain unchanged for the att variant
- Further patches will add in support to emit the label. These future
  patches will make use of this isLabel function

Reviewed By: uweigand, Kai

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

3 years ago[DebugInfo] Support DIArgList in DbgVariableIntrinsic
gbtozers [Wed, 30 Sep 2020 15:30:14 +0000 (16:30 +0100)]
[DebugInfo] Support DIArgList in DbgVariableIntrinsic

This patch updates DbgVariableIntrinsics to support use of a DIArgList for the
location operand, resulting in a significant change to its interface. This patch
does not update all IR passes to support multiple location operands in a
dbg.value; the only change is to update the DbgVariableIntrinsic interface and
its uses. All code outside of the intrinsic classes assumes that an intrinsic
will always have exactly one location operand; they will still support
DIArgLists, but only if they contain exactly one Value.

Among other changes, the setOperand and setArgOperand functions in
DbgVariableIntrinsic have been made private. This is to prevent code from
setting the operands of these intrinsics directly, which could easily result in
incorrect/invalid operands being set. This does not prevent these functions from
being called on a debug intrinsic at all, as they can still be called on any
CallInst pointer; it is assumed that any code directly setting the operands on a
generic call instruction is doing so safely. The intention for making these
functions private is to prevent DIArgLists from being overwritten by code that's
naively trying to replace one of the Values it points to, and also to fail fast
if a DbgVariableIntrinsic is updated to use a DIArgList without a valid
corresponding DIExpression.

3 years ago[NFC] Avoid useless BitVector move
serge-sans-paille [Mon, 8 Mar 2021 14:15:22 +0000 (15:15 +0100)]
[NFC] Avoid useless BitVector move

3 years ago[PowerPC] Change target data layout for 16-byte stack alignment
Ahsan Saghir [Mon, 8 Feb 2021 14:36:20 +0000 (08:36 -0600)]
[PowerPC] Change target data layout for 16-byte stack alignment

This changes the target data layout to make stack align to 16 bytes
on Power10. Before this change, stack was being aligned to 32 bytes.

Reviewed By: #powerpc, nemanjai

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

3 years ago[clang/mac] Accept -why_load and make -whyload an alias for it
Nico Weber [Sun, 7 Mar 2021 21:58:18 +0000 (16:58 -0500)]
[clang/mac] Accept -why_load and make -whyload an alias for it

From `man ld`:

     -why_load   Log why each object file in a static library is loaded.
                 That is, what symbol was needed.
                 Also called -whyload for compatibility.

`-why_load` is the spelling preferred by the linker and `-whyload` an old
compatibility setting. clang should accept the preferred form, and map both
forms to the preferred form.

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

3 years ago[ConstantFold] allow folding icmp of null and constexpr
Sanjay Patel [Mon, 8 Mar 2021 13:52:12 +0000 (08:52 -0500)]
[ConstantFold] allow folding icmp of null and constexpr

I noticed that we were not folding expressions like this:
icmp ult (constexpr), null
in https://llvm.org/PR49355, so we end up with extremely large
icmp instructions as the constant expressions pile up on each other.

There is no potential to mis-fold an unsigned boundary condition
with a zero/null, so this is just falling through a crack in the
pattern matching.

The more general case of comparisons of non-zero constants and
constexpr are more tricky and may require the datalayout to know
how to cast to different types, etc. Negative tests verify that
we are only changing a subset of potential patterns.

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

3 years ago[ConstProp][JumpThreading] add more test coverage for potential nullptr folds; NFC
Sanjay Patel [Mon, 8 Mar 2021 13:39:56 +0000 (08:39 -0500)]
[ConstProp][JumpThreading] add more test coverage for potential nullptr folds; NFC

See D98150.

3 years ago[libcxx] Document windows specifics regarding file_type and perms. NFC.
Martin Storsjö [Sun, 7 Mar 2021 21:49:56 +0000 (23:49 +0200)]
[libcxx] Document windows specifics regarding file_type and perms. NFC.

This was requested in the review of D98138.

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

3 years ago[JumpThreading] auto-generate complete test checks; NFC
Sanjay Patel [Mon, 8 Mar 2021 13:23:20 +0000 (08:23 -0500)]
[JumpThreading] auto-generate complete test checks; NFC

3 years agoAdd "assert require" for the test added in df9158c9a45a6902c2b0394f9bd6512e3e441f31
Haojian Wu [Mon, 8 Mar 2021 13:15:39 +0000 (14:15 +0100)]
Add "assert require" for the test added in df9158c9a45a6902c2b0394f9bd6512e3e441f31

The test is using "debug-only", it was failing in opt built mode.

3 years ago[lldb][NFC] std::set -> DenseSet in ClangModulesDeclVendor
Raphael Isemann [Mon, 8 Mar 2021 10:10:50 +0000 (11:10 +0100)]
[lldb][NFC] std::set -> DenseSet in ClangModulesDeclVendor

ModuleID is just an integer so let's use a DenseSet.

3 years ago[KnownBits] Add min/max shift amount handling to shl/lshr/ashr KnownBits helpers
Simon Pilgrim [Mon, 8 Mar 2021 11:44:15 +0000 (11:44 +0000)]
[KnownBits] Add min/max shift amount handling to shl/lshr/ashr KnownBits helpers

Pulled out of the original D90479 patch - also includes the "impossible shift amount" filtering from computeKnownBitsFromShiftOperator.

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

3 years ago[X86] Break if-else chain. NFCI.
Simon Pilgrim [Fri, 5 Mar 2021 16:21:34 +0000 (16:21 +0000)]
[X86] Break if-else chain. NFCI.

Both if blocks affect control flow - we don't need the else.

Fixes clang-tidy warning.

3 years ago[sanitizers] Fix interception of GLibc regexec
Alex Richardson [Mon, 8 Mar 2021 10:09:42 +0000 (10:09 +0000)]
[sanitizers] Fix interception of GLibc regexec

Previously, on GLibc systems, the interceptor was calling __compat_regexec
(regexec@GLIBC_2.2.5) insead of the newer __regexec (regexec@GLIBC_2.3.4).
The __compat_regexec strips the REG_STARTEND flag but does not report an
error if other flags are present. This can result in infinite loops for
programs that use REG_STARTEND to find all matches inside a buffer (since
ignoring REG_STARTEND means that the search always starts from the first
character).

The underlying issue is that GLibc's dlsym(RTLD_NEXT, ...) appears to
always return the oldest versioned symbol instead of the default. This
means it does not match the behaviour of dlsym(RTLD_DEFAULT, ...) or the
behaviour documented in the manpage.

It appears a similar issue was encountered with realpath and worked around
in 77ef78a0a5dbaa364529bd05ed7a7bd9a71dd8d4.

See also https://sourceware.org/bugzilla/show_bug.cgi?id=14932 and
https://sourceware.org/bugzilla/show_bug.cgi?id=1319.

Fixes https://github.com/google/sanitizers/issues/1371

Reviewed By: #sanitizers, vitalybuka, marxin

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

3 years ago[NFC] Use ranged loop iteration instead of explicit looping
serge-sans-paille [Fri, 5 Mar 2021 09:23:28 +0000 (10:23 +0100)]
[NFC] Use ranged loop iteration instead of explicit looping

3 years agoRevert "[tsan] Use large address space mapping on Apple Silicon Macs"
Jeremy Morse [Mon, 8 Mar 2021 09:48:11 +0000 (09:48 +0000)]
Revert "[tsan] Use large address space mapping on Apple Silicon Macs"

This reverts commit bde2e5607167f3e9fd8c6b51275fc8ac654230a2.

This patch produces a compile failure on linux amd64 environments, when
running:

  ninja GotsanRuntimeCheck

I get various build errors:

  ../rtl/tsan_platform.h:608: error: use of undeclared identifier 'Mapping'
    return MappingImpl<Mapping, Type>();

Here's a buildbot with the same failure during stage "check-tsan in gcc
build", there are other unrelated failures in there.

  http://lab.llvm.org:8011/#/builders/37/builds/2831

3 years agoClarify documentation for `Elementwise`, `Scalarizable`, `Vectorizable`, and
Frederik Gossen [Wed, 3 Mar 2021 09:18:33 +0000 (10:18 +0100)]
Clarify documentation for `Elementwise`, `Scalarizable`, `Vectorizable`, and
`Tensorizable` traits.

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

3 years ago[RISCV] Add new entry points to getContainerForFixedLengthVector
Fraser Cormack [Thu, 4 Mar 2021 09:55:14 +0000 (09:55 +0000)]
[RISCV] Add new entry points to getContainerForFixedLengthVector

While working on adding fixed-length vectors to the calling convention,
it was necessary to be able to query for a fixed-length vector container
type without access to an instance of SelectionDAG.

This patch modifies the "main" getContainerForFixedLengthVector function
to use an instance of TargetLowering rather than SelectionDAG, and
preserves the SelectionDAG overload as a wrapper.

An additional non-static version of the function was also added to
simplify the common case in RISCVTargetLowering.

Reviewed By: craig.topper

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

3 years ago[Matrix] Implement += and -= for MatrixType.
Saurabh Jha [Mon, 8 Mar 2021 09:25:22 +0000 (09:25 +0000)]
[Matrix] Implement += and -= for MatrixType.

Make sure CompLHSTy is set correctly for += and -= and matrix type
operands.

Bugzilla ticket is here https://bugs.llvm.org/show_bug.cgi?id=46164

Patch by Saurabh Jha <saurabh.jhaa@gmail.com>

Reviewed By: fhahn

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

3 years ago[LoopVectorize][SVE] Add tests for vectorising conditional loads of invariant addresses
David Sherwood [Fri, 5 Mar 2021 13:49:50 +0000 (13:49 +0000)]
[LoopVectorize][SVE] Add tests for vectorising conditional loads of invariant addresses

For loops of the form:

 void foo(int *a, int *cond, short *inv, long long n) {
   for (long long i=0; i<n; ++i) {
     if (cond[i])
       a[i] = *inv;
   }
 }

we can vectorise for SVE using masked gather loads where the array
of pointers is simply a vector splat of 'inv' and the mask comes
from the condition 'cond[i] != 0'.

This patch simply adds tests upstream to defend this capability.

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

3 years ago[CMake][compiler-rt] Use copying instead of symlinking for LSE builtins on non-Unix...
Raul Tambre [Sat, 6 Mar 2021 09:45:57 +0000 (11:45 +0200)]
[CMake][compiler-rt] Use copying instead of symlinking for LSE builtins on non-Unix-likes

As reported in D93278 post-review symlinking requires privilege escalation on Windows.
Copying is functionally same, so fallback to it for systems that aren't Unix-like.
This is similar to the solution in AddLLVM.cmake.

Reviewed By: ikudrin

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

3 years ago[X86] Refine "Support -march=alderlake"
Freddy Ye [Wed, 3 Mar 2021 08:17:37 +0000 (16:17 +0800)]
[X86] Refine "Support -march=alderlake"

Refine "Support -march=alderlake"
Compare with tremont, it includes 25 more new features. They are
adx, aes, avx, avx2, avxvnni, bmi, bmi2, cldemote, f16c, fma, hreset, invpcid,
kl, lzcnt, movdir64b, movdiri, pclmulqdq, pconfig, pku, serialize, shstk, vaes,
vpclmulqdq, waitpkg, widekl.

Reviewed By: pengfei

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

3 years agoForward the `LLVM_ENABLE_LIBCXX` CMake parameter to the mlir standalone test
Mehdi Amini [Mon, 8 Mar 2021 05:06:33 +0000 (05:06 +0000)]
Forward the `LLVM_ENABLE_LIBCXX` CMake parameter to the mlir standalone test

This allows to build and test MLIR with `-DLLVM_ENABLE_LIBCXX=ON`.

3 years ago[LoopInterchange] Replace tightly-nesting-ness check with the one from `LoopNest`
Ta-Wei Tu [Mon, 8 Mar 2021 03:35:35 +0000 (11:35 +0800)]
[LoopInterchange] Replace tightly-nesting-ness check with the one from `LoopNest`

The check `tightlyNested()` in `LoopInterchange` is similar to the one in `LoopNest`.
In fact, the former misses some cases where loop-interchange is not feasible and results in incorrect behaviour.
Replacing it with the much robust version provided by `LoopNest` reduces code duplications and fixes https://bugs.llvm.org/show_bug.cgi?id=48113.

`LoopInterchange` has a weaker definition of tightly or perfectly nesting-ness than the one implemented in `LoopNest::arePerfectlyNested()`.
Therefore, `tightlyNested()` is instead implemented with `LoopNest::checkLoopsStructure` and additional checks for unsafe instructions.

Reviewed By: Whitney

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

3 years ago[Driver] Pass --unwindlib=platform to tests that check unwinder
Petr Hosek [Sun, 7 Mar 2021 23:08:11 +0000 (15:08 -0800)]
[Driver] Pass --unwindlib=platform to tests that check unwinder

There are two additional cases that were missed in D98131.

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

3 years ago[libc++] Fix typos in the synopsis of bit_xor, bit_not, etc. NFC.
Arthur O'Dwyer [Mon, 8 Mar 2021 01:22:03 +0000 (20:22 -0500)]
[libc++] Fix typos in the synopsis of bit_xor, bit_not, etc. NFC.

3 years agoFix build post-revert in 8d5a981a135a
Mehdi Amini [Mon, 8 Mar 2021 00:57:36 +0000 (00:57 +0000)]
Fix build post-revert in 8d5a981a135a

One commit introduced after the reverted change was using an API
introduced there, this is reintroducing the API, but not the original
broken change.