Commit Graph

418443 Commits

Author SHA1 Message Date
Valentin Clement 518a837e93
[flang] Add array constructor lowering tests
This patch adds some tests for the lowering of
array constructors.

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

Reviewed By: PeteSteinfeld

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

Co-authored-by: mleair <leairmark@gmail.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
2022-03-17 21:40:37 +01:00
Stanislav Mekhanoshin d9ac55fab2 [AMDGPU] New MFMA names for existing instructions
Old names are supported as aliases.
_1k MFMA got new opcodes.

Differential Revision: https://reviews.llvm.org/D121741
2022-03-17 13:05:36 -07:00
Stanislav Mekhanoshin e0b9364b5c [AMDGPU] Add gfx90a and gfx940 to get_elf_mach_gfx_name.cpp
Differential Revision: https://reviews.llvm.org/D120849
2022-03-17 13:05:07 -07:00
Ben Barham 4125524112 [VFS] Add print/dump to the whole FileSystem hierarchy
For now most are implemented by printing out the name of the filesystem,
but this can be expanded in the future. Only `OverlayFileSystem` and
`RedirectingFileSystem` are properly implemented in this patch.
  - `OverlayFileSystem`: Prints each filesystem in the order that any
    operations are actually run on them. Optionally prints recursively.
  - `RedirectingFileSystem`: Prints out all mappings, as well as the
    `ExternalFS`. Most of this was already implemented other than the
    handling for the `DirectoryRemap` case and to actually print out the
    mapping.

Each FS should implement `printImpl` rather than `print`, where the
latter just fowards to the former. This is to avoid spreading the
default arguments through to the subclasses (where we may miss updating
in the future).

Differential Revision: https://reviews.llvm.org/D121421
2022-03-17 13:02:40 -07:00
Johannes Doerfert b4cc3b1dd8 [OpenMP][FIX] Make metadata and attribute check lines less detailed
The update_cc script should really do this automatically :(
2022-03-17 14:58:22 -05:00
Michel Weber dad80e9710 [MLIR][Presburger] introduce SetCoalescer
This patch refactors the current coalesce implementation. It introduces
the `SetCoalescer`, a class in which all coalescing functionality lives.
The main advantage over the old design is the fact that the vectors of
constraints do not have to be passed around, but are implemented as
private fields of the SetCoalescer. This will become especially
important once more inequality types are introduced.

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D121364
2022-03-17 19:52:01 +00:00
Benjamin Kramer d80210fc90 [dsymutil] Store possible Swift reflection sections in an array
No need for a unordered_map of enum, which is also broken in GCC before
6.1. No functionality change intended.
2022-03-17 20:37:39 +01:00
Benjamin Kramer 548757ba86 [mlir] Move InterfaceMap::InterfaceMap to the cpp file
So we don't end up with a copy of std::sort in every dialect definition.
NFCI.
2022-03-17 20:14:24 +01:00
Benjamin Kramer ba8e336a23 [mlir] Use array_pod_sort for sorting stats/counters.
This isn't performance sensitive and array_pod_sort is a lot smaller.
NFCI.
2022-03-17 20:14:24 +01:00
Stanislav Mekhanoshin 522b259976 [AMDGPU] Allow v_accvgpr_write to use SGPR src on gfx940
Differential Revision: https://reviews.llvm.org/D121843
2022-03-17 12:12:06 -07:00
LLVM GN Syncbot f18590118e [gn build] Port 22570bac69 2022-03-17 19:06:22 +00:00
Kevin P. Neal ae6db2f3d8 Precommit test for D121483:
[FPEnv][InstSimplify] Teach CannotBeNegativeZero() about constrained intrinsics.
2022-03-17 15:03:05 -04:00
Johannes Doerfert 052a6c744a [OpenMP][FIX] Relax test check lines 2022-03-17 14:01:47 -05:00
Pavel Labath f93d861349
[lldb] Fix ^C handling in IOHandlerProcessSTDIO
D120762 accidentally moved the interrupt check into the block which was
reading stdio. This meant that a ^C only took effect after a regular
character has been pressed.

This patch fixes that and adds a (pexpect) test.

Differential revision: https://reviews.llvm.org/D121912
2022-03-17 11:52:19 -07:00
Zahira Ammarguellat bbf0d1932a Currently the control of the eval-method is mixed with fast-math.
FLT_EVAL_METHOD tells the user the precision at which, temporary results
are evaluated but when fast-math is enabled, the numeric values are not
guaranteed to match the source semantics, so the eval-method is
meaningless.
For example, the expression `x + y + z` has as source semantics `(x + y)
+ z`. FLT_EVAL_METHOD is telling the user at which precision `(x + y)`
is evaluated. With fast-math enable the compiler can choose to
evaluate the expression as `(y + z) + x`.
The correct behavior is to set the FLT_EVAL_METHOD to `-1` to tell the
user that the precision of the intermediate values is unknow. This
patch is doing that.

Differential Revision: https://reviews.llvm.org/D121122
2022-03-17 11:48:03 -07:00
Vang Thao 27e1931508 [AMDGPU] Fix PreRARematerialize scheduler pass sinking subreg defs
When collecting trivially rematerializable defs, skip any subreg defs. We do not want to sink these.

Differential Revision: https://reviews.llvm.org/D121874
2022-03-17 11:38:53 -07:00
Sterling Augustine bd38234d76 Reland "Use a stable-sort when combining bases"
Differential Revision: https://reviews.llvm.org/D121922
2022-03-17 11:32:16 -07:00
Louis Dionne d0af4276d6 [libc++] Switch to the new testing configurations by default
We've been meaning to remove support for the legacy testing configuration
for a long time. This patch switches the default from the legacy config
to the appropriate new-style configuration based on a few hints.

We've been running with the new-style configuration for more than a year
in our CI, however it's possible that this will uncover issues with some
users that run the tests on platforms that we don't support yet with the
new-style configs. Unfortunately, there is no way to know about it other
than to land this patch and see whether anything breaks.

Differential Revision: https://reviews.llvm.org/D121632
2022-03-17 14:26:56 -04:00
William S. Moses 164c7afaf5 [MLIR][Math] Add constant folder for powf
Constant fold powf, given two constant operands and a compatible type

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D121845
2022-03-17 14:19:47 -04:00
Alexey Bataev d65cc85977 [SLP]Do not schedule instructions with constants/argument/phi operands and external users.
No need to schedule entry nodes where all instructions are not memory
read/write instructions and their operands are either constants, or
arguments, or phis, or instructions from others blocks, or their users
are phis or from the other blocks.
The resulting vector instructions can be placed at
the beginning of the basic block without scheduling (if operands does
not need to be scheduled) or at the end of the block (if users are
outside of the block).
It may save some compile time and scheduling resources.

Differential Revision: https://reviews.llvm.org/D121121
2022-03-17 11:03:45 -07:00
Dominic Chen 58b6521eb5 [scudo] Use portable sysconf instead of deprecated getpagesize
Differential Revision: https://reviews.llvm.org/D121859
2022-03-17 11:02:26 -07:00
Uday Bondhugula 54691a58db [MLIR] Add affine.load fold hook on global constant memrefs
Fold affine.load ops on global constant memrefs when indices are all
constant.

Reviewed By: ayzhuang

Differential Revision: https://reviews.llvm.org/D120612
2022-03-17 23:27:43 +05:30
Johannes Doerfert f02550bdd9 Reapply "[OpenMP][FIX] Allow device constructors for AMD GPU"
This reverts commit a597d6a780 and
reapplies 07b1766461.

In AMD GPU device code the globals are in AS(1). Before, we crashed if
the global was a structure. Now we simply cast away the AS before we
generate the code to initialize the global.

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

Fixes: https://github.com/llvm/llvm-project/issues/54421
2022-03-17 12:53:47 -05:00
Johannes Doerfert 88c3c346f6
Add another office hour 2022-03-17 12:48:13 -05:00
Julian Lettner 22570bac69 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
2022-03-17 10:47:13 -07:00
Jim Kitchen 414ed019ac [mlir][sparse] Introduce new binary and unary op
When the sparse_tensor dialect lowers linalg.generic,
it makes inferences about how the operations should
affect the looping logic. For example, multiplication
is an intersection while addition is a union of two
sparse tensors.

The new binary and unary op separate the looping logic
from the computation by nesting the computation code
inside a block which is merged at the appropriate level
in the lowered looping code.

The binary op can have custom computation code for the
overlap, left, and right sparse overlap regions. The
unary op can have custom computation code for the
present and absent values.

Reviewed by: aartbik

Differential Revision: https://reviews.llvm.org/D121018
2022-03-17 12:31:09 -05:00
Archibald Elliott f496330f97 [ARM] Fix Decode of tsb csync
There is a crash in the ARM backend when attempting to decode a "tsb
csync" instruction using `llvm-objdump --triple=armv8.4a -d`. The crash
was in `ARMMCInstrAnalysis::evaluateBranch` where the number of operands
in the decoded instruction (0) did not match the number of operands in
the instruction description (1).

This is becuase `tsb csync` looks like it has an operand during
assembly, but there is only one valid operand (csync), so there is no
encoding space in the instruction for the operand, so the decoder never
has a field to decode that represents `csync`.

The fix is to add a custom decode method, which ensures that this
instruction does have the right number of operands after decoding. This
method merely adds the only available operand value, `ARM_TSB::CSYNC`.

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D121479
2022-03-17 17:29:31 +00:00
Augusto Noronha 9b3af5e7b7 [dsymutil] Apply relocations present in Swift reflection sections
The strippable Swift reflection sections contain subtractor relocations
that need to be applied. There are two situations we need to support.
1) Both symbols used in the relocation come from the .o file (for
   example, one symbol lives in __swift5_fieldmd and the second in
   __swift5_reflstr).
2) One symbol comes from th .o file and the second from the main
   binary (for example, __swift5_fieldmd and __swift5_typeref).

Differential Revision: https://reviews.llvm.org/D120574
2022-03-17 14:23:20 -03:00
Dominic Chen 6ce08d5c27 [scudo][tests] Pass read-only vector by reference
Differential Revision: https://reviews.llvm.org/D121850
2022-03-17 10:17:36 -07:00
Dominic Chen 03e82d94fc [scudo] Fix test harness integration
Explicitly specify the class name to avoid selecting the wrong Run function, and inherit from the correct Test parent

Differential Revision: https://reviews.llvm.org/D121854
2022-03-17 10:17:36 -07:00
Dominic Chen 7abd6837a0 [scudo] Use nullptr instead of integer-to-pointer cast
Differential Revision: https://reviews.llvm.org/D121856
2022-03-17 10:17:36 -07:00
Dominic Chen 4787e5c34e [scudo] Don't unmap other low memory pages if mapping doesn't exist
Tests can register multiple allocators, but only the first will initialize since it initializes the TSDRegistrySharedT. Then, destruction of subsequent allocator may end up unmapping a nullptr PrimaryBase with non-zero PrimarySize.

Differential Revision: https://reviews.llvm.org/D121858
2022-03-17 10:17:36 -07:00
Dominic Chen e536419279 [scudo] Explicitly mark enum as unsigned
Differential Revision: https://reviews.llvm.org/D121860
2022-03-17 10:17:36 -07:00
Dominic Chen a6b7f31895 [scudo] Remove unused vector value initializer
Differential Revision: https://reviews.llvm.org/D121861
2022-03-17 10:17:35 -07:00
Ellis Hoag 84c6689b15 [AlwaysInliner] Check inliner errors even without assserts
When we build clang without asserts we should still check the result of
`InlineFunction()` to be sure there wasn't an error. Otherwise we could
incorrectly merge attributes in the next line.

This also removes a redundent call to `getCaller()`.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D121722
2022-03-17 10:16:23 -07:00
Zixu Wang 54b145d5ca [NFC] Disable clang/SymbolGraph test 2022-03-17 10:14:19 -07:00
Craig Topper dc516ce6c8 [RISCV] Mention Zvfh extension in release notes. NFC 2022-03-17 10:12:50 -07:00
Yuanfang Chen 7e80976fdf [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes
So it matches `__STDCPP_DEFAULT_NEW_ALIGNMENT__`.

Reviewed By: probinson, aaron.ballman

Differential Revision: https://reviews.llvm.org/D118850
2022-03-17 10:12:38 -07:00
Matt Arsenault 8d66603a48 Revert "RegAllocGreedy: Fix last chance recolor assert in impossible case"
This reverts commit c46aab01c0.

This evidently blocks compiling in some cases that used to work
before. I'm also not fully convinced this is the correct place to fix
this problem.
2022-03-17 13:12:01 -04:00
Stanislav Gatev b000b7705a [clang][dataflow] Model the behavior of non-standard optional assignment
Model nullopt, value, and conversion assignment operators.

Reviewed-by: xazax.hun

Differential Revision: https://reviews.llvm.org/D121863
2022-03-17 17:11:12 +00:00
Craig Topper bbd2ecf9f0 [RISCV] Add +experimental-zvfh extension to cover half types in vectors.
Currently we allow half types in vectors if the scalar Zfh extension
is enabled. This behavior is not inline with the vector spec. For f32
and f64 types, the Zve32f, Zve64f, Zve64d, and V explicitly control
the availablity of floating point types in vectors.

In order to make our compiler compliant, we either need to remove all support
for half in vectors or we need an extension to control it.

Draft spec here https://github.com/riscv/riscv-v-spec/pull/780

Reviewed By: kito-cheng

Differential Revision: https://reviews.llvm.org/D121345
2022-03-17 10:04:02 -07:00
Florian Hahn 4869909693
[LoopSimplifyCFG] Add test case for PR54023.
Test case for #54023.
2022-03-17 17:01:37 +00:00
LLVM GN Syncbot cb29df4998 [gn build] Port 1af5fbd5c6 2022-03-17 16:55:08 +00:00
Sterling Augustine 84810e1f74 Revert "Use a stable-sort when combining bases"
This reverts commit 81417261a1.
2022-03-17 09:54:13 -07:00
David Goldman 8522a01e84 Attempt forward fix for Linux buildbots for D116385 2022-03-17 12:49:16 -04:00
Andrzej Warzynski 00cdbd7845 [flang][nfc] Move a test
All option forwarding tests should be added to frontend-forwarding.f90
rather than files corresponding to various options. This patch moves
such test for `-mllvm` accordingly.
2022-03-17 16:47:54 +00:00
Craig Topper 7e15303062 [RISCV] Simplify scalable vector case in lowerVectorMaskExt.
Since we have SPLAT_VECTOR_PARTS these days, I don't think we need
to go through extra lengths to avoid introducing an illegal scalar type.
We can just call getConstant using the scalable vector type and let
it create either a SPLAT_VECTOR or a SPLAT_VECTOR_PARTS.

Reviewed By: frasercrmck, rogfer01

Differential Revision: https://reviews.llvm.org/D121645
2022-03-17 09:43:13 -07:00
Ingo Mueller 3a03704fd1 [mlir][docs] Fix formatting issue in Dialects/Vector.md.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D114165
2022-03-17 16:38:50 +00:00
Andrew Wei f241d43b40 [NFC][ InstCombine] precommit test for D121585
Based on original tests from D121585.
2022-03-18 00:37:21 +08:00
Yonghong Song d2b4a675a8 [BPF] Fix a bug in BPFAdjustOpt pass for icmp transformation
When checking a bcc issue related to bcc tool inject.py,
I found a bug in BPFAdjustOpt pass for icmp transformation,
caused by typo's. For the following condition:
  Cond2Op != ICmpInst::ICMP_SLT && Cond1Op != ICmpInst::ICMP_SLE
it should be
  Cond2Op != ICmpInst::ICMP_SLT && Cond2Op != ICmpInst::ICMP_SLE

This patch fixed the problem and a test case is added.

Differential Revision: https://reviews.llvm.org/D121883
2022-03-17 09:25:18 -07:00