Commit Graph

421789 Commits

Author SHA1 Message Date
Xiang1 Zhang a69c219a8c [x86] Support 3 builtin functions for 32-bits mode
_mm_cvtsi128_si64, _mm_cvtsi64_si128, _mm_extract_epi64
2022-04-22 09:06:25 +08:00
Matt Arsenault 667899a154 AMDGPU: Fix fneg combine test not checking full result
This wasn't accounting for the canonicalize of the input, or checking
the output fneg isn't folded as intended. Avoids test failure in
unrelated patch which happens to change register numberings.
2022-04-21 20:58:27 -04:00
Amy Zhuang 5bd4bcfc04 [mlir] Modify SuperVectorize to generate select op->combiner op
Insert the select op before the combiner op when vectorizing a
reduction loop that needs a mask, so the vectorized reduction loop
can pass isLoopParallel check and be transformed correctly in later
passes.

Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D124047
2022-04-21 17:09:13 -07:00
Dominic Chen fcbca197f2 [scudo] Disable memory tagging on arm64_32
arm64_32 is an ILP32 platform

Differential Revision: https://reviews.llvm.org/D124135
2022-04-21 17:22:10 -07:00
Brad Smith a0d40a579a [libcxx] Add some missing xlocale wrapper functions for OpenBSD
Reviewed By: Mordante

Differential Revision: https://reviews.llvm.org/D122861
2022-04-21 20:00:59 -04:00
Vitaly Buka 9be90748f1 Revert "[asan] Emit .size directive for global object size before redzone"
Revert "[docs] Fix underline"

Breaks a lot of asan tests in google.

This reverts commit 365c3e85bc.
This reverts commit 78a784bea4.
2022-04-21 16:21:17 -07:00
Zequan Wu 1921b19576 [LLDB][NativePDB] Make sure the number of param symbol records is the same as the number get from function type record before setting parameters. 2022-04-21 16:06:58 -07:00
Alexander Yermolovich 014cd37f51 [BOLT][DWARF] Implement monolithic DWARF5
Added implementation to support DWARF5 in monolithic mode.
Next step DWARF5 split dwarf support.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D121876
2022-04-21 16:02:23 -07:00
Joseph Huber 3348991106 [OpenMP] Properly guard linker input using the new driver
Summary:
A new offloading action builder line was added that wasn't guarded with
the new driver for OpenMP. This doesn't affect anything now but could
potentially cause problems.
2022-04-21 18:50:26 -04:00
Joseph Huber f557bb8733 [OpenMP][Docs] Remove usage of deprecated flag in documentation
Summary:
This documentation used the `-fopenmp-target-new-runtime` flag which is
deprecated and has no effect. Remove it.
2022-04-21 18:50:25 -04:00
Paul Kirth b8786413d8 Revert "[clang][safestack] Remove triple from stack usage test"
This reverts commit 414f84ba29.

Requires deirectives had already been added to the test, and CC1 tests
should use a target triple.

Differential Revision: https://reviews.llvm.org/D124210
2022-04-21 22:47:56 +00:00
Mircea Trofin e4794ff5c6 [mlgo][nfc] Decouple TensorSpec from tensorflow.
The motivation is twofold:

1) Allow plugging in a different training-time evaluator, e.g.
   TFLite-based, etc.

2) Allow using TensorSpec for AOT, too, to support evolution: we start
   by extracting a superset of the features currently supported by a
   model. For the tensors the model does not support, we just return a
   valid, but useless, buffer. This makes using a 'smaller' model (less
   supported tensors) transparent to the compiler. The key is to
   dimension the buffer appropriately, and we already have TensorSpec
   modeling that info.

The only coupling was due to the reliance of a TF internal API for
getting the element size, but for the types we are interested in,
`sizeof` is sufficient.

A subsequent change will yank out TensorSpec in its own module.

Differential Revision: https://reviews.llvm.org/D124045
2022-04-21 15:37:01 -07:00
Mahesh Ravishankar 0c090dcc8a [mlir][Linalg] Deprecate legacy reshape + generic op folding patterns.
These patterns have been superceded by the fusion by collapsing patterns.

Differential Revision: https://reviews.llvm.org/D124145
2022-04-21 22:25:23 +00:00
Dominic Chen e8572aca0c [libc] Use correct mnemonic for arm64_32 architecture
arm64_32 is an ILP32 platform

Differential Revision: https://reviews.llvm.org/D124134
2022-04-21 15:13:07 -07:00
Shafik Yaghmour 5ff992bca2 [DEBUG-INFO] Change how we handle auto return types for lambda operator() to be consistent with gcc
D70524 added support for auto return types for C++ member functions. I was
implementing support on the LLDB side for looking up the deduced type.

I ran into trouble with some cases with respect to lambdas. I looked into
how gcc was handling these cases and it appears gcc emits the deduced return type for lambdas.

So I am changing out behavior to match that.

Differential Revision: https://reviews.llvm.org/D123319
2022-04-21 14:58:50 -07:00
Paul Kirth 414f84ba29 [clang][safestack] Remove triple from stack usage test
Supplying the target triple caused breakeages for compilers that don't support
the supplied triple.

Reviewed By: mysterymath

Differential Revision: https://reviews.llvm.org/D124203
2022-04-21 21:58:24 +00:00
owenca 221c2b68dd [clang-format] Fix a crash on AllowShortFunctionsOnASingleLine
Fixes .

Differential Revision: https://reviews.llvm.org/D124152
2022-04-21 14:56:30 -07:00
Vasileios Porpodas e83ad23daf [TTI] Pre-commit cost model tests splat-loads. 2022-04-21 14:45:51 -07:00
Roy Sundahl d179627ef0 Fix sanitizer stack traces on aarch64.
Fixes llvm-project/compiler-rt/test/asan/TestCases/null_deref.cpp on
macOS/aarch64.

The bp (base pointer) variable was being loaded from register LR and
not FP on aarch64 (except for this narrow case):
defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0

Without a valid bp from the FP register, it is not possible to traverse
previous frames for a complete stack trace. The rationale for fetching
the LR as the bp for all cases except above is not clear but since the
FP register is the canonical register for use as the frame pointer, this
commit removes the restriction above for unconditional use all aarch64.

rdar://91587039

Differential Revision: https://reviews.llvm.org/D124140
2022-04-21 14:27:59 -07:00
Sam McCall 713800d331 [Testing] Fix standalone builds after a7691dee2d 2022-04-21 23:22:46 +02:00
Richard Smith f6a5ab6c8c Use builtin recognition to detect std::move / std::forward.
Replaces some prior ad-hoc detection strategies and generally cleans up
a little. No functional change intended.
2022-04-21 14:21:07 -07:00
owenca 7343f768d1 [clang-format][NFC] Clean up code in token annotator
Differential Revision: https://reviews.llvm.org/D123741
2022-04-21 14:17:38 -07:00
Alexander Yermolovich c87d405b22 [DWARF] Add API to get data from MCDwarfLineStr
This API will be used in D121876, to get finalized string data for
.debug_line_str.

Reviewed By: dblaikie, rafauler

Differential Revision: https://reviews.llvm.org/D124052
2022-04-21 14:08:20 -07:00
Alex Brachet 365c3e85bc [docs] Fix underline 2022-04-21 21:05:49 +00:00
Sam McCall 5287237a74 [clangd] Fix CLANGD_TIDY_CHECKS=Off tests after b859c39c40 2022-04-21 23:02:41 +02:00
Vitaly Buka b580c0e019 [msan] Update Use-after-destruction documentation
Reviewed By: kda, eugenis

Differential Revision: https://reviews.llvm.org/D124058
2022-04-21 14:02:02 -07:00
Douglas Yung 311929267d Mark test stack-usage-safestack.c as requiring x86.
This should fix buildbots that don't build the x86 target.
2022-04-21 13:58:39 -07:00
Sam McCall 480c59c11a [Testing] fix shared lib build after a7691dee2d
We still want clang_target_link_libraries for the clang deps.
2022-04-21 22:50:33 +02:00
Alex Brachet 78a784bea4 [asan] Emit .size directive for global object size before redzone
This emits an `st_size` that represents the actual useable size of an object before the redzone is added.

Reviewed By: vitalybuka, MaskRay, hctim

Differential Revision: https://reviews.llvm.org/D123010
2022-04-21 20:46:38 +00:00
Sam McCall 0d43614df1 [bazel] try to adapt a7691dee2d, again 2022-04-21 22:33:40 +02:00
Sanjay Patel 664ae7bbcc [InstCombine] C0 <<{nsw, nuw} (X - C1) --> (C0 >> C1) << X (2nd try)
The first attempt at this missed a check to make sure the offset
constant was in range and caused many bot failures.

That was missed in the Alive2 proof because on overshift creates
poison rather than the assert from APInt. Here's an alternate
attempt at a proof using count-trailing-zeros:
https://alive2.llvm.org/ce/z/pnXQYR

Original commit message:

This is similar to an existing pre-shift-of-constant fold:
8a9c70fc01
...but in this case, we need no-wrap on the shl and a negative
offset:
https://alive2.llvm.org/ce/z/_RVz99
2022-04-21 16:18:46 -04:00
Sam McCall f595b51f50 [bazel] try to adapt a7691dee2d 2022-04-21 22:09:12 +02:00
Fangrui Song 35e350d5ba Revert "[SimplifyCFG] Handle branch on same condition in pred more directly" and "[SimplifyCFG] Make FoldCondBranchOnPHI more amenable to extension"
This reverts commit 3df86e799e.
This reverts commit 8988254667.

`[SimplifyCFG] Handle branch on same condition in pred more directly`
caused non-determinism when compiling opt with a bootstrapped clang.
I have to revert the dependent commit as well.
2022-04-21 12:58:58 -07:00
Sam McCall a7691dee2d [Testing] TestAST, a helper for writing straight-line AST tests
Tests that need ASTs have to deal with the awkward control flow of
FrontendAction in some way. There are a few idioms used:
 - don't bother with unit tests, use clang -dump-ast
 - create an ASTConsumer by hand, which is bulky
 - use ASTMatchFinder - works pretty well if matchers are actually
   needed, very strange if they are not
 - use ASTUnit - this yields nice straight-line code, but ASTUnit is a
   terrifically complicated library not designed for this purpose

TestAST provides a very simple way to write straight-line tests: specify
the code/flags and it provides an AST that is kept alive until the
object is destroyed.
It's loosely modeled after TestTU in clangd, which we've successfully
used for a variety of tests.

I've updated a couple of clang tests to use this helper, IMO they're clearer.

Differential Revision: https://reviews.llvm.org/D123668
2022-04-21 21:46:45 +02:00
Atmn Patel c44420e90d [Libomptarget][remote] Add OpenMP linker flag to the plugin
The remote offloading server and plugin rely on OpenMP, so this needs to be added as a linker flag. Without this, applications segfault.

Differential Revision: https://reviews.llvm.org/D124200
2022-04-21 15:45:29 -04:00
Xiang Li 5c3a68d1e2 [DeveloperPolicy] Add invitation link for commit access.
In some case, GitHub will not send notification for commit access invitation. Add invitation link for people don't get notification from GitHub.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D124191
2022-04-21 12:44:59 -07:00
Chris Lattner 31c8abc3f1 [AsmParser/Printer] Rework sourceloc support for function arguments.
When Location tracking support for block arguments was added, we
discussed various approaches to threading support for this through
function-like argument parsing.  At the time, we added a parallel array
of locations that could hold this.  It turns out that that approach was
verbose and error prone, roughly no one adopted it.

This patch takes a different approach, adding an optional source
locator to the UnresolvedOperand class.  This fits much more naturally
into the standard structure we use for representing locators, and gives
all the function like dialects locator support for free (e.g. see the
test adding an example for the LLVM dialect).

Differential Revision: https://reviews.llvm.org/D124188
2022-04-21 12:43:36 -07:00
zhijian bf4ddf1840 [libc++][CI] added XFAIL LIBCXX-AIX-FIXME to new runnning test cases after install locale fileset on AIX OS.
Summary:

1. there are 23 test cases which do not run because of locale fileset not install, after the locale installed, these test cases will be run and fail. "LIBCXX-AIX-FIXME" on the 23 test cases which remain to be investigated on AIX.

2.after installed the locale fileset ,
the test case
libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp pass
remove XFAIL: LIBCXX-AIX-FIXME from the file

Reviewers: David Tenty
Differential Revision: https://reviews.llvm.org/D124174
2022-04-21 15:25:40 -04:00
Frederik Gossen 673e9828be [MLIR] Fix iteration counting in greedy pattern application
Previously, checking that a fix point is reached was counted as a full
iteration. As this "iteration" never changes the IR, this seems counter-
intuitive.

Differential Revision: https://reviews.llvm.org/D123641
2022-04-21 15:17:28 -04:00
Sam McCall e80ee1829c Reland [Frontend] avoid copy of PCH data when PrecompiledPreamble stores it in memory
This reverts commit eadf352707.

The reland fixes a couple of places in clang that were unneccesarily
requesting a null-terminated buffer of the PCH, and hitting assertions.
2022-04-21 21:15:39 +02:00
Craig Topper 9534811aa8 [RISCV] Teach generateInstSeqImpl to generate BSETI for single bit cases.
If the immediate has one bit set, but isn't a simm32 we can try
the BSETI instruction from Zbs.
2022-04-21 12:08:34 -07:00
Ulrich Weigand 9778ec057c [SystemZ] Add z16 scheduler description
Add scheduler description for the new IBM z16 processor.

Patch by Jonas Paulsson.
2022-04-21 20:38:16 +02:00
Sam McCall eadf352707 Revert "[Frontend] avoid copy of PCH data when PrecompiledPreamble stores it in memory"
This reverts commit 6e22dac2e2.

Seems to cause bot failures e.g.
https://lab.llvm.org/buildbot/#/builders/109/builds/37071
2022-04-21 20:22:47 +02:00
Sanjay Patel 49f950ae26 [InstCombine] add more tests for a planned shift fold; NFC
These are reductions for a missed constraint (the offset
constant must be less than the bitwidth) that caused the
first version of the patch ( 5819f4a422 ) to be reverted.
2022-04-21 14:08:50 -04:00
Fangrui Song 409eb5dc3e [LegacyPM] Remove GCOVProfilerLegacyPass
Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
Following recent changes to remove non-core features of the legacy
PM/optimization pipeline, remove GCOVProfilerLegacyPass.

I have checked many LLVM users and only llvm-hs[1] uses the legacy gcov pass.

[1]: https://github.com/llvm-hs/llvm-hs/issues/392

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D123829
2022-04-21 10:59:30 -07:00
Ulrich Weigand 1283ccb610 Support z16 processor name
The recently announced IBM z16 processor implements the architecture
already supported as "arch14" in LLVM.  This patch adds support for
"z16" as an alternate architecture name for arch14.
2022-04-21 19:58:22 +02:00
Sam McCall 6e22dac2e2 [Frontend] avoid copy of PCH data when PrecompiledPreamble stores it in memory
Instead of unconditionally copying the PCHBuffer into an ostream which can be
backed either by a string or a file, just make the PCHBuffer itself the
in-memory storage.

Differential Revision: https://reviews.llvm.org/D124180
2022-04-21 19:52:59 +02:00
Haojian Wu 84051d8226 [clangd] Fix a declare-constructor tweak crash on incomplete fields.
Differential Revision: https://reviews.llvm.org/D124154
2022-04-21 19:44:43 +02:00
Ulrich Weigand e4085a012c [sanitizer] Fix prctl unit test on non-SMT systems
On systems where the kernel supports the PR_SCHED_CORE
interface, but there is no SMT, the prctl call will set
errno to ENODEV, which currently causes the test to fail.

Fix by accepting ENODEV in addition to EINVAL.
2022-04-21 19:31:04 +02:00
Fangrui Song d133538b8b [LegacyPM] Remove MemorySanitizerLegacyPass
Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
Following recent changes to remove non-core features of the legacy
PM/optimization pipeline, remove MemorySanitizerLegacyPass.

Differential Revision: https://reviews.llvm.org/D123894
2022-04-21 10:21:46 -07:00