Commit Graph

385431 Commits

Author SHA1 Message Date
David Spickett a1f3187ca8 [lldb] Require x86 for unwind no-return test
The core file used is built for i386 so we
need the x86 backend to be able to load it.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D100195
2021-04-13 08:51:04 +00:00
David Spickett 96c82166b6 [lldb][Arm/AArch64] Add basic disassemble tests for Arm/AArch64
Previously the test would fail if you built on Arm/AArch64
but did not have the x86 llvm backend enabled.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D100192
2021-04-13 08:49:48 +00:00
David Spickett 8a64d80a95 [lldb] Require x86 backend for a bunch of DWARF tests
By moving them into a folder with a local lit config
requiring x86. All these tests use x86 target triples.

There are two tests that require target-x86_64 because
they run program files (instead of just needing the backend).
Those are moved to the x86 folder also but their REQUIRES are
unchanged.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D100193
2021-04-13 08:47:41 +00:00
Marek Kurdej cd854e686f [libc++] Fix test synopses and remove unused includes. 2021-04-13 10:32:35 +02:00
Ricky Taylor 6e098e133d [M68k] Implement AsmParser
This is a work-in-progress implementation of an assembler for M68k.

Outstanding work:
- Updating existing tests assembly syntax
- Writing new tests for the assembler (and disassembler)

I've left those until there's consensus that this approach is okay (I hope that's okay!).

Questions I'm aware of:
- Should this use Motorola or gas syntax? (At the moment it uses Motorola syntax.)
- The disassembler produces a table at runtime for disassembly generated from the code beads. Is this okay? (This is less than ideal but as I mentioned in my llvm-dev post, it's quite complicated to write a table-gen parser for code beads.)

Depends on D98519

Depends on D98532

Depends on D98534

Depends on D98535

Depends on D98536

Differential Revision: https://reviews.llvm.org/D98537
2021-04-13 09:25:34 +01:00
Alexey Bader 95c614afcd [NFC][SYCL] Drop idle triple component from regression tests. 2021-04-13 08:00:21 +03:00
Pavel Labath c9cf394f79 [lldb] Replace NativeProcess delegate list with a single delegate
In all this time, we've never used more than one delegate. The logic to
support multiple delegates is therefore untested, and becomes
particularly unwieldy once we need to support multiple processes.

Just remove it.
2021-04-13 09:49:38 +02:00
KareemErgawy-TomTom aa6eb2af10 [MLIR][LinAlg] Implement detensoring cost-modelling.
This patch introduces the neccessary infrastructure changes to implement
cost-modelling for detensoring. In particular, it introduces the
following changes:
- An extension to the dialect conversion framework to selectively
convert sub-set of non-entry BB arguments.
- An extension to branch conversion pattern to selectively convert
sub-set of a branche's operands.
- An interface for detensoring cost-modelling.
- 2 simple implementations of 2 different cost models.

This sets the stage to explose cost-modelling for detessoring in an
easier way. We still need to come up with better cost models.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D99945
2021-04-13 09:07:18 +02:00
Thomas Lively cc86a8aa53 [WebAssembly] Test i64x2.abs encoding
This test was disabled despite the instruction having been implemented for a
long time. This commit just enables the test.

Differential Revision: https://reviews.llvm.org/D100345
2021-04-13 00:06:25 -07:00
Craig Topper 7c9bbbf735 [RISCV] Rename RISCVISD::SHFLI to RISCVISD::SHFL and don't require the second operand to be an immediate.
Prep work for adding intrinsics in the future.

Left an assert that the input is constant in ReplaceNodeResults,
as the intrinsic shouldn't go through that path.
2021-04-12 23:46:50 -07:00
Freddy Ye b28ec3fd18 [compiler-rt][X86] fix build fail after "[X86] Support -march=rocketlake"
This copy error will cause a failed builder on sanitizer-x86_64-linux
2021-04-13 14:33:12 +08:00
Christopher Di Bella 0fcea41920 [libcxx][NFC] tweaks `incrementable_traits` per review
One suggestion was missed and is being patched now.
2021-04-13 05:20:55 +00:00
Christopher Di Bella fe31f11cc8 [libcxx] adds `std::incrementable_traits` to <iterator>
Implements parts of:
    - P0896R4 The One Ranges Proposal

Depends on D99041

Differential Revision: https://reviews.llvm.org/D99141
2021-04-13 05:01:45 +00:00
Jonas Devlieghere 7dbb4274ef [lldb] Fix replaying TestMemoryRead.py from reproducer
Remap the external file to the one embedded in the reproducer.
2021-04-12 21:10:09 -07:00
Amy Huang dad5caa59e Revert "Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands""
This change causes an assert / segmentation fault in LTO builds.

This reverts commit f2e4f3eff3.
2021-04-12 20:10:17 -07:00
Serguei Katkov c362179b0a [GreedyRA ORE] Add debug location for function level report
Reviewers: reames, MatzeB, anemet, thegameg
Reviewed By: thegameg
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D100168
2021-04-13 09:49:12 +07:00
Chen Zheng 80aa9b0f7b [PowerPC] stop reverse mem op generation for some cases.
We should consider the feeder user number when we do reverse memory
operation transformation. Otherwise, we may get negative impact.

Reviewed By: nemanjai

Differential Revision: https://reviews.llvm.org/D100166
2021-04-12 22:41:28 -04:00
Evgeniy Brevnov e50aa1af2d [NARY][NFC] Use hasNUsesOrMore instead of getNumUses since it's more
efficient.
2021-04-13 09:29:49 +07:00
Eugene Zhulenev a6628e596e [mlir] Async: add automatic reference counting at async.runtime operations level
Depends On D95311

Previous automatic-ref-counting pass worked with high level async operations (e.g. async.execute), however async values reference counting is a runtime implementation detail.

New pass mostly relies on the save liveness analysis to place drop_ref operations, and does better verification of CFG with different liveIn sets in block successors.

This is almost NFC change. No new reference counting ideas, just a cleanup of the previous version.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D95390
2021-04-12 18:54:55 -07:00
Freddy Ye 3fc1fe8db8 [X86] Support -march=rocketlake
Reviewed By: skan, craig.topper, MaskRay

Differential Revision: https://reviews.llvm.org/D100085
2021-04-13 09:48:13 +08:00
Geoffrey Martin-Noble ae33eef505 [MLIR] Add a switch operation to the standard dialect
This is similar to the definition of llvm.switch, providing
unstructured branch-based control flow. It differs from the LLVM
operation in that it accepts any signless integer (not only an i32),
takes no branch weights (the same as the Branch and CondBranch ops),
and has a slightly different syntax for the default case that includes
it in the list of cases with an explicit `default` keyword.

Also included are several canonicalizers.

See https://llvm.discourse.group/t/rfc-add-std-switch-and-scf-switch/3090

Reviewed By: rriddle, bondhugula

Differential Revision: https://reviews.llvm.org/D99925
2021-04-12 18:46:02 -07:00
LLVM GN Syncbot d926498d9f [gn build] Port e96df3e531 2021-04-13 01:35:58 +00:00
Jonas Devlieghere 30f591c386 [lldb] Disable TestLaunchProcessPosixSpawn.py with reproducers 2021-04-12 18:32:10 -07:00
Gulfem Savrun Yeniceri e96df3e531 [Passes] Add relative lookup table converter pass
Lookup tables generate non PIC-friendly code, which requires dynamic relocation as described in:
https://bugs.llvm.org/show_bug.cgi?id=45244

This patch adds a new pass that converts lookup tables to relative lookup tables to make them PIC-friendly.

Differential Revision: https://reviews.llvm.org/D94355
2021-04-13 01:29:41 +00:00
Emilio Cota 1310a19af0 [mlir] Use MCJIT to fix integration tests
Since c42c67ad ('Re-apply "[lli] Make -jit-kind=orc the default JIT
engine"'), ORC is the default JIT. Unfortunately, ORC seems to
ignore the --entry-function flag, which breaks all tests that
use the flag, namely the AMX and X86Vector integration tests.
This has been reported in PR#49906
(https://bugs.llvm.org/show_bug.cgi?id=49906).

Work around this by explicitly selecting MCJIT.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D100344
2021-04-12 18:25:33 -07:00
Ahmed Bougacha 6c4f2508e4 Revert "[lldb] [gdb-remote client] Refactor handling qSupported"
This reverts commit 3842de49f6.

It fails to build, with errors such as:
  GDBRemoteCommunicationClient.cpp:1005:20:
  error: no viable overloaded '='
          avail_name = compression;
2021-04-12 18:06:09 -07:00
Nick Desaulniers 237d4ee835 [JumpThreading] merge debug info when merging select+br
Jump threading can replace select then unconditional branch with
conditional branch, but when doing so loses debug info.

This destructive transform is eventually leading to a failed Verifier
run during full LTO builds of the Linux kernel with CFI and KCOV
enabled, as reported in PR39531.

ModuleSanitizerCoveragePass will insert calls to
__sanitizer_cov_trace_pc, and sometimes split critical edges,
using whatever debug info may or may not exist for the branch for
the added libcall. Since we can inline calls to
__sanitizer_cov_trace_pc due to LTO, this can lead to the error
observed in PR39531 when the debug info isn't propagated to
the libcall, because of prior destructive transforms that failed to
retain debug info.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D100137
2021-04-12 17:51:21 -07:00
Pirama Arumuga Nainar 5d214238a1 [compiler-rt][aarch64] Add PAC-RET/BTI property to hwasan_interceptors_vfork.S
D100143 added similar annotations but missed this file.

Differential Revision: https://reviews.llvm.org/D100354
2021-04-12 17:17:33 -07:00
Arthur Eubanks a8ab1f98d2 [Evaluator] Look through invariant.group intrinsics
Turning on -fstrict-vtable-pointers in Chrome caused an extra global
initializer. Turns out that a llvm.strip.invariant.group intrinsic was
causing GlobalOpt to fail to step through some simple code.

We can treat *.invariant.group uses as simply their operand.
Value::stripPointerCastsForAliasAnalysis() does exactly this. This
should be safe because the Evaluator does not skip memory accesses due
to invariants or alias analysis.

However, we don't want to leak that we've stripped arbitrary pointer
casts to users of Evaluator, so we bail out if we evaluate a function to
any constant, since we may have looked through *.invariant.group calls
and aliasing pointers cannot be arbitrarily substituted.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D98843
2021-04-12 16:12:15 -07:00
Nick Desaulniers 4914c98367 [SantizerCoverage] handle missing DBG MD when inserting libcalls
Instruction::getDebugLoc can return an invalid DebugLoc. For such cases
where metadata was accidentally removed from the libcall insertion
point, simply insert a DILocation with line 0 scoped to the caller. When
we can inline the libcall, such as during LTO, then we won't fail a
Verifier check that all calls to functions with debug metadata
themselves must have debug metadata.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D100158
2021-04-12 15:55:58 -07:00
Nathan James 27dfcd978e
[clang-tidy] Add <utility> include to misc-uniqueptr-reset-release
This is the only remaining check that creates `std::move` includes but doesn't add a `<utility>` include.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D97683
2021-04-12 23:32:15 +01:00
Michał Górny 3842de49f6 [lldb] [gdb-remote client] Refactor handling qSupported
Refactor the qSupported handler to split the reply into an array,
and identify features within the array rather than searching the string
for partial matches.  While at it, use StringRef.split() to process
the compression list instead of reinventing the wheel.

Switch the arguments to MaybeEnableCompression() to use an ArrayRef
of StringRefs to simplify parameter passing from GetRemoteQSupported().

Differential Revision: https://reviews.llvm.org/D100146
2021-04-13 00:23:07 +02:00
Yuanfang Chen c5fda0e662 Reland "Revert "[InstCombine] when calling conventions are compatible, don't convert the call to undef idiom""
This reverts commit a3fabc79ae (relands
f4d682d6ce with fix for the compile-time
regression issue).
2021-04-12 14:50:54 -07:00
Sterling Augustine c2ad7c2370 Revert "[clangd] Provide a way to disable external index"
This reverts commit 63bc9e4435.

This breaks llvm-project/clang-tools-extra/clangd/tool/ClangdMain.cpp:570:11:

with error: enumeration value 'None' not handled in switch [-Werror,-Wswitch]
2021-04-12 14:39:13 -07:00
Florian Hahn 9e81325b87
[PhaseOrdering] Add test for SimplifyCFG and LV interaction. 2021-04-12 22:29:47 +01:00
Florian Hahn 59334755e4
[SimplifyCFG] Add test requiring only hoisting a branch. 2021-04-12 22:29:34 +01:00
Fangrui Song 0a614fff4f [ARM] Fix -Wmissing-field-initializers 2021-04-12 14:28:23 -07:00
Lei Zhang 23b8264b52 [mlir][spirv] Fix runtime array stride when emulating bitwidth
The stride should be calculated with the converted array element
type, not the original input type.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D100337
2021-04-12 17:13:33 -04:00
Jian Cai ed1734931a Fix up build failures after cfce5b26a8
Build log: https://lab.llvm.org/buildbot/#/builders/37/builds/3538

Differential Revision: https://reviews.llvm.org/D98916
2021-04-12 14:09:15 -07:00
Lei Zhang 2eb98d89ac [mlir][spirv] Allow bitwidth emulation on runtime arrays
Runtime arrays are converted from memrefs with unknown
dimensions.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D100335
2021-04-12 17:04:18 -04:00
Nikita Popov a3fabc79ae Revert "[InstCombine] when calling conventions are compatible, don't convert the call to undef idiom"
This reverts commit f4d682d6ce.

This caused a significant compile-time regression:
https://llvm-compile-time-tracker.com/compare.php?from=4b7bad9eaea2233521a94f6b096aaa88dc584e23&to=f4d682d6ce6c5b3a41a0acf297507c82f5c21eef&stat=instructions

Possibly this is due to overeager parsing of target triples.
2021-04-12 22:55:59 +02:00
Lei Zhang 0deeaaca39 [mlir] Move memref.subview patterns to MemRef/Transforms/
These patterns have been used as a prerequisite step for lowering
to SPIR-V. But they don't involve SPIR-V dialect ops; they are
pure memref/vector op transformations. Given now we have a dedicated
MemRef dialect, moving them to Memref/Transforms/, which is a more
suitable place to host them, to allow used by others.

This commit just moves code around and renames patterns/passes
accordingly. CMakeLists.txt for existing MemRef libraries are
also improved along the way.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D100326
2021-04-12 16:38:22 -04:00
Julian Lettner 05df5c54e8 [TSan] Allow test contents to be copied before execution
Allow test contents to be copied before execution by using
`%ld_flags_rpath_so`, `%ld_flags_rpath_exe`, and `%dynamiclib`
substitutions.

rdar://76302416

Differential Revision: https://reviews.llvm.org/D100240
2021-04-12 13:30:06 -07:00
Sanjay Patel 5354a213a0 [InstCombine] fold shift+trunc signbit check
https://alive2.llvm.org/ce/z/6vQvrP

This solves:
https://llvm.org/PR49866
2021-04-12 16:19:43 -04:00
Sanjay Patel 58ad2b9e06 [InstCombine] add tests for shift+trunc signbit check; NFC 2021-04-12 16:19:43 -04:00
Daniele Castagna 7dd6068899
[clang-rename] Handle designated initializers.
clang Tooling, and more specifically Refactoring/Rename, have support
code to extract source locations given a Unified Symbol Resolution set.
This support code is used by clang-rename and other tools that might not
be in the tree.

Currently field designated initializer are not supported.
So, renaming S::a to S::b in this code:

  S s = { .a = 10 };

will not extract the field designated initializer for a (the 'a' after the
dot).

This patch adds support for field designated initialized to
RecursiveSymbolVisitor and RenameLocFinder that is used in
createRenameAtomicChanges.

Differential Revision: https://reviews.llvm.org/D100310
2021-04-12 13:15:14 -07:00
Jonas Devlieghere ba62ebc48e [lldb] Disable Shell/Subporcess with reproducers 2021-04-12 13:08:14 -07:00
peter klausler 5fe83b048a [flang] Correct TypeCode::IsLogical()
F18 is using the type codes for C's "least" int types to encode
the various kinds of Fortran's LOGICAL intrinsic type; update
the IsLogical() predicate accordingly.  (This member function
isn't yet used anywhere, so this patch is nearly an NFC.)

Differential Revision: https://reviews.llvm.org/D100323
2021-04-12 12:57:22 -07:00
jasonliu 52e9d80d5d [libc++] add `inline` for __open's definition in ifstream and ofstream
Summary:

When building with gcc on AIX, it seems that gcc does not like the
`always_inline` without the `inline` keyword.
So adding the inline keywords in for __open in ifstream and ofstream.
That will also make it consistent with __open in basic_filebuf
(it seems we added `inline` there before for gcc build as well).

Differential Revision: https://reviews.llvm.org/D99422
2021-04-12 19:25:49 +00:00
Lei Zhang fd91f81c85 [mlir][spirv] Put debug-only variable in LLVM_DEBUG
This avoids paying the cost when building in release.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D100325
2021-04-12 15:14:43 -04:00