Commit Graph

473654 Commits

Author SHA1 Message Date
Alexander Richardson
eade41c453
[UpdateTestChecks] Add @llvm/pr-subscribers-testing-tools to CODEOWNERS (#65338) 2023-09-05 21:36:57 +01:00
Kazu Hirata
2f0153a756 [SelectionDAG] Remove deprecated getLoad, getStore, etc
These functions have been deprecated since:

  commit 8b1d86aedf
  Author: Guillaume Chatelet <gchatelet@google.com>
  Date:   Mon Jan 23 10:08:01 2023 +0000

  commit 355cc3fd8c
  Author: Guillaume Chatelet <gchatelet@google.com>
  Date:   Tue Jan 24 10:39:58 2023 +0000

Differential Revision: https://reviews.llvm.org/D159448
2023-09-05 13:34:55 -07:00
Heejin Ahn
666098c5b3 [Headers] Remove musl-related comment about NULL
This removes a comment added in D159312, which warned people to not
re-add a whitespace in the `((void*)0))` expression. After discussions
happened in D159312, it doesn't seem like a permanent solution.

While I'd like to keep the whitespace removed for now, given that at
least it can be a band-aid to some users who use musl and clang's
`stddef.h` at the same time, it seems the usage of them together is not
something that's officially supported, and I should not be implying this
should be the permanent solution by saying so in the comments.

Reviewed By: aaron.ballman, ributzka

Differential Revision: https://reviews.llvm.org/D159383
2023-09-05 13:29:02 -07:00
Jan Svoboda
e76d4fddcb [clang][arcmt] NFCI: Change invocation const-ness 2023-09-05 13:23:54 -07:00
Jan Svoboda
8e0c9bb91f [clang] NFCI: Change returned AnalyzerOptions smart pointer to reference 2023-09-05 13:23:53 -07:00
Jan Svoboda
5746002ebb [clang] NFCI: Change returned LanguageOptions pointer to reference 2023-09-05 13:23:53 -07:00
Bill Wendling
b0cbf3a0da [NFC] remove unneded header includes
This time from clang/Parse.

Differential Revision: https://reviews.llvm.org/D159435
2023-09-05 13:12:01 -07:00
Bill Wendling
7d6283fd09 [NFC] Remove unneeded header includes
Use forward decls instead of #including the header files.

Differential Revision: https://reviews.llvm.org/D159421
2023-09-05 13:12:00 -07:00
Louis Dionne
6b46c7688f [libc++][NFC] Remove an outdated UNSUPPORTED annotation
This is likely a rebase artifact. libcpp-has-no-concepts is not a
Lit feature we ever define anymore.
2023-09-05 16:00:44 -04:00
Manna, Soumi
33b02d766e [NFC][Clang] Fix static code analyzer concern about null value dereference
CurLexer is dereferenced and should not be null in clang::Preprocessor::SkipExcludedConditionalBlock(clang::SourceLocation, clang::SourceLocation, bool, bool, clang::SourceLocation)

This patch adds an assert for NULL value check of pointer CurLexer and splits up all predicates so that, when/if a failure occurs, we'll be able to tell which predicate failed.

Reviewed By: tahonermann

Differential Revision: https://reviews.llvm.org/D158293
2023-09-05 12:48:43 -07:00
Aiden Grossman
c4a769ba03 [llvm-exegesis] Print errno on failures in subprocess
Some error logging in llvm-exegesis under the subprocess executor just
prints a generic failure information rather than any details about the
error as we omit printing the string version of errno. This patch adds
in printing errno at all relevant points in the subprocess executor that
were previously missed.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D157682
2023-09-05 12:41:49 -07:00
Aiden Grossman
ca8dbdc12a [llvm-exegesis] Add error for subprocess and dummy perf counters
When using the subprocess execution mode and dummy perf counters
currently, cryptic errors will be printed out related to not being able
to send the file descriptor through a socket. This patch prints out an
explicit message that this configuration isn't (currently) supported.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D157686
2023-09-05 12:34:26 -07:00
Amara Emerson
6c31f20fee
[GlobalISel] Fold fmul x, 1.0 -> x (#65379) 2023-09-06 03:14:16 +08:00
Spenser Bauman
f32427e044 [mlir][linalg] Fix lowering of tensor.pack operations
Tensor pack operations are optimistically lowered to pad + insert_slice
when the pack operation only pads the input tensor. The existing
lowering emits insert_slice operations which do not meet the
rank-reducibility requirements of insert_slice.

This change updates the logic in linalg::lowerPack to first check the
rank-reducibility requirement. When the requirement is not met, the
lowering will emit the full sequence of pad + expand + transpose.

Reviewed By: chelini

Differential Revision: https://reviews.llvm.org/D159382
2023-09-05 21:08:13 +02:00
Owen Pan
4146b30785 Revert "[Format] Modernize SpaceBeforeParensCustom (NFC)"
This reverts commit ad183b927b which seems to break
clang/docs/tools/dump_format_style.py.
2023-09-05 12:03:14 -07:00
Jakub Kuderski
c8544d280a [mlir] Support attributes in matchPattern
The primary motivation is to we have a simple mechanism to extract
values from attributes in folders and canon patterns without having to
re-fold constants or write nested conditions over attribute types.

Matching over attributes composes especially well with fold adaptors.

Update folds in Arith and SPIRV dialects to match over attributes, where
applicable.

Reviewed By: mehdi_amini, zero9178

Differential Revision: https://reviews.llvm.org/D159437
2023-09-05 14:52:27 -04:00
cor3ntin
c144086997
[Github] Workaround a GH action bug causing manually added labels to be removed (#65395)
Fixes https://github.com/llvm/llvm-project/issues/65345
2023-09-05 20:46:41 +02:00
Chia-hung Duan
4c676d5265 [scudo] Clean up decl of RSSLimit funtions (NFC)
Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D159389
2023-09-05 18:37:15 +00:00
Jakub Kuderski
887e1aa330 [mlir][spirv] Fix sub-word memref.store conversion
Support environments where logical types do not necessarily correspond to allowed storage access types.

Also make pattern match failures more descriptive.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D159386
2023-09-05 14:35:27 -04:00
Francis Visoiu Mistrih
c1eacc3c40
[Matrix] Fix test on SystemZ
As reported by @uweigand in https://reviews.llvm.org/D158883:

```
The newly added test cases in ffp-model.c fail on SystemZ, making CI red:
https://lab.llvm.org/buildbot/#/builders/94/builds/16280

The root cause seems to be that by default, the SystemZ back-end targets
a machine without SIMD support, and therefore vector return types are
passed via implicit reference according to the ABI
```

this uses manual stores instead of vector returns.
2023-09-05 14:22:55 -04:00
Arkadiy Yudintsev
f465a482ca [clang-format] Fix segmentation fault when formatting nested namespaces
Fixing the clang-format crash with the segmentation fault error when
formatting code with nested namespaces.

Fixes #64701.

Differential Revision: https://reviews.llvm.org/D158363
2023-09-05 11:12:14 -07:00
Benjamin Kramer
1078627cf8 [bazel] Add missing dependency for e55e36de7a 2023-09-05 19:58:38 +02:00
Alex Langford
5bff905c0d [lldb][NFCI] Remove unused method TypeCategoryMap::Get(uint32_t, ValueSP &)
Differential Revision: https://reviews.llvm.org/D159387
2023-09-05 10:53:56 -07:00
Chris Bowler
fbdf684fae [libc++] Avoid destructor call for error_category singletons
When a handle to an error_category singleton object is used during the
termination phase of a program, the destruction of the error_category
object may have occurred prior to execution of the current destructor
or function registered with atexit, because the singleton object may
have been constructed after the corresponding initialization or call
to atexit. For example, the updated tests from this patch will fail if
using a libc++ built using a compiler that updates the vtable of the
object on destruction.

This patch attempts to avoid the issue by causing the destructor to not
be called in the style of ResourceInitHelper in src/experimental/memory_resource.cpp.
This approach might not work if object lifetime is strictly enforced.

Differential Revision: https://reviews.llvm.org/D65667

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2023-09-05 13:44:10 -04:00
Michael Maitland
e6436952e3
[RISCV] Split VFWREDUSUM and VFWREDOSUM SchedWrite (#65386)
WriteVFWRedOV_From and WriteVFWRedV_From SchedWrite classes exist
already, but no pseudos were using the ordered SchedWrite. This change
makes it so that the VFWREDOSUM pseudo used the ordered VFW SchedWrite.
2023-09-05 13:39:44 -04:00
Corentin Jabot
a58c59e679 Revert "Update new-prs.yml"
This was meant to be a test in my personal fork...

This reverts commit ee53efde38.
2023-09-05 19:30:11 +02:00
Slava Zakharin
de8939ffca
[flang] Reset lbounds for allocatable function results. (#65286)
With HLFIR the lbounds for the ALLOCATABLE result are taken from the
mutable box created for the result, so the non-default lbounds might be
propagated further causing incorrect result, e.g.:
```
program p
  real, allocatable :: p5(:)
  allocate(p5, source=real_init())
  print *, lbound(p5, 1) ! must print 1, but prints 7
contains
  function real_init()
    real, allocatable :: real_init(:)
    allocate(real_init(7:8))
  end function real_init
end program p
```

With FIR lowering the box passed for `source` has explicit lower bound 1
at the call site, but the runtime box initialized by `real_init` call
still has lower bound 7. I am not sure if the runtime box initialized by
`real_init` will ever be accessed in a debugger via Fortran variable
names, but I think that having the right runtime bounds that can be
accessible via examining registers/stack might be good in general. So I
decided to update the runtime bounds at the point of return.

This change fixes the test above for HLFIR.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D156187
2023-09-05 10:26:16 -07:00
Amy Kwan
f0b2f69541 [AIX][TLS] Generate .extern and .ref references to __tls_get_addr for local-exec accesses.
Compiling with TLS variables requires -pthread, but if the user omits this
option, the compiler will not show any obvious indication during compilation
that -pthread is needed for programs using TLS variables. Instead, the user will
experience a segmentation fault when running programs with TLS variables in them
and without specifying -pthread.

This patch aims to generate .extern/.ref references to __tls_get_addr[DS] for
local-exec accesses, in order to trigger an error from the linker to indicate
that there is an undefined symbol to __tls_get_addr. Doing so will remind the
user to compile/link with -pthread.

Differential Revision: https://reviews.llvm.org/D151335
2023-09-05 12:15:14 -05:00
Antonio Frighetto
be0e42c16b [lldb][Plugins] Reflect structure changes in ObjectContainer
Reflect recent changes made to MachO
`fileset_entry_command` struct.
2023-09-05 19:13:43 +02:00
cor3ntin
ee53efde38
Update new-prs.yml 2023-09-05 19:05:46 +02:00
Jingu Kang
06ec1ff294 [AArch64] Replace uaddlv intrinsic with uaddlv sdnode
Differential Revision: https://reviews.llvm.org/D159447
2023-09-05 17:57:38 +01:00
Antonio Frighetto
282bf213ee [llvm-nm][MachO] Add support for MH_FILESET
Support printing of symbols for MachO of `MH_FILESET` type.
This is achieved by extending `dumpSymbolNamesFromObject`
to encompass fileset handling, and including an offset in
`MachOObjectFile` class to locate embedded MachO headers.

Differential Revision: https://reviews.llvm.org/D159294
2023-09-05 18:51:12 +02:00
Adrian Prantl
d227c8a120 Add missing nullptr check.
While it's the plugin's moral duty to also set the error, this code
can't depend on that.
2023-09-05 09:48:06 -07:00
Simon Pilgrim
e086e0aeef [X86] Add test coverage for new smulo folds added in D159406
Pulled from the InstCombine with_overflow.ll tests
2023-09-05 17:43:42 +01:00
Michael Maitland
3065ce1ee3 [RISCV][llvm-mca] Fix Fix getLMUL values
These values come from RISCVInstrInfoVPseudos.td. MF8 and MF2 were
swapped by accident.

Differential Revision: https://reviews.llvm.org/D159301
2023-09-05 09:34:47 -07:00
Mark de Wever
6f8b17703d [libc++][C++20 modules] Tests no except build.
Depends on D158661

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D158862
2023-09-05 18:29:27 +02:00
Mark de Wever
98c6c985f1 [libc++][C++20 modules] Tests no wchar_t build.
Depends on D158358

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D158661
2023-09-05 18:22:10 +02:00
Jens Massberg
6d2e756dac Initialize ConceptReference of new AutoTypeLoc with nullptr.
Differential Revision: https://reviews.llvm.org/D159450
2023-09-05 18:17:44 +02:00
Sam McCall
54091d37f2
[AST] Fix nested name specifiers printing as NamespaceNamespace (#65266)
This happens because we print both the kind of the NNS and the kind of
decl (when it refers to one). These are always the same string.
2023-09-05 18:15:06 +02:00
Abhinav271828
61dd539836
[MLIR][Presburger] Fraction: implement arithmetic operations (/, +, -) and printing (#65310) 2023-09-05 21:44:57 +05:30
Sergei Barannikov
18a628ec4e [AST] Use correct APSInt width when evaluating string literals
The width of the APSInt values should be the width of an element.
getCharByteWidth returns the size of an element in _host_ bytes, which
makes the width N times greater, where N is the ratio between target's
CHAR_BIT and host's CHAR_BIT.
This is NFC for in-tree targets because all of them have CHAR_BIT == 8.

Reviewed By: cor3ntin, aaron.ballman

Differential Revision: https://reviews.llvm.org/D154773
2023-09-05 19:14:09 +03:00
Mark de Wever
b9f24033f7 [libc++][C++20 modules] Enabling in C++20.
The vendors of the MSVC STL, libstdc++ and libc++ have agreed [1] to
make the C++23 modules std and std.compat available in C++20. This
provides the std module; libc++ has not implemented the std.compat
module yet.

[1] https://github.com/microsoft/STL/issues/3945

Depends on D158357

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D158358
2023-09-05 18:10:46 +02:00
Philip Reames
de34d39b66 [RISCV] Cap build vector cost to avoid quadratic cost at high LMULs
Each vslide1down operation is linear in LMUL on common hardware. (For instance, the sifive-x280 cost model models slides this way.) If we do a VL unique inserts, each with a cost linear in LMUL, the overall cost is O(VL*LMUL).  Since VL is a linear function of LMUL, this means the current lowering is quadradic in both LMUL and VL.  To avoid the degenerate case, fallback to the stack if the cost is more than a fixed (linear) threshold.

For context, here's the sifive-x280 llvm-mca results for the current lowering and stack based lowering for each LMUL (using e64). Assumes code was compiled for V (i.e. zvl128b).
  buildvector_m1_via_stack.mca:Total Cycles: 1904
  buildvector_m2_via_stack.mca:Total Cycles: 2104
  buildvector_m4_via_stack.mca:Total Cycles: 2504
  buildvector_m8_via_stack.mca:Total Cycles: 3304
  buildvector_m1_via_vslide1down.mca:Total Cycles:  804
  buildvector_m2_via_vslide1down.mca:Total Cycles:  1604
  buildvector_m4_via_vslide1down.mca:Total Cycles:  6400
  buildvector_m8_via_vslide1down.mca:Total Cycles: 25599

There are other schemes we could use to cap the cost. The next best is recursive decomposition of the vector into smaller LMULs. That's still quadratic, but with a better constant. However, stack based seems to cost better on all LMULs, so we can just go with the simpler scheme.

Arguably, this patch is fixing a regression introduced with my D149667 as before that change, we'd always fallback to the stack, and thus didn't have the non-linearity.

Differential Revision: https://reviews.llvm.org/D159332
2023-09-05 09:03:26 -07:00
Oleksandr "Alex" Zinenko
3964d943ec
[mlir] transform.structured.match fix tilingIface condition (#65337)
The matching condition for payload ops implementing TilingInterface was
inverted. Fix it and add a test.
2023-09-05 18:02:33 +02:00
Craig Topper
fa31ce5320
[RISCV][GISel] Add gisel-commandline-option.ll similar to AArch64. (#65299)
This allows us to see the pass pipeline for GlobalISel.
2023-09-05 09:01:50 -07:00
Oleksandr "Alex" Zinenko
e55e36de7a
[mlir] alloc-to-alloca conversion for memref (#65335)
Introduce a simple conversion of a memref.alloc/dealloc pair into an
alloca in the same scope. Expose it as a transform op and a pattern.

Allocas typically lower to stack allocations as opposed to alloc/dealloc
that lower to significantly more expensive malloc/free calls. In
addition, this can be combined with allocation hoisting from loops to
further improve performance.
2023-09-05 17:58:22 +02:00
Paul T Robinson
a4605af26f
[CodeGen][LTO] Rename some misleading variables (#65185)
Some flags named "IsLTO" and "IsThinLTO" implied they described
compilation modes, but with Unified LTO this is no longer true. Rename
these to "PrepForXXX" to be less confusing to readers. Also, deleted
"IsThinOrUnifiedLTO" because Unified implies PrepareForThinLTO.
2023-09-05 08:57:16 -07:00
Oleksandr "Alex" Zinenko
c17735053b
[mlir] transform.structured.match loop-like flag (#65336)
Add an enum option to `transform.structured.match` operation to match
payload operations implementing LoopLikeOpInterface.
2023-09-05 17:56:00 +02:00
Mark de Wever
c5cf4f7e4f
[clang][doc] Don't escape _ in .rst files. (#65277)
The current generated ClangCommandLineReference.rst unconditionally
escapes underscores. This leads odd output on the website
https://clang.llvm.org/docs/ClangCommandLineReference.html

For example

   -fchar8\_t, -fno-char8\_t

Whether an underscore should be escaped depends on the state. Currently
the escape routine doesn't keep track of the state and currently
underscores are not used in places where they need to be escaped.
Therefore remove the underscore from the list of escaped characters.
2023-09-05 17:54:46 +02:00
Alexey Bataev
09b8bbd6e0 [SLP][NFC]Reorder indeces instead of real values, NFC.
May save some memory/compile time.
2023-09-05 08:48:52 -07:00