Commit Graph

434955 Commits

Author SHA1 Message Date
Freddy Ye 66f332bc1a [X86] Add missing key feature for core2
Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D133094
2022-09-02 16:06:07 +08:00
Valentin Clement 4ed30c81d3
[flang] Avoid copyin/copyout if the actual argument is contiguous at runtime
This patch adds contiguity check with the runtime to avoid copyin/copyout
in case the actual argument is actually contiguous.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D133097
2022-09-02 09:47:53 +02:00
Nikita Popov c453e5b901 Revert "[DSE] Eliminate noop store even through has clobbering between LoadI and StoreI"
This reverts commit cd8f3e7581.

As pointed out by Eli on the review, this is missing an alignment
check. The value might be written at an offset.
2022-09-02 09:28:48 +02:00
Nikita Popov 639d912282 [LICM] Allow load-only scalar promotion in the presence of unwinding
Currently, we bail out of scalar promotion if the loop may unwind
and the memory may be visible on unwind. This is because we can't
insert stores of the promoted value on unwind edges.

However, nowadays scalar promotion also has support for only
promoting loads, while leaving stores in place. This kind of
promotion is safe even in the presence of unwinding.

Differential Revision: https://reviews.llvm.org/D133111
2022-09-02 09:27:13 +02:00
luxufan cd8f3e7581 [DSE] Eliminate noop store even through has clobbering between LoadI and StoreI
For noop store of the form of LoadI and StoreI,
An invariant should be kept is that the memory state of the related
MemoryLoc before LoadI is the same as before StoreI.
For this example:
```
define void @pr49927(i32* %q, i32* %p) {
  %v = load i32, i32* %p, align 4
  store i32 %v, i32* %q, align 4
  store i32 %v, i32* %p, align 4
  ret void
}
```
Here the definition of the store's destination is different with the
definition of the load's destination, which it seems that the
invariant mentioned above is broken. But the definition of the
store's destination would write a value that is LoadI, actually, the
invariant is still kept. So we can safely ignore it.

Differential Revision: https://reviews.llvm.org/D132657
2022-09-02 06:37:41 +00:00
Lang Hames acce424111 [ORC-RT] Fix typo.
Removes the stray '$' that slipped in to c1c585a065.
2022-09-01 23:16:45 -07:00
Lang Hames c1c585a065 [ORC-RT] Don't unconditionally add dependence on llvm-jitlink.
Commit 4adc5bead4 moved a dependence on llvm-jitlink from
SANITIZER_COMMON_LIT_TEST_DEPS to ORC_TEST_DEPS, but in doing so it moved it
out from under a 'NOT COMPILER_RT_STANDALONE_BUILD ...' conditional. This led
to failures on standalone builds.

This commit adds the conditional to the ORC_TEST_DEPS assignment to work
around the issue while we look a longer term fix.

rdar://99453446
2022-09-01 22:53:30 -07:00
Aart Bik 2ddfacd95c [mlir][sparse] codegen for sparse dealloc
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D133171
2022-09-01 22:21:20 -07:00
Craig Topper 11881a8f3f [RISCV] Rename some V extension multiclasses for consistency. NFC
Use "SDNode" in the name is the convention for the VLMax patterns
in RISCVInstrInfoVSDPatterns.td. This files use "VL".
2022-09-01 22:17:08 -07:00
Kazu Hirata 4535dbd559 [lldb] Fix a warning
This patch fixes:

  lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h:51:5:
  error: default label in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]
2022-09-01 22:14:25 -07:00
Aart Bik f27b806df5 [mlir][sparse] codegen for trivial tensor cast
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D133176
2022-09-01 21:55:18 -07:00
Fangrui Song 1b726f0a4c [AArch64InstPrinter] Add some `<reg:...>` for llvm-mc --mdis output 2022-09-01 21:34:56 -07:00
Antonio Frighetto f0c50447f6 [X86InstPrinter] Introduce markup tags emission
x86 assembly syntax emission now leverages markup tags, if enabled.

Differential Revision: https://reviews.llvm.org/D129869
2022-09-01 21:04:35 -07:00
Antonio Frighetto 4e99079774 [AArch64InstPrinter] Introduce immediate markup tags emission
AArch64 assembly syntax emission now leverages markup tags for immediates, if enabled.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129871
2022-09-01 20:58:42 -07:00
Lang Hames 6ca9f42189 [ORC][ORC-RT] Consistently use pointed-to type as template arg to wrap/unwrap.
Saves wrap/unwrap implementers from having to use std::remove_pointer_t to get
at the pointed-to type.
2022-09-01 20:54:24 -07:00
Antonio Frighetto cbb2141f7f [MipsInstPrinter] Introduce markup tags emission
MIPS assembly syntax emission now leverages markup tags, if enabled.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129867
2022-09-01 20:52:09 -07:00
Chenbing Zheng bb0e6b7721 [InstCombine] Precommit tests for umul_with_overflow. nfc 2022-09-02 11:18:17 +08:00
Vitaly Buka ad3a77df2d [msan] Fix debug info with getNextNode
When we want to add instrumentation after
an instruction, instrumentation still should
keep debug info of the instruction.

Reviewed By: kda, kstoimenov

Differential Revision: https://reviews.llvm.org/D133091
2022-09-01 20:13:56 -07:00
Chenbing Zheng d30cf77cb1 [InstCombine] complete fold extractvalue (any_mul_with_overflow X, -1)
When we do extractvalue (any_mul_with_overflow X, -1) --> (-X and icmp),
which left partly failed to match vector constant with poison element.
This patch try to fix it.

Alive2: https://alive2.llvm.org/ce/z/2rGp_3

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D132996
2022-09-02 10:58:42 +08:00
Vitaly Buka ad2b356f85 [msan] Use no-origin functions when possible
Saves 1.8% of .text size on CTMark

Reviewed By: kda

Differential Revision: https://reviews.llvm.org/D133077
2022-09-01 19:18:38 -07:00
Emmmer ff7b876aa7 [LLDB][RISCV] Add more instruction decode and execute for EmulateInstructionRISCV
Add:
- most of instructions from RVI base instructions set.
- some instruction decode tests from objdump.

Further work:
- implement riscv imac extension.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D132789
2022-09-02 10:17:09 +08:00
Chenbing Zheng 4db9edfdb6 [NFC] fix typo 2022-09-02 10:04:52 +08:00
Vitaly Buka 16f6c37c7e [test][msan] Add implicit-check-not rename some prefixes 2022-09-01 19:02:11 -07:00
Katherine Rasmussen 7dbbf77e1f [flang] Add lcobound and ucobound to the list of intrinsics
Add the coarray intrinsic functions, lcobound and ucobound, to the
list of intrinsics. For both of these functions, add a check to
ensure that if the optional dim argument is present and statically
checkable, its value is in the inclusive range of 1 and the corank
of the coarray argument. In the semantics tests for lcobound and
ucobound, remove the XFAIL directive, add the ERROR directives and
add additional standard-conforming and non-standard conforming
calls.

Reviewed By: klausler, craig.rasmussen

Differential Revision: https://reviews.llvm.org/D126721
2022-09-01 17:17:54 -07:00
Adrian Prantl ced4e0006f Fix inconsistent target arch when attaching to arm64 binaries on
arm64e platforms.

On arm64e-capable Apple platforms, the system libraries are always
arm64e, but applications often are arm64. When a target is created
from file, LLDB recognizes it as an arm64 target, but debugserver will
still (technically correct) report the process as being arm64e. For
consistency, set the target to arm64 here.

rdar://92248684

Differential Revision: https://reviews.llvm.org/D133069
2022-09-01 16:39:35 -07:00
Aart Bik 3ae98fd259 [mlir][sparse] added codegen for dimop, pointers, indices, values
Demonstrates how sparse tensor type -> tuple -> getter
will eventually yield actual code on the memrefs directly

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D133143
2022-09-01 16:36:10 -07:00
Artem Belevich 54c47ff939 [CUDA] Allow using -o with -fsyntax-only
-fsyntax-only breaks down CUDA compilation pipeline and make it look like
multiple independent subcompilations and that trips the multiple arguments check
when -o is specified.

We do want to allow -fsyntax-only to be used with otherwise unmodified clang
options as it's commonly used by various tooling.

Differential Revision: https://reviews.llvm.org/D133133
2022-09-01 15:52:36 -07:00
Peiming Liu ca01c996b2 [mlir][sparse] Add SparseTensorStorageExpansion Pass to expand compounded sparse tensor tuples
This patch adds SparseTensorStorageExpansion pass, it flattens the tuple used to store a sparse
tensor handle.

Right now, it only set up the skeleton for the pass, more lowering rules for sparse tensor storage
operation need to be added.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133125
2022-09-01 22:47:31 +00:00
Slava Zakharin 8fbc7e0869 [flang] Make use of do variable more consistent.
Instead of using the IV block argument of the do-loop we will use
the do-variable value loaded from its location. This usage is consistent
with other uses of the do-variable inside the loop.

Differential Revision: https://reviews.llvm.org/D133140
2022-09-01 15:46:19 -07:00
Alex Brachet f6d6e33abc [clang] Give better message for unsupported no_sanitize on globals
Previously if you specified no_sanitize("known_sanitizer") on a global you
would yield a misleading error "'no_sanitize' attribute only applies to
functions and methods", but no_sanitize("unknown") would simply be a warning,
"unknown sanitizer 'unknown' ignored". This changes the former to a warning
"'no_sanitize' attribute argument not supported for globals: known_sanitizer".

Differential Revision: https://reviews.llvm.org/D133117
2022-09-01 22:35:42 +00:00
Arthur Eubanks c911befaec [InstCombine] Treat passing undef to noundef params as UB
Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D133036
2022-09-01 15:16:45 -07:00
Rob Suderman 5a231720bc [mlir][tosa] Add remaining tosa comparison folders
Added numerical splat folders for comparison operations and
equal of two identical int values.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D133138
2022-09-01 14:48:46 -07:00
Tue Ly a4d48e3b0b [libc][NFC] Use cpp::optional for checking exceptional values of math functions.
Update the utility functions for checking exceptional values of math
functions to use cpp::optional return values.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D133134
2022-09-01 17:39:12 -04:00
Rong Xu 0caa4a9559 [PGO] Support PGO annotation of CallBrInst
We currently instrument CallBrInst but do not annotate it with
the branch weight. This patch enables PGO annotation of CallBrInst.

Differential Revision: https://reviews.llvm.org/D133040
2022-09-01 14:13:50 -07:00
Arpad Borsos de3633e746 [llvm-objdump][COFF] Correctly decode `UOP_Epilog` opcodes
At least `ntdll` is using the undocumented version 2 unwind info, and opcode 6, which is already defined as `UOP_Epilog`.
Using `llvm-objdump --unwind` with `ntdll` would previously result in unreachable assertions because this code was missing from `getNumUsedSlots` and `getUnwindCodeTypeName`.
The slots of these codes comes from 57bfe47451/src/coreclr/inc/win64unwind.h (L51-L52) which I would assume is a good authoritative source.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107655
2022-09-01 14:05:14 -07:00
Kevin Athey 0b509f2d1a [MSAN] removing redundant tests and parameters (NFC)
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D117622
2022-09-01 14:03:55 -07:00
Vitaly Buka ef0f866718 [msan] Combine shadow check of the same instruction
Reduces .text size by 1% on our large binary.

On CTMark (-O2 -fsanitize=memory -fsanitize-memory-use-after-dtor -fsanitize-memory-param-retval)
Size -0.4%
Time -0.8%

Reviewed By: kda

Differential Revision: https://reviews.llvm.org/D133071
2022-09-01 13:55:59 -07:00
Aleksandr Platonov cc4b86cfc0 [clangd] Fix tests for implicit C function declaration
clangd code fixes at D122983 were not right.
We need to check that clangd provides IncludeFixer fixits for implicit function declaration even if this is not an error (e.g. implicit function declaration in C89).

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D133043
2022-09-01 23:46:20 +03:00
Lang Hames 06c4634483 [JITLink] Sink ELFX86RelocationKind into implementation file (ELF_x86_64.cpp).
The ELF/x86-64 backend uses the generic x86_64 edges now, so the
ELFX86RelocationKind is just an implementation detail.
2022-09-01 13:36:49 -07:00
Sanjay Patel c29c6170fd [SCCP][PhaseOrdering] add tests for sdiv/srem range transforms; NFC
issue #57472
2022-09-01 16:23:00 -04:00
Zequan Wu afeb2d0a21 [LLDB][NativePDB] Fix a minor bug.
llvm::codeview::visitMemberRecordStream in CompleteTagDecl will call
GetOrCreateType create type if not seen before, which inserts new entries
into m_decl_to_status. This may invalidates status which is a reference to
std::pair::second from DenseMapIterator.
2022-09-01 13:10:57 -07:00
Vitaly Buka 9110673062 [nfc][msan] Group checks per instruction
It's a preparation of to combine shadow checks of the same instruction

Reviewed By: kda, kstoimenov

Differential Revision: https://reviews.llvm.org/D133065
2022-09-01 13:10:16 -07:00
Valentin Clement 59f67bfd11
Revert "[flang] Avoid copyin/copyout if the actual argument is contiguous at runtime"
This reverts commit 6ab6f23b14.
2022-09-01 22:04:29 +02:00
Simon Pilgrim e5804a5a61 [ADT] bit.h - replace <stdint.h> with <cstdint>
This is a C++ header after all.
2022-09-01 20:44:56 +01:00
River Riddle 919fcab6e2 [mlir:PDLL] Actually run the integration tests
This revealed that the test was a bit out of date and failing, this
commit also tweaks the .mlir to actually test pdll properly.
2022-09-01 12:37:18 -07:00
Simon Pilgrim f8d4da7630 [X86] Fix reciprocal instruction throughput/uops counts
Matches numbers from AMD SoG + Agner - should always be on FPU Pipes 0+1, no additional uops for folded instructions and znver1 double pumps 256-bit vectors

Noticed while adding CostKinds support to the x86 cost models
2022-09-01 20:25:52 +01:00
Wei Yi Tee 14757d5b84 [clang][dataflow] Refactor `TypeErasedDataflowAnalysisTest` - replace usage of the deprecated overload of `checkDataflow`.
Reviewed By: gribozavr2, sgatev

Differential Revision: https://reviews.llvm.org/D132756
2022-09-01 19:17:37 +00:00
Valentin Clement 6ab6f23b14
[flang] Avoid copyin/copyout if the actual argument is contiguous at runtime
This patch adds contiguity check with the runtime to avoid copyin/copyout
in case the actual argument is actually contiguous.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D133097
2022-09-01 21:16:24 +02:00
Mark de Wever 9185d6e6bc [libc++] Avoids self references in transitive include test.
The output of --trace-includes starts with the header whose includes are
being processed. Since the sanitize script processed all lines this
include was added to the list of transitive includes. This looks odd
since it implies all headers have a cyclic dependency on themselves.
This change removes this self-include.

Instead of just dropping the first line extract that header and use it
to guard against cyclic dependencies in the header itself.

The regex used has a small improvement; don't capture groups that aren't
extracted.

Depends on D132284

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D132787
2022-09-01 20:33:37 +02:00
Michael Jones cb84721c3c [libc] add division, modulo, and power to UInt
This adds division and power implementations to UInt. Modulo and
division are handled by the same function. These are necessary for some
higher order mathematics, often involving large floating point numbers.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D132184
2022-09-01 11:22:26 -07:00