Arthur Eubanks [Tue, 22 Mar 2022 00:41:06 +0000 (17:41 -0700)]
[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
Dmitry Vyukov [Thu, 24 Mar 2022 16:07:32 +0000 (17:07 +0100)]
[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
Mike Rice [Wed, 23 Mar 2022 22:37:06 +0000 (15:37 -0700)]
[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
Momchil Velikov [Thu, 24 Mar 2022 15:27:04 +0000 (15:27 +0000)]
[AArch64] Async unwind - function prologues
Re-commit of
32e8b550e5439c7e4aafa73894faffd5f25d0d05
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
Valentin Clement [Thu, 24 Mar 2022 16:15:00 +0000 (17:15 +0100)]
[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
Craig Topper [Thu, 24 Mar 2022 15:59:00 +0000 (08:59 -0700)]
[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
Alexander Belyaev [Thu, 24 Mar 2022 15:29:21 +0000 (16:29 +0100)]
[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
Aaron Ballman [Thu, 24 Mar 2022 15:51:31 +0000 (11:51 -0400)]
Diagnose use of a naked attribute on a member function in ms-mode
This matches the behavior of cl.exe.
Jakob Koschel [Thu, 24 Mar 2022 06:52:16 +0000 (07:52 +0100)]
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
Florian Hahn [Thu, 24 Mar 2022 14:58:23 +0000 (14:58 +0000)]
[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
Aaron Ballman [Thu, 24 Mar 2022 14:38:37 +0000 (10:38 -0400)]
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.
Valentin Clement [Thu, 24 Mar 2022 14:29:59 +0000 (15:29 +0100)]
[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
Sanjay Patel [Thu, 24 Mar 2022 14:01:41 +0000 (10:01 -0400)]
[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
Louis Dionne [Thu, 24 Mar 2022 14:00:23 +0000 (10:00 -0400)]
[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.
Kadir Cetinkaya [Wed, 23 Mar 2022 14:22:47 +0000 (15:22 +0100)]
[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
Valentin Clement [Thu, 24 Mar 2022 14:18:29 +0000 (15:18 +0100)]
[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
Valentin Clement [Thu, 24 Mar 2022 14:16:46 +0000 (15:16 +0100)]
[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
Valentin Clement [Thu, 24 Mar 2022 14:15:40 +0000 (15:15 +0100)]
[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
Valentin Clement [Thu, 24 Mar 2022 14:00:52 +0000 (15:00 +0100)]
[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
Valentin Clement [Thu, 24 Mar 2022 13:58:27 +0000 (14:58 +0100)]
[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>
Louis Dionne [Thu, 24 Mar 2022 13:57:28 +0000 (09:57 -0400)]
[libc++][NFC] Update ABI changelog to account for new assertion handler
Sven van Haastregt [Thu, 24 Mar 2022 13:55:41 +0000 (13:55 +0000)]
[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.
LLVM GN Syncbot [Thu, 24 Mar 2022 13:50:02 +0000 (13:50 +0000)]
[gn build] Port
62d5f254ccd0
Haojian Wu [Mon, 21 Mar 2022 14:32:15 +0000 (15:32 +0100)]
[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
Djordje Todorovic [Wed, 23 Mar 2022 15:00:03 +0000 (16:00 +0100)]
NFC: [LICM] Update some stale comments
After removing the MaybePromotable, some comments
became stale. This improves them.
Differential Revision: https://reviews.llvm.org/D122319
Haojian Wu [Wed, 23 Mar 2022 10:38:49 +0000 (11:38 +0100)]
[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
Qiu Chaofan [Thu, 24 Mar 2022 12:46:35 +0000 (20:46 +0800)]
[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.
Nico Weber [Thu, 24 Mar 2022 13:07:46 +0000 (09:07 -0400)]
[gn build] remove a "from __future__" import not needed after
0ff3cc2087b9
Alexey Bataev [Thu, 24 Mar 2022 12:48:35 +0000 (05:48 -0700)]
[SLP][NFC]Fix param name in comments, NFC.
Nathan Sidwell [Wed, 23 Mar 2022 14:27:43 +0000 (07:27 -0700)]
[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
Aaron Ballman [Thu, 24 Mar 2022 12:55:43 +0000 (08:55 -0400)]
Typo fix in the documentation; NFC
Martin Storsjö [Thu, 24 Mar 2022 11:05:30 +0000 (13:05 +0200)]
[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.
Jakob Johnson [Tue, 22 Mar 2022 13:15:56 +0000 (06:15 -0700)]
[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
LLVM GN Syncbot [Thu, 24 Mar 2022 12:12:11 +0000 (12:12 +0000)]
[gn build] Port
406bde9a1513
Nikita Popov [Thu, 24 Mar 2022 12:07:24 +0000 (13:07 +0100)]
[lldb] Avoid pointer element type accesses
Qiu Chaofan [Thu, 24 Mar 2022 12:03:08 +0000 (20:03 +0800)]
[PowerPC] [Clang] Add SSE4 and BMI intrinsics implementation
Reviewed By: jsji
Differential Revision: https://reviews.llvm.org/D119407
Nikita Popov [Thu, 24 Mar 2022 11:55:42 +0000 (12:55 +0100)]
[lldb] Use byval type
Query byval type instead of pointer element type.
Nikita Popov [Thu, 24 Mar 2022 11:53:02 +0000 (12:53 +0100)]
[lldb] Remove unused Module argument (NFC)
Nikita Popov [Thu, 24 Mar 2022 10:51:04 +0000 (11:51 +0100)]
[Docs] Update opaque pointers transition state (NFC)
Opaque pointer support in Clang is now complete.
Shengchen Kan [Thu, 24 Mar 2022 10:46:59 +0000 (18:46 +0800)]
[X86][NFC] Remove unused variable introduce by D121785
gysit [Thu, 24 Mar 2022 10:28:20 +0000 (10:28 +0000)]
[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
Antonio Frighetto [Thu, 24 Mar 2022 10:42:47 +0000 (11:42 +0100)]
[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
gysit [Thu, 24 Mar 2022 10:22:28 +0000 (10:22 +0000)]
[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
David Green [Thu, 24 Mar 2022 10:02:33 +0000 (10:02 +0000)]
[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
Benjamin Kramer [Thu, 24 Mar 2022 10:01:08 +0000 (11:01 +0100)]
[bazel] glob LLVMCoroutines headers to make the build rule less fragile
Benjamin Kramer [Thu, 24 Mar 2022 09:55:02 +0000 (10:55 +0100)]
[bazel] Set the default of LLVM_UNREACHABLE_OPTIMIZE to 1
This matches the CMake default. LLVM_UNREACHABLE_OPTIMIZE=0 doesn't
build with gcc
Daniil Kovalev [Thu, 24 Mar 2022 09:42:59 +0000 (12:42 +0300)]
[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
Daniil Kovalev [Thu, 24 Mar 2022 09:34:25 +0000 (12:34 +0300)]
[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
Dávid Bolvanský [Thu, 24 Mar 2022 09:32:57 +0000 (10:32 +0100)]
Relands "[Clang] -Wunused-but-set-variable warning - handle also pre/post unary operators"
Daniil Kovalev [Thu, 24 Mar 2022 09:30:28 +0000 (12:30 +0300)]
Revert "[NVPTX] Enhance vectorization of ld.param & st.param"
This reverts commit
f854434f0f2a01027bdaad8e6fdac5a782fce291.
Placed URL to wrong differential revision in commit message.
Dávid Bolvanský [Thu, 24 Mar 2022 09:31:11 +0000 (10:31 +0100)]
[NFCI] Fix set-but-unused warning in X86DisassemblerTables.cpp
Daniil Kovalev [Thu, 24 Mar 2022 08:57:37 +0000 (11:57 +0300)]
[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/D121549
Krasimir Georgiev [Thu, 24 Mar 2022 09:14:13 +0000 (10:14 +0100)]
Revert "[clang-format] Correctly recognize arrays in template parameter list."
This reverts commit
126b37a713dc1c67cbc7dc8b5288b2f907c906a9.
Regressed some ObjC patterns, see comments on https://reviews.llvm.org/D121584.
Qiu Chaofan [Thu, 24 Mar 2022 08:58:58 +0000 (16:58 +0800)]
[Clang] Add option to set alternative toolchain path
In some cases, we need to set alternative toolchain path other than the
default with system (headers, libraries, dynamic linker prefix, ld path,
etc.), e.g., to pick up newer components, but keep sysroot at the same
time (to pick up extra packages).
This change introduces a new option --overlay-platform-toolchain to set
up such alternative toolchain path.
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D121992
Raphael Isemann [Thu, 24 Mar 2022 08:56:51 +0000 (09:56 +0100)]
Revert "[ELF] Enable new passmanager plugin support for LTO"
This reverts commit
32012eb11b235e1560a253664095676ea8ebd027.
Broke CMake configuration.
Kristof Beyls [Thu, 24 Mar 2022 08:55:32 +0000 (09:55 +0100)]
Update my office hours
Adding LLVM security group as another topic I can talk about.
David Green [Thu, 24 Mar 2022 08:55:27 +0000 (08:55 +0000)]
[AArch64] Make some methods static. NFC
Peixin-Qiao [Thu, 24 Mar 2022 08:50:20 +0000 (16:50 +0800)]
[NFC][flang] Remove unused code in lowerExplicitLowerBounds
There is no need to lower the implicit lower bounds for assumed-shape
array in lowerExplicitLowerBounds. Remove the unused code.
Reviewed By: Jean Perier
Differential Revision: https://reviews.llvm.org/D122280
Tobias Hieta [Wed, 23 Mar 2022 09:21:36 +0000 (10:21 +0100)]
[clang-cl] Ignore /Wv and /Wv:17 flags
MSVC supports passing /Wv and /Wv:17 to ignore warnings added
since that version. Clang doesn't have a option like this - but
we can ignore this flag instead of error.
MSVC documentation: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
Reviewed By: hans, mstorsjo
Differential Revision: https://reviews.llvm.org/D122298
Jean Perier [Thu, 24 Mar 2022 08:06:59 +0000 (09:06 +0100)]
[flang] UBOUND() edge case: empty dimension
Similarly to LBOUND in https://reviews.llvm.org/D121488, UBOUND must
return zero for an empty dimension, no matter the specification
expression.
Add a GetUBOUND method to be used in expression rewrite that prevents
folding UBOUND to a bound specification expression if the extent is
not a compile time constant.
Fold the case where the extents is known to be zero (and also deal with
this case in LBOUND since we can and should to comply with constant
expression requirements).
Differential Revision: https://reviews.llvm.org/D122242
Nimish Mishra [Thu, 24 Mar 2022 07:57:19 +0000 (13:27 +0530)]
[flang][OpenMP] Added lowering support for sections construct
This patch adds lowering support (from PFT to FIR) for sections construct
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D122302
Dávid Bolvanský [Thu, 24 Mar 2022 07:53:42 +0000 (08:53 +0100)]
[NFCI] Fix set-but-unused warning in SPIRVUtilsGen.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 07:33:29 +0000 (08:33 +0100)]
[NFCI] Fix set-but-unused warning in InstCombineAddSub.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 07:17:14 +0000 (08:17 +0100)]
[NFCI] Fix set-but-unused warning in RISCVAsmParser.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 07:15:27 +0000 (08:15 +0100)]
[NFCI] Fix set-but-unused warning in X86LoadValueInjectionLoadHardening.cpp
jacquesguan [Sat, 15 Jan 2022 06:28:37 +0000 (14:28 +0800)]
[RISCV] Add patterns for vector widening integer multiply
Add patterns for vector widening integer multiply instructions
Differential Revision: https://reviews.llvm.org/D117385
Dávid Bolvanský [Thu, 24 Mar 2022 07:00:19 +0000 (08:00 +0100)]
[NFCI] Fix set-but-unused warning in UnwrappedLineParser.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:58:11 +0000 (07:58 +0100)]
[NFCI] Fix set-but-unused warning in GlobalsStream.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:56:03 +0000 (07:56 +0100)]
[NFCI] Fix set-but-unused warning in AddressSanitizer.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:52:19 +0000 (07:52 +0100)]
[NFCI] Fix set-but-unused warning in X86AsmBackend.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:50:57 +0000 (07:50 +0100)]
[NFCI] Fix set-but-unused warning in ClangAttrEmitter.cpp
Timm Bäder [Tue, 22 Mar 2022 08:27:27 +0000 (09:27 +0100)]
[clang][parse] Move source range into ParsedAttibutesView
Move the SourceRange from the old ParsedAttributesWithRange into
ParsedAttributesView, so we have source range information available
everywhere we use attributes.
This also removes ParsedAttributesWithRange (replaced by simply using
ParsedAttributes) and ParsedAttributesVieWithRange (replaced by using
ParsedAttributesView).
Differential Revision: https://reviews.llvm.org/D121201
Jakob Koschel [Thu, 24 Mar 2022 06:52:16 +0000 (07:52 +0100)]
[ELF] Enable new passmanager plugin support for LTO
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
Siva Chandra Reddy [Thu, 24 Mar 2022 06:58:46 +0000 (06:58 +0000)]
[libc] Use real objects and archives in integration tests.
Previously, we used empty, non-ELF crti.o, crtn.o, libm.a and libc++.a
files. Instead, we now still use dummies but they are real ELF object
files and archives.
gysit [Thu, 24 Mar 2022 06:55:43 +0000 (06:55 +0000)]
[mlir][linalg] Create AffineMinOp map in canoncial form.
Create the AffineMinOp used to compute the padding width in canonical form and update the tests.
Reviewed By: springerm
Differential Revision: https://reviews.llvm.org/D122311
Dávid Bolvanský [Thu, 24 Mar 2022 06:49:21 +0000 (07:49 +0100)]
[NFCI] Fix set-but-unused warning in CGOpenMPRuntime.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:47:50 +0000 (07:47 +0100)]
[NFCI] Fix set-but-unused warning in ExprConstant.cpp
Dávid Bolvanský [Thu, 24 Mar 2022 06:43:24 +0000 (07:43 +0100)]
Revert "[Clang] -Wunused-but-set-variable warning - handle also pre/post unary operators"
This reverts commit
460fc440ad8d41ca2e3882987512989b1c188fbe.
Shraiysh Vaishay [Thu, 24 Mar 2022 06:16:09 +0000 (11:46 +0530)]
[flang] Single construct translation from PFT to FIR
This patch adds translation for single construct along with nowait
clause from PFT to FIR.
Allocate clause is added as a TODO as handleAllocateClause is added in
D122302.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D122324
Zi Xuan Wu [Fri, 18 Mar 2022 07:40:14 +0000 (15:40 +0800)]
[CSKY] Enhance asm parser and relocation fixup for some special symbol address instruction
Add processing of parsing and emiting lrw/jsri/jmpi instruction, including related fixup and relocation.
Add relax support about pseudo instructions such as jbr/jbsr.
Add objdump format support like arm in llvm-objdump.
Kai Luo [Thu, 24 Mar 2022 06:02:27 +0000 (14:02 +0800)]
[clang][NFC] Fix warning of integer comparison
```
warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
```
Fix https://lab.llvm.org/buildbot/#/builders/57/builds/16220.
Shraiysh Vaishay [Thu, 24 Mar 2022 04:38:46 +0000 (10:08 +0530)]
[mlir][OpenMP][NFC] Remove unnecessary attributes
These attributes were added because of oilist required them earlier. It
no longer requires them and so these attributes can be safely removed
from the operations.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D122289
Shraiysh Vaishay [Thu, 24 Mar 2022 04:29:34 +0000 (09:59 +0530)]
[mlir][OpenMP] omp.single translation to LLVM IR
This patch adds translation from omp.single to LLVM IR.
Depends on D122288
Reviewed By: ftynse, kiranchandramohan
Differential Revision: https://reviews.llvm.org/D122297
Kai Luo [Thu, 24 Mar 2022 04:23:12 +0000 (12:23 +0800)]
[X86][NFC] Fix missing `override` in `isMemUseUpRegs`
Fix warning
```
warning: 'isMemUseUpRegs' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
```
Siva Chandra Reddy [Wed, 23 Mar 2022 03:49:26 +0000 (03:49 +0000)]
[libc] Add implementations of fopen, flose, fread, fwrite and fseek.
A follow up patch will add feof and ferror.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D122327
Jonas Devlieghere [Thu, 24 Mar 2022 04:00:57 +0000 (21:00 -0700)]
[lldb] Test parsing the symtab with indirect symbols from the shared cache
This patch adds a test for
b0dc2fae6025. That commit fixed a bug where
we could increment the indirect symbol offset every time we parsed the
symbol table.
Ben Shi [Thu, 24 Mar 2022 03:30:58 +0000 (03:30 +0000)]
[clang][AVR] Implement standard calling convention for AVR and AVRTiny
This patch implements avr-gcc's calling convention:
https://gcc.gnu.org/wiki/avr-gcc#Calling_Convention
Reviewed By: aykevl
Differential Revision: https://reviews.llvm.org/D120720
Joseph Huber [Thu, 24 Mar 2022 03:07:51 +0000 (23:07 -0400)]
[CUDA][FIX] Fix name conflict in getNVPTXTargetFeatures
Summary:
There was a naming conflict in the getNVPTXTargetFeatures function that
prevented some compilers from correctly disambiguating between the
enumeration and variable of the same name. Rename the variable to avoid
this.
owenca [Wed, 23 Mar 2022 10:16:19 +0000 (03:16 -0700)]
[clang-format] Fix invalid code generation with comments in lambda
Fixes #51234 and #54496
Differential Revision: https://reviews.llvm.org/D122301
Ben Shi [Mon, 14 Mar 2022 10:35:34 +0000 (10:35 +0000)]
[AVR] Reject/Reserve R0~R15 on AVRTiny.
Reviewed By: aykevl, dylanmckay
Differential Revision: https://reviews.llvm.org/D121672
Chuanqi Xu [Wed, 23 Feb 2022 08:23:26 +0000 (16:23 +0800)]
[C++20] [Modules] Make the linkage consistent for template and its
specialization
Before the patch, the compiler would crash for the test due to
inconsistent linkage.
This patch tries to avoid it by make the linkage consistent for template
and its specialization. After the patch, the behavior of compiler would
be partially correct for the case.
The correct one is:
```
export template<class T>
void f() {}
template<>
void f<int>() {}
```
In this case, the linkage for both declaration should be external (the
wording I get by consulting in WG21 is "the linkage for name f should be
external").
And for the case:
```
template<class T>
void f() {}
export template<>
void f<int>() {}
```
Compiler should reject it. This isn't done now. After all, this patch would
stop a crash.
Reviewed By: iains, aaron.ballman, dblaikie
Differential Revision: https://reviews.llvm.org/D120397
Ben Shi [Wed, 23 Mar 2022 06:37:32 +0000 (06:37 +0000)]
[AVR][MC] Emit some aliases for GPRs and IO registers
Emit the following aliases (if available):
.set __tmp_reg__, [0|16]
.set __zero_reg__, [1|17]
.set __SREG__, 63
.set __SP_H__, 62
.set __SP_L__, 61
.set __EIND__, 60
.set __RAMPZ__, 59
Reviewed By: aykevl
Differential Revision: https://reviews.llvm.org/D119807
Ben Shi [Tue, 1 Mar 2022 08:44:49 +0000 (08:44 +0000)]
[clang][AVR] Implement standard calling convention for AVR and AVRTiny
This patch implements avr-gcc's calling convention:
https://gcc.gnu.org/wiki/avr-gcc#Calling_Convention
Reviewed By: aykevl
Differential Revision: https://reviews.llvm.org/D120720
Kiran Chandramohan [Thu, 24 Mar 2022 01:50:59 +0000 (01:50 +0000)]
[Flang][NFC] Rearrange intrinsic generator functions
This patch rearranges the generator functions for various intrinsics.
The rearrangement will help to identify any missing functionality.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D122334
LLVM GN Syncbot [Thu, 24 Mar 2022 01:49:33 +0000 (01:49 +0000)]
[gn build] Port
64902d335c21
Xiang1 Zhang [Thu, 24 Mar 2022 01:24:15 +0000 (09:24 +0800)]
[Inline asm] Fix mangle problem when variable used in inline asm.
(Correct 'Mem symbol + IntelExpr' output in PIC model)
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D121785
Xiang1 Zhang [Thu, 24 Mar 2022 00:48:35 +0000 (08:48 +0800)]
[InlineAsm] Fix mangle problem when global variable used in inline asm
(Add modifier P for ARR[BaseReg+IndexReg+..])
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D120887
Xiang1 Zhang [Thu, 24 Mar 2022 00:46:15 +0000 (08:46 +0800)]
[Inline asm] Fix mangle problem when variable used in inline asm.
(Connect InlineAsm Memory Operand with its real value not just name)
Revert 2 history bugfix patch:
Revert "[X86][MS-InlineAsm] Make the constraint *m to be simple place holder"
This patch revert https://reviews.llvm.org/D115225 which mainly
fix problems intrduced by https://reviews.llvm.org/D113096
This reverts commit
d7c07f60b35f901f5bd9153b11807124a9bdde60.
Revert "Reland "[X86][MS-InlineAsm] Use exact conditions to recognize MS global variables""
This patch revert https://reviews.llvm.org/D116090 which fix problem
intrduced by https://reviews.llvm.org/D115225
This reverts commit
24c68ea1eb4fc0d0e782424ddb02da9e8c53ddf5.
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D120886
Julian Lettner [Thu, 24 Mar 2022 00:37:07 +0000 (17:37 -0700)]
Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with
`__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.
Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.
Enable fallback to the old behavior via Clang driver flag
(`-fregister-global-dtors-with-atexit`) or llc / code generation flag
(`-lower-global-dtors-via-cxa-atexit`). This escape hatch will be
removed in the future.
Differential Revision: https://reviews.llvm.org/D121736
Vasileios Porpodas [Thu, 24 Mar 2022 00:32:46 +0000 (17:32 -0700)]
Recommit "[SLP] Fix lookahead operand reordering for splat loads." attempt 3, fixed assertion crash.
Original review: https://reviews.llvm.org/D121354
This reverts commit
e6ead19b774718113007ecb1a4449d7af0cbcfeb.