Commit Graph

399385 Commits

Author SHA1 Message Date
thomasraoux 08f0cb7719 [mlir] Prevent crash in DropUnitDim pattern due to tensor with encoding
Differential Revision: https://reviews.llvm.org/D109984
2021-09-17 12:03:16 -07:00
Martin Storsjö d13d9da1fb [clang] [ARM] Don't set the strict alignment flag for armv7 on Windows
Windows on armv7 is as alignment tolerant as Linux.

The alignment considerations in the Windows on ARM ABI are documented
at https://docs.microsoft.com/en-us/cpp/build/overview-of-arm-abi-conventions?view=msvc-160#alignment.

The document doesn't explicitly say in which state the OS configures
the SCTLR.A register (and it's not accessible from user space to
inspect), but in practice, unaligned loads/stores do work and seem
to be as fast as aligned loads and stores. (Unaligned strd also does
seem to work, contrary to Linux, but significantly slower, as they're
handled by the kernel - exactly as the document describes.)

Differential Revision: https://reviews.llvm.org/D109960
2021-09-17 21:39:25 +03:00
peter klausler 338f21a4bd [flang] Enforce specification function rules on callee, not call
A function can't be a specification function if it has a dummy procedure
argument, even if it's optional and unused.  So don't check the reference
for actual procedure arguments, but rather the characteristics of the
function.

Differential Revision: https://reviews.llvm.org/D109935
2021-09-17 10:59:54 -07:00
peter klausler f6ddfac401 [flang] Enforce fixed form rules about END continuation
From subclause 6.3.3.5: a program unit END statement cannot be
continued in fixed form, and other statements cannot have initial
lines that look like program unit END statements.  I think this
is to avoid violating assumptions that are important to legacy
compilers' statement classification routines.

Differential Revision: https://reviews.llvm.org/D109933
2021-09-17 10:59:17 -07:00
Aaron Ballman 101c3de39f Add information about C99 to the C status page. 2021-09-17 13:49:17 -04:00
Tozer 9c03662748 [Dexter] Mutually exclusive argument group for --builder and --binary
Dexter currently accepts two possible arguments to determine the binary
used for testing; either --builder <builder> (and optionally
compiler/linker flags) to build the binary, or --binary <binary> to use
the provided binary directly. If both are passed, then --binary
overrides --builder; if neither are passed, then an error is raised.
This patch instead puts these arguments into a required mutually
exclusive argument group, so that an error is automatically raised by
argparse if both or neither are given.

As an additional change, the --cflags and --ldflags will now raise a
warning if they are passed without the --builder flag, as they are
meaningless if Dexter is using a pre-built binary.

Reviewed By: Orlando

Differential Revision: https://reviews.llvm.org/D109833
2021-09-17 18:44:09 +01:00
Alexey Bataev 2b0b1d5319 [SLP][NFC]Add a test for reorder of alt shuffle operands. 2021-09-17 10:42:45 -07:00
peter klausler 9245f35580 [flang] Validate SIZE(x,DIM=n) dimension for assumed-size array x
Catch invalid attempts to extract the unknowable extent of the last
dimension of an assumed-size array dummy argument, and clean up
problems with assumed-rank arguments in similar circumstances
exposed by testing the fix.

Differential Revision: https://reviews.llvm.org/D109918
2021-09-17 10:14:18 -07:00
peter klausler 20afd38651 [flang] Upgrade warning to error in case of PURE procedure
A procedure actual argument to a PURE procedure should be required
to have an explicit interface.  Implicit-interface actual arguments
to non-PURE procedures remain a warning.

Differential Revision: https://reviews.llvm.org/D109926
2021-09-17 10:13:35 -07:00
thomasraoux 36aac53b36 [mlir][linalg] Extend drop unit dim pattern to all cases of reduction
Even with all parallel loops reading the output value is still allowed so we
don't have to handle reduction loops differently.

Differential Revision: https://reviews.llvm.org/D109851
2021-09-17 10:09:57 -07:00
thomasraoux 416679615d [mlir] Linalg hoisting should ignore uses outside the loop
Differential Revision: https://reviews.llvm.org/D109859
2021-09-17 10:06:57 -07:00
thomasraoux a123e3c48b [mlir] Fix potential crash in hoistRedundantVectorTransfers
Differential Revision: https://reviews.llvm.org/D107856
2021-09-17 10:05:20 -07:00
Vy Nguyen b428c3e8c1 [lld-macho] Ignore local personality symbols if non-local with the same name exisst, to avoid "too many personalities" error.
Sometimes people intentionally re-define a dylib personlity symbol as a local defined symbol as a workaround to a ld -r bug.
    As a result, we could see "too many personalities" to encode. This patch tries to handle this case by ignoring the local symbols entirely.

    Differential Revision: https://reviews.llvm.org/D107533
2021-09-17 12:59:42 -04:00
Shilei Tian 81a1a91c62 [NFC] clang-format -i /openmp/libomptarget/deviceRTLs/interface.h 2021-09-17 12:55:02 -04:00
peter klausler 43d41b295e [flang] Correct overflow detection in folding of real->integer conversions
INT, NINT, FLOOR, and CEILING were failing to report overflow as an
error while folding operations with constant operands.

Differential Revision: https://reviews.llvm.org/D109922
2021-09-17 09:50:22 -07:00
AndreyChurbanov 59b877d001 [OpenMP] NFC: add type casts to silence gcc warnings 2021-09-17 19:49:40 +03:00
AndreyChurbanov 7f1a6d891e [OpenMP] libomp: Update third-party sources of ittnotify client code.
The third-party ittnotify sources updated from https://github.com/intel/ittapi.
Changes applied:
- llvm license aded to all files; initial BSD license saved in LICENSE.txt;
- clang-formatted;
- renamed *.c to *.cpp, similar to what we did with all our sources;
- added #include "kmp_config.h" with definition of INTEL_ITTNOTIFY_PREFIX macro
  into ittnotify_static.cpp.

Differential Revision: https://reviews.llvm.org/D109333
2021-09-17 19:38:34 +03:00
peter klausler 7ff920826c [flang] Catch errors with intrinsic array inquiry functions
The intrinsic inquiry functions SIZE and UBOUND -- but not LBOUND --
require a DIM= argument if their first argument is an assumed-size
array.  The intrinsic SHAPE must not be used with an assumed-size
array.

Differential Revision: https://reviews.llvm.org/D109912
2021-09-17 09:24:52 -07:00
Kazu Hirata e2febc2ed4 [llvm] Use drop_begin (NFC) 2021-09-17 09:16:40 -07:00
Roman Lebedev 358df06f4e
[X86] Improve `matchBinaryShuffle()`'s `BLEND` lowering with per-element all-zero/all-ones knowledge
We can use `OR` instead of `BLEND` if either the element we are not picking is zero (or masked away);
or the element we are picking overwhelms (e.g. it's all-ones) whatever the element we are not picking:
https://alive2.llvm.org/ce/z/RKejao

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D109726
2021-09-17 19:13:33 +03:00
Nico Weber df1ab7de38 [gn build] (semi-manually) port 750d5fc65c 2021-09-17 12:02:09 -04:00
peter klausler 12ba727897 [flang] Accept SIZE(assumed-rank, DIM=n)
Silence a bogus error message about an out-of-range DIM= argument
when the argument is assumed-rank.  (More generally, don't pretend
to be able to discern a shape of known rank for an assumed-rank
object.)

Differential Revision: https://reviews.llvm.org/D109915
2021-09-17 09:00:40 -07:00
Sanjay Patel 41ff7612b3 [InstCombine] allow splat vectors for narrowing masked fold
Mostly cosmetic diffs, but the use of m_APInt matches splat constants.
2021-09-17 11:24:16 -04:00
Sanjay Patel 3a587ed20f [InstCombine] add vector tests for 'and' folds; NFC 2021-09-17 11:24:16 -04:00
Tobias Gysi 90b7817e03 [mlir][linalg] Add helper to update IndexOps after tiling (NFC).
Add the addTileLoopIvsToIndexOpResults method to shift the IndexOp results after tiling.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D109761
2021-09-17 15:17:33 +00:00
peter klausler 1894250291 [flang] Revamp C1502 checking of END INTERFACE [generic-spec]
Validation of the optional generic-spec on an END INTERFACE statement
was missing many possible error cases; reimplement it.

Differential Revision: https://reviews.llvm.org/D109910
2021-09-17 08:13:10 -07:00
Thomas Preud'homme 8a7a28075b Fix CodeGen/pgo-sample-thinlto-summary.c with old PM
Re-add -fexperimental-new-pass-manager to
Clang::CodeGen/pgo-sample-thinlto-summary.c for the test to work on
builds that still default to the old pass manager.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D109956
2021-09-17 15:21:22 +01:00
Matt Morehouse 750d5fc65c [HWASan] Intercept setjmp/longjmp on x86_64.
Reviewed By: xiangzhangllvm

Differential Revision: https://reviews.llvm.org/D109790
2021-09-17 07:10:57 -07:00
PeixinQiao 6fb01a9470 [flang][OpenMP] Add semantic checks for ordered construct
This patch implements the following semantic checks according to
OpenMP Version 5.1 Ordered construct restriction:

```
At most one threads clause can appear on an ordered construct; At most
one simd clause can appear on an ordered construct; At most one
depend(source) clause can appear on an ordered construct; Either
depend(sink:vec) clauses or depend(source) clauses may appear on an
ordered construct, but not both.
```

This patch also implements the following semantic checks according to
the syntax and descriptions in OpenMP Version 5.1 Ordered construct:

```
The dependence types of sink or source are only allowed on an ordered
construct. The depend(*) clauses are not allowed when ordered construct
is a block construct with an ordered region. The threads or simd clauses
are not allowed when the ordered construct is a standalone construct
with no ordered region.
```

Co-authored-by: Sameeran Joshi <sameeranjayant.joshi@amd.com>

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D108512
2021-09-17 21:53:07 +08:00
Dávid Bolvanský ff6b074674 [NFC] Added testcase for PR25725 2021-09-17 15:48:55 +02:00
Erich Keane 197a3d183b Fix test failure from e3b10525b4
Seemingly, names in anonymous namespaces are ALWAYS given the unique
internal linkage name on windows, and I was not aware of this when I put
the names in my test!  Replaced them with a wildcard.
2021-09-17 06:21:55 -07:00
Justas Janickas b7e9d203c6 [OpenCL] Supports optional same image reads and writes in C++ for OpenCL 2021
Adds support for a feature macro `__opencl_c_read_write_images` in
C++ for OpenCL 2021 enabling a respective optional core feature
from OpenCL 3.0.

This change aims to achieve compatibility between C++ for OpenCL
2021 and OpenCL 3.0.

Differential Revision: https://reviews.llvm.org/D109307
2021-09-17 14:14:31 +01:00
Simon Pilgrim 72e5786281 [DebugInfo] DWARF - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 14:04:54 +01:00
Simon Pilgrim 4af7643470 [CodeGen] LiveDebug - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 14:04:54 +01:00
Simon Pilgrim bbebb564f9 [TableGen] X86EVEX2VEXTablesEmitter - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 14:04:53 +01:00
Simon Pilgrim db23f27786 [X86] X86PreTileConfig - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 14:04:53 +01:00
Erich Keane e3b10525b4 Make multiversioning work with internal linkage
We previously made all multiversioning resolvers/ifuncs have weak
ODR linkage in IR, since we NEED to emit the whole resolver every time
we see a call, but it is not necessarily the place where all the
definitions live.

HOWEVER, when doing so, we neglected the case where the versions have
internal linkage.  This patch ensures we do this, so you don't get weird
behavior with static functions.
2021-09-17 05:56:38 -07:00
Arjun P 58719f6153 [MLIR] PresbugerSet: slightly expand documentation 2021-09-17 18:04:46 +05:30
Simon Pilgrim 77f6c0bcaa Fix Wdocumentation warnings. NFCI.
Fix parameter name typos and drop returns statements from void functions
2021-09-17 12:45:56 +01:00
Simon Pilgrim 5ebe95e256 [X86][Atom] Fix integer shuffles uops, latency and throughput
The MMX pack/unpck shuffles don't need an override - they have the same behaviour as other shuffles (Port0 only).
The SSE pslldq/psrldq shuffles don't need an override - they have the same behaviour as other shuffles (Port0 only).
The SSE pshufb shuffles use 4uops (+1 load).

Noticed the pslldq/psrldq issue while trying to improve reduction costs via the D103695 helper script, and fixed the others while reviewing. Confirmed with Intel AoM / Agner / InstLatX64.
2021-09-17 12:11:54 +01:00
Simon Pilgrim cbaaedea56 [CodeGen] MachineInstr::getUsedDebugRegs() - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 12:11:54 +01:00
Simon Pilgrim 9e70d4e5f2 [AsmPrinter] DebugLocEntry::dump() - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 12:11:54 +01:00
Simon Pilgrim e4b2f66d7f [TableGen] Record::checkRecordAssertions() - Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 12:11:53 +01:00
Simon Pilgrim 8821345e68 [TextAPI] Use const-ref iterator in for-range loop. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
2021-09-17 12:11:53 +01:00
Arjun P 44db07f11f [MLIR] AffineStructures: support removing a range of constraints at once
Reviewed By: Groverkss, grosser

Differential Revision: https://reviews.llvm.org/D109892
2021-09-17 16:27:48 +05:30
Arjun P 6607bd9fd8 [MLIR] AffineStructures::removeIdRange: support specifying a range within an IdKind
Reviewed By: Groverkss, grosser

Differential Revision: https://reviews.llvm.org/D109896
2021-09-17 16:25:26 +05:30
Arjun P f263ea1571 [MLIR] Matrix: support resizing horizontally
Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D109897
2021-09-17 16:22:31 +05:30
Jonas Paulsson 1a5ab3e97c [SystemZ] Recognize .machine directive in parser.
The .machine directive can be used in assembly files to specify the ISA for
the instructions following it.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D109660
2021-09-17 12:03:54 +02:00
Petar Avramovic d477a7c2e7 GlobalISel/Utils: Refactor integer/float constant match functions
Rework getConstantstVRegValWithLookThrough in order to make it clear if we
are matching integer/float constant only or any constant(default).
Add helper functions that get DefVReg and APInt/APFloat from constant instr
getIConstantVRegValWithLookThrough: integer constant, only G_CONSTANT
getFConstantVRegValWithLookThrough: float constant, only G_FCONSTANT
getAnyConstantVRegValWithLookThrough: either G_CONSTANT or G_FCONSTANT

Rename getConstantVRegVal and getConstantVRegSExtVal to getIConstantVRegVal
and getIConstantVRegSExtVal. These now only match G_CONSTANT as described
in comment.

Relevant matchers now return both DefVReg and APInt/APFloat.

Replace existing uses of getConstantstVRegValWithLookThrough and
getConstantVRegVal with new helper functions. Any constant match is
only required in:
ConstantFoldBinOp: for constant argument that was bit-cast of float to int
getAArch64VectorSplat: AArch64::G_DUP operands can be any constant
amdgpu select for G_BUILD_VECTOR_TRUNC: operands can be any constant

In other places use integer only constant match.

Differential Revision: https://reviews.llvm.org/D104409
2021-09-17 11:22:13 +02:00
Justas Janickas 37cdc7ebd9 [OpenCL] Supports optional pipe types in C++ for OpenCL 2021
Adds support for a feature macro `__opencl_c_pipes` in C++ for
OpenCL 2021 enabling a respective optional core feature from
OpenCL 3.0.

This change aims to achieve compatibility between C++ for OpenCL
2021 and OpenCL 3.0.

Differential Revision: https://reviews.llvm.org/D109306
2021-09-17 09:56:20 +01:00