Commit Graph

390574 Commits

Author SHA1 Message Date
Esme-Yi db4ac5a63e [NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files.
Summary: This a minor patch to refactor the test file,
llvm-objdump/XCOFF/section-headers.test, to use yaml2obj
for this testing rather than a canned binary.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D103146
2021-06-09 03:11:33 +00:00
Kai Luo c87c294397 [PowerPC][Dwarf] Assign MMA register's dwarf register number to negative value
According to ELF V2 ABI, `0` should be the dwarf number of `r0`. Currently MMA's register also uses `0` as its dwarf number, this confuses `RegisterInfoEmitter` and generates wrong dwarf -> llvm mapping.
```
extern const MCRegisterInfo::DwarfLLVMRegPair PPCDwarfFlavour1Dwarf2L[] = {
  { 0U, PPC::VSRp31 },
```
This leads to wrong cfi output in https://reviews.llvm.org/D100290.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D103761
2021-06-09 02:24:01 +00:00
Brendon Cahoon 294efbbd3e Reland "[AMDGPU] Add gfx1013 target"
This reverts commit 211e584fa2.

Fixed a use-after-free error that caused the sanitizers to fail.
2021-06-08 21:15:35 -04:00
David Blaikie 8051a48e65 ORTRT: Add tests for string_view equality and inequality operators 2021-06-08 17:53:59 -07:00
David Blaikie 4d9cc7c244 Add a couple of missing includes 2021-06-08 17:53:58 -07:00
David Blaikie cb09f2b10c Rename compiler-rt/lib/orc/endian.h to endianness.h to avoid conflict with system headers 2021-06-08 17:53:58 -07:00
Mehdi Amini a0ac514676 Revert "Add a static assertions for custom Op<> to not defined data members (NFC)"
This reverts commit c0edcec630.

The windows bot was broken by this change.
2021-06-09 00:46:02 +00:00
Mehdi Amini 2c81154823 Add llvm_unreacheable to silence warning "not all control paths return a value" (NFC) 2021-06-09 00:42:57 +00:00
Joseph Huber df965513a9 [OpenMP] Add an information flag for device data transfers
This patch adds an information flag that indicated when data is being copied to
and from the device. This will be helpful for finding redundant or unnecessary
data transfers in applications.

Reviewed By: jdoerfert, grokos

Differential Revision: https://reviews.llvm.org/D103927
2021-06-08 20:23:27 -04:00
Lang Hames f9649d123d [JITLink][MachO] Split C-string literal sections on null-terminators.
MachO C-string literal sections should be split on null-terminator boundaries,
rather than the usual symbol boundaries. This patch updates
MachOLinkGraphBuilder to do that.
2021-06-09 10:19:27 +10:00
Siva Chandra Reddy 3d515cb185 [libc][NFC][Obvious] Compare against size_t values in ArrayRef tests.
Different platforms treat size_t differently so we should compare sizes
of ArrayRef objects with size_t values (instead of the current unsigned
long values.)
2021-06-09 00:14:05 +00:00
Siva Chandra Reddy 6344a583ca [libc] Add a macro to include/exclude subprocess tests.
This is useful when bringing up LLVM libc on a new OS on which we do not
yet have the subprocess related helper functions.
2021-06-08 23:30:21 +00:00
Siva Chandra Reddy f4c8fd12d5 [libc][NFC] Use add_library instead of add_llvm_library for a few libraries.
These libraries do not depend on LLVM libraries anymore so they do not
have to be added using add_llvm_library.
2021-06-08 23:15:24 +00:00
Suraj Sudhir 05cadc6f71 [mlir][tosa] Temporarily support 2D and 3D tensor types in matmul
Temporarily support 2D and 3D while the TOSA Matmul op is updated to support batched operations.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D103854
2021-06-08 16:03:59 -07:00
Quinn Pham 898e38a3c1 [NFC] In the future, all intrinsics defined for compatibility with the XL
compiler will be placed in this collection.

This patch has no functional changes.

Differential revision: https://reviews.llvm.org/D103921
2021-06-08 17:58:02 -05:00
Sami Tolvanen 2f9ba6aa8b LTO: Export functions referenced by non-canonical CFI jump tables
LowerTypeTests pass adds functions with a non-canonical jump table
to cfiFunctionDecls instead of cfiFunctionDefs. As the jump table
is in the regular LTO object, these functions will also need to be
exported. This change fixes the non-canonical jump table case and
adds a test similar to the existing one for canonical jump tables.

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D103120
2021-06-08 14:57:43 -07:00
Whitney Tsang 9b022a679b Revert "Revert "[LoopNest] Fix Wdeprecated-copy warnings""
This reverts commit 07ef5805ab.

The broke of the sanitizer-windows bot:
https://lab.llvm.org/buildbot/#/builders/127/builds/12064
is not caused by the original commit.

Differential Revision: https://reviews.llvm.org/D103752
2021-06-08 21:51:53 +00:00
patacca 9b41d0958e [Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.
[Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.

This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Removed `std::nullptr_t` constructor from all the classes in the isl C++ bindings.
 - `isl-noexceptions.h` has been generated by this a7e00bea38

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103751
2021-06-08 23:46:28 +02:00
Kevin Athey af8c59e06d Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always).
In addition:
  - optionally add global flag to capture compile intent for UAR:
    __asan_detect_use_after_return_always.
    The global is a SANITIZER_WEAK_ATTRIBUTE.

for issue: https://github.com/google/sanitizers/issues/1394

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103304
2021-06-08 14:39:06 -07:00
Jonas Paulsson 8b32e25bc2 [SystemZ] Return true from convertSetCCLogicToBitwiseLogic for scalar integer.
Review: Ulrich Weigand
2021-06-08 16:27:28 -05:00
Shafik Yaghmour ae1a699554 [LLDB][NFC] Remove parameter names from forward declarations from hand written expressions used in heap.py
heap.py has a lot of large hand written expressions and each name in the
expression will be looked up by clang during expression parsing. For
function parameters this will be in Sema::ActOnParamDeclarator(...) in order to
catch redeclarations of parameters. The names are not needed and we have seen
some rare cases where since we don't have symbols we end up in
SymbolContext::FindBestGlobalDataSymbol(...) which may conflict with other global
symbols.

There may be a way to make this lookup smarter to avoid these cases but it is
not clear how well tested this path is and how much work it would be to fix it.
So we will go with this fix while we investigate more.

Ref: rdar://78265641
2021-06-08 14:27:02 -07:00
Sanjay Patel d2012d965d [InstCombine] fix nsz (fast-math) propagation from fneg-of-select
As discussed in the post-commit comments for:
3cdd05e519

It seems to be safe to propagate all flags from the final fneg
except for 'nsz' to the new select:
https://alive2.llvm.org/ce/z/J_APDc

nsz has unique FMF semantics: it is not poison, it is only
"insignificant" in the calculation according to the LangRef.
2021-06-08 17:04:30 -04:00
Sanjay Patel c52ed5c4f1 [InstCombine] add FMF tests for fneg-of-select; NFC
As noted in the post-commit comments for 3cdd05e519,
we need to be more careful about FMF propagation.
2021-06-08 17:04:29 -04:00
Daniel Michael 2551053e8d [scudo] Add Scudo support for Trusty OS
trusty.cpp and trusty.h define Trusty implementations of map and other
platform-specific functions. In addition to adding Trusty configurations
in allocator_config.h and size_class_map.h, MapSizeIncrement and
PrimaryEnableRandomOffset are added as configurable options in
allocator_config.h.
Background on Trusty: https://source.android.com/security/trusty

Differential Revision: https://reviews.llvm.org/D103578
2021-06-08 14:02:10 -07:00
Jonas Devlieghere 1a216fb15a [lldb] Don't print script output twice in HandleCommand
When executing a script command in HandleCommand(s) we currently print
its output twice
You can see this issue in action when adding a breakpoint command:

(lldb) b main
Breakpoint 1: where = main.out`main + 13 at main.cpp:2:3, address = 0x0000000100003fad
(lldb) break command add 1 -o "script print(\"Hey!\")"
(lldb) r
Process 76041 launched: '/tmp/main.out' (x86_64)
Hey!
(lldb)  script print("Hey!")
Hey!
Process 76041 stopped

The issue is caused by HandleCommands using a temporary
CommandReturnObject and one of the commands (`script` in this case)
setting an immediate output stream. This causes the result to be printed
twice: once directly to the immediate output stream and once when
printing the result of HandleCommands.

This patch fixes the issue by introducing a new option to suppress
immediate output for temporary CommandReturnObjects.

Differential revision: https://reviews.llvm.org/D103349
2021-06-08 13:57:39 -07:00
David Green 0178ae734c [DSE] Add another multiblock loop DSE test. NFC
As reported in D100464, the stores in these loops should not be removed.
2021-06-08 21:54:59 +01:00
Louis Dionne 12933ba9ea [libc++] NFC: Rewrite the documentation for the debug mode 2021-06-08 16:50:12 -04:00
Whitney Tsang 07ef5805ab Revert "[LoopNest] Fix Wdeprecated-copy warnings"
This reverts commit dee1f0cb34.

It appears that this change broke the sanitizer-windows bot:
https://lab.llvm.org/buildbot/#/builders/127/builds/12064

Differential Revision: https://reviews.llvm.org/D103752
2021-06-08 20:46:12 +00:00
Petr Hosek 1683dbf0dd [CMake][Fuchsia] Disable vcruntime for first stage as well
Using vcruntime is breaking libc++ headers so don't use it.

Differential Revision: https://reviews.llvm.org/D103926
2021-06-08 13:44:24 -07:00
Jonas Paulsson d5e4f28c0a [SystemZ] Return true from isMaskAndCmp0FoldingBeneficial().
Return true if the mask is a constant uint of 2 bytes, in which case TMLL is
available.

Review: Ulrich Weigand
2021-06-08 15:42:46 -05:00
Brendon Cahoon 211e584fa2 Revert "[AMDGPU] Add gfx1013 target"
This reverts commit ea10a86984.

A sanitizer buildbot reports an error.
2021-06-08 16:29:41 -04:00
David Green 297088d1ad Revert "[DSE] Remove stores in the same loop iteration"
Apparently non-dead stores are being removed, as noted in D100464.

This reverts commit 222aeb4d51.
2021-06-08 21:23:08 +01:00
Petr Hosek a7142f5c91 Partially revert the Fuchsia changes to avoid the use of PIC
This reverts commit:
2a5afb4665
de98da2ece
1dba2a0269
2021-06-08 13:03:26 -07:00
David Green d7853bae94 [ARM] Generate VDUP(Const) from constant buildvectors
If we cannot otherwise use a VMOVimm/VMOVFPimm/VMVNimm, fall back to
producing a VDUP(const) as opposed to a constant pool load. This will at
least be smaller codesize and can allow the VDUP to be folded into other
instructions.

Differential Revision: https://reviews.llvm.org/D103808
2021-06-08 20:51:33 +01:00
Eric Astor dc0c3fe5f3 [ms] [llvm-ml] Disambiguate size directives and variable declarations
MASM allows statements of the form:
	<VAR> DWORD 5
to declare a variable with name <VAR>, while:
	call dword ptr [<value>]
is a valid instruction. To disambiguate, we recognize size directives by the trailing "ptr" token.

As discussed in https://lists.llvm.org/pipermail/llvm-dev/2021-May/150774.html

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D103257
2021-06-08 15:44:31 -04:00
Michael Liao 27332968d8 [amdgpu] Add `-enable-ocl-mangling-mismatch-workaround`.
- Add `-enable-ocl-mangling-mismatch-workaround` to work around the
  mismatch on OCL name mangling so far.

Reviewed By: yaxunl, rampitec

Differential Revision: https://reviews.llvm.org/D103920
2021-06-08 15:42:27 -04:00
Leonard Chan a9ea0a6a77 Fix for failing test mentioned in https://reviews.llvm.org/D103564.
This updates the path shown in the stack trace.
2021-06-08 12:38:01 -07:00
Alex Langford 64576a1be8 [lldb][NFC] Refactor name to index maps in Symtab
The various maps in Symtab lead to some repetative code. This should
improve the situation somewhat.

Differential Revision: https://reviews.llvm.org/D103652
2021-06-08 12:36:54 -07:00
Sanjay Patel d69c4372bf [CodeGen] remove instcombine from codegen tests; NFC
The FileCheck lines in these files are auto-generated and complete,
so there's very little upside (less CHECK lines) from running
-instcombine on them and violating the expected test layering
(optimizer developers shouldn't have to be aware of clang tests).

Running opt passes like this makes it harder to make changes such as:
D93817
2021-06-08 15:31:15 -04:00
Petr Hosek 2a5afb4665 [CMake][Fuchsia] Use PIC for Fuchsia runtimes
Disabling PIC globally also disabled PIC for runtimes which was
undesirable, manually override it.

Differential Revision: https://reviews.llvm.org/D103919
2021-06-08 12:30:27 -07:00
Nico Weber 9ec6c3bb2f [gn build] (semi-manually) port 944b3c53ae 2021-06-08 15:21:03 -04:00
Leonard Chan 944b3c53ae [NFC][compiler-rt][hwasan] Move allocation functions into their own file
This removes the `__sanitizer_*` allocation function definitions from
`hwasan_interceptors.cpp` and moves them into their own file. This way
implementations that do not use interceptors at all can just ignore
(almost) everything in `hwasan_interceptors.cpp`.

Also remove some unused headers in `hwasan_interceptors.cpp` after the move.

Differential Revision: https://reviews.llvm.org/D103564
2021-06-08 12:08:23 -07:00
Abhina Sreeskantharajan 0e8506deba [SystemZ][z/OS] Pass OpenFlags when creating tmp files
This patch https://reviews.llvm.org/D102876 caused some lit regressions on z/OS because tmp files were no longer being opened based on binary/text mode. This patch passes OpenFlags when creating tmp files so we can open files in different modes.

Reviewed By: amccarth

Differential Revision: https://reviews.llvm.org/D103806
2021-06-08 14:45:34 -04:00
Matt Arsenault 31a9659de5 GlobalISel: Avoid use of G_INSERT in insertParts
G_INSERT legalization is incomplete and doesn't work very
well. Instead try to use sequences of G_MERGE_VALUES/G_UNMERGE_VALUES
padding with undef values (although this can get pretty large).

For the case of load/store narrowing, this is still performing the
load/stores in irregularly sized pieces. It might be cleaner to split
this down into equal sized pieces, and rely on load/store merging to
optimize it.
2021-06-08 14:44:24 -04:00
Matt Arsenault 2927d40f04 GlobalISel: Hide virtual register creation in MIRBuilder 2021-06-08 14:44:24 -04:00
David Green f44770c329 [ARM] A couple of extra VMOVimm tests, useful for showing BE codegen. NFC 2021-06-08 19:39:45 +01:00
Mehdi Amini c0edcec630 Add a static assertions for custom Op<> to not defined data members (NFC)
A common mistake for newcomers to MLIR is to try to store extra member
on the Op class. However these are intended to be thing wrapper around
an Operation*, all the storage is meant to be encoded in attribute on
the underlying Operation. This can be confusing to debug, so better
catch it at build time.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D103869
2021-06-08 18:38:18 +00:00
Artur Pilipenko 9197bac297 Add an option to hide "cold" blocks from CFG graph
Introduce a new cl::opt to hide "cold" blocks from CFG DOT graphs.
Use BFI to get block relative frequency. Hide the block if the
frequency is below the threshold set by the command line option value.

Reviewed By: davidxl, hoy
Differential Revision: https://reviews.llvm.org/D103640
2021-06-08 11:29:27 -07:00
Petr Hosek f673365e1c [CMake][Fuchsia] Include llvm-otool in Fuchsia toolchain
We want to use llvm-otool in our build.

Differential Revision: https://reviews.llvm.org/D103918
2021-06-08 11:25:17 -07:00
Craig Topper c09b37553e [RISCV] Remove dead code from fixed-vectors-abs.ll test cases. NFC
We had two pointer arguments and a dead load presumably copied
from a binary operation test and modified into unary abs.
2021-06-08 11:24:23 -07:00