Commit Graph

419090 Commits

Author SHA1 Message Date
Arthur Eubanks caf6af2ed7 [polly] Remove last instances of -analyze
As mentioned in D120782, the loop block order can be different depending
on if LoopInfo is incrementally updated or freshly computed.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D122195
2022-03-24 09:47:43 -07:00
Dmitry Vyukov 1d4d2cceda [TSan] Add a runtime flag to print full thread creation stacks up to the main thread
Currently, we only print how threads involved in data race are created from their parent threads.
Add a runtime flag 'print_full_thread_history' to print thread creation stacks for the threads involved in the data race and their ancestors up to the main thread.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D122131
2022-03-24 17:30:27 +01:00
Mike Rice f82ec5532b [OpenMP] Initial parsing/sema for the 'omp target parallel loop' construct
Adds basic parsing/sema/serialization support for the
 #pragma omp target parallel loop directive.

Differential Revision: https://reviews.llvm.org/D122359
2022-03-24 09:19:00 -07:00
Momchil Velikov 50a97aacac [AArch64] Async unwind - function prologues
Re-commit of 32e8b550e5

This patch rearranges emission of CFI instructions, so the resulting
DWARF and `.eh_frame` information is precise at every instruction.

The current state is that the unwind info is emitted only after the
function prologue. This is fine for synchronous (e.g. C++) exceptions,
but the information is generally incorrect when the program counter is
at an instruction in the prologue or the epilogue, for example:

```
stp	x29, x30, [sp, #-16]!           // 16-byte Folded Spill
mov	x29, sp
.cfi_def_cfa w29, 16
...
```

after the `stp` is executed the (initial) rule for the CFA still says
the CFA is in the `sp`, even though it's already offset by 16 bytes

A correct unwind info could look like:
```
stp	x29, x30, [sp, #-16]!           // 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov	x29, sp
.cfi_def_cfa w29, 16
...
```

Having this information precise up to an instruction is useful for
sampling profilers that would like to get a stack backtrace. The end
goal (towards this patch is just a step) is to have fully working
`-fasynchronous-unwind-tables`.

Reviewed By: danielkiss, MaskRay

Differential Revision: https://reviews.llvm.org/D111411
2022-03-24 16:16:44 +00:00
Valentin Clement 44b0ea44f2
[flang[OpenACC] Lower wait directive
This patch adds lowering for the `!$acc wait` directive
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122399
2022-03-24 17:15:27 +01:00
Craig Topper 67eb2f144e [SelectionDAG] Add AssertAlign to AddNodeIDCustom so that it will CSE properly.
The alignment needs to be part of the folding set hash. This is
handled by getAssertAlign when nodes are created, but needs to repeated here.

No test case as I found it as part of a very early experimental patch.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D122279
2022-03-24 08:59:09 -07:00
Alexander Belyaev bef928f8b2 [llvm] Initialize and move UseUpRegs outside of `union` MemOp struct.
Asan complained about uninitialized bool

`invalid-bool-load`
llvm/lib/Target/X86/AsmParser/X86Operand.h:389:12: runtime error: load
of value 171, which is not a valid value for type 'bool'

Differential Revision: https://reviews.llvm.org/D122405
2022-03-24 16:53:38 +01:00
Aaron Ballman 5b164a3a9b Diagnose use of a naked attribute on a member function in ms-mode
This matches the behavior of cl.exe.
2022-03-24 11:52:43 -04:00
Jakob Koschel 0c86198b27 Reland "[ELF] Enable new passmanager plugin support for LTO"
This is the orignal patch + a check that LLVM_BUILD_EXAMPLES is enabled before
adding a dependency on the 'Bye' example pass.

Original summary:

Add cli options for new passmanager plugin support to lld.

Currently it is not possible to load dynamic NewPM plugins with lld. This is an
incremental update to D76866. While that patch only added cli options for
llvm-lto2, this adds them for lld as well. This is especially useful for running
dynamic plugins on the linux kernel with LTO.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D120490
2022-03-24 16:29:18 +01:00
Florian Hahn 46432a0088
[VPlan] Add VPWidenPointerInductionRecipe.
This patch moves pointer induction handling from VPWidenPHIRecipe to its
own recipe. In the process, it adds all information required to generate
code for pointer inductions without relying on Legal to access the list
of induction phis.

Alternatively VPWidenPHIRecipe could also take an optional pointer to InductionDescriptor.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D121615
2022-03-24 14:58:45 +00:00
Aaron Ballman 488c772920 Fix a crash with variably-modified parameter types in a naked function
Naked functions have no prolog, so it's not valid to emit prolog code
to evaluate the variably-modified type. This fixes Issue 50541.
2022-03-24 10:39:14 -04:00
Valentin Clement 5ee88e0ba5
[flang[OpenACC] Lower data directive
This patch adds lowering for the `!$acc data`
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D122384

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122398
2022-03-24 15:30:31 +01:00
Sanjay Patel 5dbb53b1b4 [InstCombine] merge shuffled vector negate and multiply
Add the "(0 - X) --> (X * -1)" reverse identity to the list of alternate form binops.

We need a little hack to make the existing logic work because it does not expect to
move constants from op0 to op1, but the code comment hopefully makes that clear.
I don't think there are any other identities like that.

Fixes #54364

Differential Revision: https://reviews.llvm.org/D122390
2022-03-24 10:25:16 -04:00
Louis Dionne fea3ca5dc8 [libc++][NFC] Refactor the ABI changelog
Add missing commit SHAs in a few cases, and use "All Platforms" when
the change affected all platforms instead of explicitly listing the
platforms, since there's too many to list exhaustively.
2022-03-24 10:24:43 -04:00
Kadir Cetinkaya 50f4f32b56
[clangd] Retain main file fixes attached to diags from preamble
Clangd ignores fixits if the diagnsotics is outside the main file (e.g.
a note on a declaration from a header), but the fix might still be inside the
main file (e.g. change the function call).

This patch changes the logic to retain fixes that touch main file, if the
diagnostic owning them is still inside main file, even if they are attached to a
note outside the main file.

Differential Revision: https://reviews.llvm.org/D122315
2022-03-24 15:19:25 +01:00
Valentin Clement c6a9ce2b6b
[flang][OpenACC] Lower update directive
This patch adds lowering for the `!$acc update`
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D122387

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122396
2022-03-24 15:19:05 +01:00
Valentin Clement 39157b98fd
[flang][OpenACC] Lower init/shutdown directive
This patch adds lowering for the `!$acc init` and `!$acc shutdown`
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D122384

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122387
2022-03-24 15:18:09 +01:00
Valentin Clement 67defe5067
[flang][OpenACC] Lower exit data directive
This patch adds lowering for the `!$acc exit data` directive
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Depends on D122384

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122386
2022-03-24 15:15:56 +01:00
Valentin Clement 12d22cea73
[flang][OpenACC] Lower enter data directive
This patch adds lowering for the `!$acc enter data` directive
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122384
2022-03-24 15:01:05 +01:00
Valentin Clement 30b4421a74
[flang][NFC] Add lowering test for array expression
This patches adds lowering tests for some array
expressions use cases.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
2022-03-24 14:59:33 +01:00
Louis Dionne 5c458f3e57 [libc++][NFC] Update ABI changelog to account for new assertion handler 2022-03-24 09:57:41 -04:00
Sven van Haastregt 677d0e7495 [OpenCL] opencl-c.h: remove x/y/z arg names
This simplifies completeness comparisons against OpenCLBuiltins.td and
also makes the header no longer "claim" the identifiers "x", "y" and
"z".

Continues the direction set out in D119560.
2022-03-24 13:55:41 +00:00
LLVM GN Syncbot ced9bbe0b2 [gn build] Port 62d5f254cc 2022-03-24 13:50:02 +00:00
Haojian Wu 62d5f254cc [pseudo] Introduce parse forest.
Parse forest is the output of the GLR parser, it is a tree-like DAG
which presents all possible parse trees without duplicating subparse structures.

This is a patch split from https://reviews.llvm.org/D121150.

Differential Revision: https://reviews.llvm.org/D122139
2022-03-24 14:47:17 +01:00
Djordje Todorovic 9dbc687a5e NFC: [LICM] Update some stale comments
After removing the MaybePromotable, some comments
became stale. This improves them.

Differential Revision: https://reviews.llvm.org/D122319
2022-03-24 14:37:20 +01:00
Haojian Wu f383b88d82 [pseudo] Sort nonterminals based on their reduction order.
Reductions need to be performed in a careful order in GLR parser, to
make sure we gather all alternatives before creating an ambigous forest
node.

This patch encodes the nonterminal order into the rule id, so that we
can efficiently to determinal ordering of reductions in GLR parser.

This patch also abstracts to a TestGrammar, which is shared among tests.

This is a part of the GLR parser, https://reviews.llvm.org/D121368,
https://reviews.llvm.org/D121150

Differential Revision: https://reviews.llvm.org/D122303
2022-03-24 14:30:12 +01:00
Qiu Chaofan 895e5b2d80 [NFC] Format and uglify PowerPC intrinsics headers
This change formats PowerPC intrinsics wrapper headers into LLVM style,
and add extra prefix '__' to all variables to prevent conflict with user
code.
2022-03-24 21:14:55 +08:00
Nico Weber 028f9f5b2b [gn build] remove a "from __future__" import not needed after 0ff3cc2087 2022-03-24 09:07:54 -04:00
Alexey Bataev 20973c0841 [SLP][NFC]Fix param name in comments, NFC. 2022-03-24 05:58:42 -07:00
Nathan Sidwell de867c6d6e [clang] Reformat
Reformat some misindentation that is coincidentally close to a piece
being worked on.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D122314
2022-03-24 05:56:23 -07:00
Aaron Ballman 4d20781b69 Typo fix in the documentation; NFC 2022-03-24 08:56:14 -04:00
Martin Storsjö 98885c4e14 [compiler-rt] [cmake] Fix a typo in a variable name
There's no other references to this variable name, but other files
refer to the same with the same name but with double Fs.
2022-03-24 14:37:59 +02:00
Jakob Johnson 9b79187c96 [trace][intelpt] Server side changes for TSC to wall time conversion
Update the response schema of the TraceGetState packet and add
Intel PT specific response structure that contains the TSC conversion,
if it exists. The IntelPTCollector loads the TSC conversion and caches
it to prevent unnecessary calls to perf_event_open. Move the TSC conversion
calculation from Perf.h to TraceIntelPTGDBRemotePackets.h to remove
dependency on Linux specific headers.

Differential Revision: https://reviews.llvm.org/D122246
2022-03-24 05:36:21 -07:00
LLVM GN Syncbot 621cc83fc1 [gn build] Port 406bde9a15 2022-03-24 12:12:11 +00:00
Nikita Popov 840bb72543 [lldb] Avoid pointer element type accesses 2022-03-24 13:09:23 +01:00
Qiu Chaofan 406bde9a15 [PowerPC] [Clang] Add SSE4 and BMI intrinsics implementation
Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D119407
2022-03-24 20:03:08 +08:00
Nikita Popov b3fbbabdc1 [lldb] Use byval type
Query byval type instead of pointer element type.
2022-03-24 12:55:42 +01:00
Nikita Popov 00fb050408 [lldb] Remove unused Module argument (NFC) 2022-03-24 12:53:02 +01:00
Nikita Popov c2b3a9abc8 [Docs] Update opaque pointers transition state (NFC)
Opaque pointer support in Clang is now complete.
2022-03-24 11:51:54 +01:00
Shengchen Kan c34365149d [X86][NFC] Remove unused variable introduce by D121785 2022-03-24 18:48:10 +08:00
gysit b1b57f8104 [mlir][linalg] Support padding LinalgOps in use-def chain.
Previously, only LinalgOps whose operands are defined by an ExtractSliceOp could be padded. The revision supports walking a use-def chain of LinalgOps to find an ExtractSliceOp.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D122116
2022-03-24 10:44:44 +00:00
Antonio Frighetto 6872c8bdc4 [NFC] Mark derived destructors as `override`
Derived destructors can be marked as override, in order to prevent
possible compilation failures of projects depending on those
headers (when compiled with flags -Wall, -Wsuggest-destructor-override,
-Winconsistent-missing-destructor-override).

Differential Revision: https://reviews.llvm.org/D121993
2022-03-24 11:42:47 +01:00
gysit 53f7fb0a87 [mlir][linalg] Do not fuse shape-only producers.
This revision introduces a heuristic to stop fusion for shape-only tensors. A shape-only tensor only defines the shape of the consumer computation while the data is not used. Pure producer consumer fusion thus shall not fuse the producer of a shape-only tensor. In particular, since the shape-only tensor will have other uses that actually consume the data.

The revision enables fusion for consumers that have two uses of the same tensor. One as input operand and one as shape-only output operand. In these cases, we want to fuse only the input operand and avoid output fusion via iteration argument.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D120981
2022-03-24 10:22:41 +00:00
David Green ec93b28909 [AArch64] Lower 3 and 4 sources buildvectors to TBL
The default expansion for buildvectors is to extract each element and
insert them into a new vector. That involves a lot of copying to/from
the GPR registers. TLB3 and TLB4 can be relatively slow instructions
with the mask needing to be loaded from a constant pool, but they should
always be better than all the moves to/from GPRs.

Differential Revision: https://reviews.llvm.org/D121137
2022-03-24 10:02:33 +00:00
Benjamin Kramer 9ed466e359 [bazel] glob LLVMCoroutines headers to make the build rule less fragile 2022-03-24 11:01:08 +01:00
Benjamin Kramer 38d248aadd [bazel] Set the default of LLVM_UNREACHABLE_OPTIMIZE to 1
This matches the CMake default. LLVM_UNREACHABLE_OPTIMIZE=0 doesn't
build with gcc
2022-03-24 10:56:43 +01:00
Daniil Kovalev c53cbce45e [CodeGen] Define ABI breaking class members correctly
Non-static class members declared under #ifndef NDEBUG should be declared
under #if LLVM_ENABLE_ABI_BREAKING_CHECKS to make headers library-friendly and
allow cross-linking, as discussed in D120714.

Differential Revision: https://reviews.llvm.org/D121549
2022-03-24 12:42:59 +03:00
Daniil Kovalev 828b63c309 [NVPTX] Enhance vectorization of ld.param & st.param
Since function parameters and return values are passed via param space, we
can force special alignment for values hold in it which will add vectorization
options. This change may be done if the function has private or internal
linkage. Special alignment is forced during 2 phases.

1) Instruction selection lowering. Here we use special alignment for function
   prototypes (changing both own return value and parameters alignment), call
   lowering (changing both callee's return value and parameters alignment).

2) IR pass nvptx-lower-args. Here we change alignment of byval parameters that
   belong to param space (or are casted to it). We only handle cases when all
   uses of such parameters are loads from it. For such loads, we can change the
   alignment according to special type alignment and the load offset. Then,
   load-store-vectorizer IR pass will perform vectorization where alignment
   allows it.

Special alignment calculated as maximum from default ABI type alignment and
alignment 16. Alignment 16 is chosen because it's the maximum size of
vectorized ld.param & st.param.

Before specifying such special alignment, we should check if it is a multiple
of the alignment that the type already has. For example, if a value has an
enforced alignment of 64, default ABI alignment of 4 and special alignment
of 16, we should preserve 64.

This patch will be followed by a refactoring patch that removes duplicating
code in handling byval and non-byval arguments.

Differential Revision: https://reviews.llvm.org/D120129
2022-03-24 12:36:52 +03:00
Dávid Bolvanský 2af845a651 Relands "[Clang] -Wunused-but-set-variable warning - handle also pre/post unary operators" 2022-03-24 10:34:44 +01:00
Daniil Kovalev a034878564 Revert "[NVPTX] Enhance vectorization of ld.param & st.param"
This reverts commit f854434f0f.

Placed URL to wrong differential revision in commit message.
2022-03-24 12:32:06 +03:00