Commit Graph

475458 Commits

Author SHA1 Message Date
Pranav Kant
613a09d99e
[builtins][NFC] Avoid using CRT_LDBL_128BIT in tests (#66832)
https://reviews.llvm.org/D153812 removed this macro from
implementations. Clean this up from tests as well.
2023-09-19 18:08:50 -07:00
Alex Langford
b927490d73 [lldb][NFCI] Remove unused struct ConstString::StringIsEqual
This doesn't seem to be used at all, no need to keep it around.
2023-09-19 17:39:22 -07:00
Sergei Barannikov
dd477ebd23
[Sparc] Remove LEA instructions (NFCI) (#65850)
LEA_ADDri and LEAX_ADDri are printed / encoded the same way as ADDri. I
had to change the type of simm13Op so that it can be used in both 32-
and 64-bit modes. This required the changes in operands of some
InstAliases.
2023-09-20 03:34:39 +03:00
Joseph Huber
c2e92cb490 [Docs] Fix table after previous document update
Summary:
Someone broke this table in the documentation. Fix it by adding the
proper spacing.
2023-09-19 19:33:29 -05:00
Peiming Liu
bfa3bc4378
[mlir][sparse] unifies sparse_tensor.sort_coo/sort into one operation. (#66722)
The use cases of the two operations are largely overlapped, let's
simplify it and only use one of them.
2023-09-19 17:02:32 -07:00
Jim Ingham
74338bfe0c A test was changing directory and then incorrectly restoring the directory
to the "testdir" which is the build directory for that test, not the
original source directory.  That caused subsequent tests to fail.
2023-09-19 16:46:08 -07:00
Arthur Eubanks
64573da4bf
[IR] Add "Large Data Threshold" module metadata (#66797)
This allows us to not have to pass -mllvm flags to set the large data
threshold for (in-LLD/not-distributed) ThinLTO.

Follows https://reviews.llvm.org/D52322, which did the same for the code
model.

Since the large data threshold is tied to the code model and we disallow
mixing different code models, do the same for the large data threshold.
2023-09-19 16:36:30 -07:00
DianQK
96ea48ff5d
[SimplifyCFG] Hoist common instructions on Switch.
Sink common instructions are not always performance friendly. We need to implement hoist common instructions on switch instruction to solve the following problem:
```
define i1 @foo(i64 %a, i64 %b, i64 %c, i64 %d) {
start:
  %test = icmp eq i64 %a, %d
  br i1 %test, label %switch_bb, label %exit

switch_bb:                                        ; preds = %start
  switch i64 %a, label %bb0 [
    i64 1, label %bb1
    i64 2, label %bb2
  ]

bb0:                                              ; preds = %switch_bb
  %0 = icmp eq i64 %b, %c
  br label %exit

bb1:                                              ; preds = %switch_bb
  %1 = icmp eq i64 %b, %c
  br label %exit

bb2:                                              ; preds = %switch_bb
  %2 = icmp eq i64 %b, %c
  br label %exit

exit:                                             ; preds = %bb2, %bb1, %bb0, %start
  %result = phi i1 [ false, %start ], [ %0, %bb0 ], [ %1, %bb1 ], [ %2, %bb2 ]
  ret i1 %result
}
```
The pre-commit test is D156617.

Reviewed By: XChy, nikic

Differential Revision: https://reviews.llvm.org/D155711
2023-09-20 07:21:49 +08:00
DianQK
40b0ab287f
[SimplifyCFG] Pre-commit test for extending HoistThenElseCodeToIf.
Pre-commit test for D155711.

Differential Revision: https://reviews.llvm.org/D156617
2023-09-20 07:21:48 +08:00
Douglas Yung
2baf4a06ef Fix test added in D150987 to account for different path separators which was causing the test to fail on Windows.
Should fix https://lab.llvm.org/buildbot/#/builders/216/builds/27535
2023-09-19 16:18:34 -07:00
Fangrui Song
a45502cdb2 [bazel] Port c649f29c24 (llvm-nm --line-numbers) 2023-09-19 15:59:05 -07:00
Austin Kerbow
69447d6afe [AMDGPU] Add ASM and MC updates for preloading kernargs
Add assembler directives for preloading kernel arguments that correspond
to new fields in the kernel descriptor for the length and offset of
arguments that will be placed in SGPRs prior to kernel launch. Alignment
of the arguments in SGPRs is equivalent to the kernarg segment when
accessed via the kernarg_segment_ptr. Kernarg SGPRs are allocated
directly after other user SGPRs.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D159459
2023-09-19 15:45:16 -07:00
Joel E. Denny
30d77fb808 [lit] Apply aa71680f2948's fix to an additional test
Seen at
<https://lab.llvm.org/buildbot/#/builders/216/builds/27538/steps/7/logs/FAIL__lit___shtest-external-shell-kill_py>.
2023-09-19 18:40:50 -04:00
michaelrj-google
d37496e75a
[libc] Fix printf config not working (#66834)
The list of printf copts available in config.json wasn't working because
the printf_core subdirectory was included before the printf_copts
variable was defined, making it effectively nothing for the printf
internals. Additionally, the tests weren't respecting the flags so they
would cause the tests to fail. This patch reorders the cmake in src and
adds flag handling in test.
2023-09-19 15:36:14 -07:00
Louis Dionne
6af2674597
[clang] Improve CI output when trailing whitespace is found (#66649)
Fixes #66468
2023-09-19 18:17:03 -04:00
Louis Dionne
e7a7a16901
[libc++] Fix __threading_support when used with C11 threading (#66780)
Since we are defining these typedefs inside namespace std, we need to
refer to ::once_flag (the C Standard Library version). Otherwise
'once_flag' refers to 'std::once_flag', and that's not something we can
pass to the C Standard Library '::call_once()' function later on.
2023-09-19 18:15:26 -04:00
DianQK
2d1e8a03f5
[EarlyCSE] Compare GEP instructions based on offset (#65875)
Closes #65763.
This will provide more opportunities for constant propagation for
subsequent optimizations.
2023-09-20 06:14:45 +08:00
Austin Kerbow
60a227c464 [AMDGPU] Use inreg for hint to preload kernel arguments
This patch is the first in a series that adds support for pre-loading
kernel arguments into SGPRs. The command-line argument
'amdgpu-kernarg-preload-count' is used to specify the number of
arguments sequentially from the first that we should attempt to preload,
the default is 0.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D156852
2023-09-19 15:13:38 -07:00
Alan Phipps
a50486fd73 [InstrProf][compiler-rt] Enable MC/DC Support in LLVM Source-based Code Coverage (1/3)
Part 1 of 3. This includes the LLVM back-end processing and profile
reading/writing components. compiler-rt changes are included.

Differential Revision: https://reviews.llvm.org/D138846
2023-09-19 17:07:23 -05:00
Joel E. Denny
aa71680f29 [lit] Fix a test fail under windows
Seen at
<https://lab.llvm.org/buildbot/#/builders/216/builds/27531/steps/7/logs/FAIL__lit___shtest-run-at-line_py>.

Discussed starting at
<https://github.com/llvm/llvm-project/pull/66408#issuecomment-1726448368>.
2023-09-19 18:05:13 -04:00
Jakub Kuderski
d13da154a7
[mlir][spirv] Define KHR cooperative matrix properties (#66823) 2023-09-19 17:50:22 -04:00
Jakub Kuderski
ab2c104518
[mlir][spirv] Suffix NV cooperative matrix props with _nv (#66820)
This is in preparation for adding a KHR variant which does not share the
same parameters and needs a separate attribute.
2023-09-19 17:45:14 -04:00
cor3ntin
0677d7cd8c
[Clang] Static member initializers are not immediate escalating context. (#66021)
Per CWG2760, default members initializers should be consider part the
body of constructors, which mean they are evaluated in an immediate
escalating context.

However, this does not apply to static members.

This patch produces some extraneous diagnostics, unfortunately we do not
have a good way to report an error back to the initializer and this is a
pre existing issue

Fixes #65985
Fixes #66562
2023-09-19 23:41:51 +02:00
Mircea Trofin
d8873df4dc
[AsmPrint] Dump raw frequencies in -mbb-profile-dump (#66818)
We were losing the function entry count, which is useful to check profile quality. For the original cases where we want
entrypoint-relative MBB frequencies, the user would just need to divide these values by the entrypoint (first MBB, with ID=0) value.
2023-09-19 14:37:06 -07:00
Daniel Thornburgh
b88cffeafd Explicitly set triple on line-numbers.test 2023-09-19 14:34:16 -07:00
Cyndy Ishida
64cffc7996
[llvm][docs] Update active CoC Commitee members (#66814) 2023-09-19 14:33:55 -07:00
Aart Bik
619a888dd8
[mlir][sparse][gpu] free all buffers allocated for spGEMM (#66813)
Yup, a bit of an oversight ;-)
2023-09-19 14:33:12 -07:00
Rashmi Mudduluru
87b8c85bba [-Wunsafe-bugger-usage] Clean tests: remove nondeterministic ordering
Differential Review: https://reviews.llvm.org/D158553
2023-09-19 14:20:45 -07:00
Guillaume Chatelet
9feb0c9b6e
Revert "[libc][cmake] Tidy compiler includes (#66783)" (#66822)
This reverts commit a35a3b75b2. This broke
libc benchmarks.
2023-09-19 23:18:08 +02:00
Daniel Thornburgh
c649f29c24 [llvm-nm] Add --line-numbers flag
This parallels the binutils/BSD flag of the same name. Debugging
information is loaded to print line number information for symbols.
Defined symbols are symbolized by their section addresses, and undefined
symbols by their first text reloc with line info.

Differential Revision: https://reviews.llvm.org/D150987
2023-09-19 14:14:27 -07:00
Philip Reames
86b32c4b55
[RISCV] Match strided load via DAG combine (#66800)
This change matches a masked.stride.load from a mgather node whose index
operand is a strided sequence. We can reuse the VID matching from
build_vector lowering for this purpose.

Note that this duplicates the matching done at IR by
RISCVGatherScatterLowering.cpp. Now that we can widen gathers to a wider
SEW, I don't see a good way to remove this duplication. The only obvious
alternative is to move thw widening transform to IR, but that's a no-go
as I want other DAGs to run first. I think we should just live with the
duplication - particularly since the reuse is isSimpleVIDSequence means
the duplication is somewhat minimal.
2023-09-19 14:10:52 -07:00
Johannes Doerfert
98d5ab706e
[OpenMP][Docs][NFC] Update documentation
Removed lots of outdated statements that were misleading.
2023-09-19 22:08:43 +01:00
Guillaume Chatelet
a35a3b75b2
[libc][cmake] Tidy compiler includes (#66783)
We want to activate `llvm-header-guard` (#66477) but the current CMake
configuration includes paths that should be `isystem`. This PR restricts
the number of `-I` passed to the clang command line and correctly marks
the llvm libc include path as `isystem`.
2023-09-19 23:08:29 +02:00
Daniel McIntosh
be8c2df2b1 [libc++][NFC] Clean up std::__call_once
__call_once is large and cluttered with #ifdef preprocessor guards. This
cleans it up a bit by using an exception guard instead of try-catch.

Differential Revision: https://reviews.llvm.org/D112319
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2023-09-19 16:17:20 -04:00
Daniil Dudkin
641124a9b9
[mlir][spirv] Add conversions for Arith's maxnumf and minnumf (#66696)
This patch is part of a larger initiative aimed at fixing floating-point
`max` and `min` operations in MLIR:
https://discourse.llvm.org/t/rfc-fix-floating-point-max-and-min-operations-in-mlir/72671.

In this commit, we add conversion patterns for the newly introduced
operations `arith.minnumf` and `arith.maxnumf`. When converting to
`spirv.CL`, there is no need to insert additional guards to propagate
non-NaN values when one of the arguments is NaN because `CL` ops do
exactly the same. However, `GL` ops have undefined behavior when one of
the arguments is NaN, so we should insert additional guards to enforce
the semantics of Arith's ops.

This patch addresses the 1.5 task of the mentioned RFC.
2023-09-19 22:49:48 +03:00
Vladislav Khmelevsky
80c01dd626 [BOLT][runtime] Test for outline-atomics support
I'm using clang-10 to build bolt which doesn't have moutline-atomics
option and though it doesn't do it. So test compiler for supporting it
before appending to the list of cxxflags.

Differential Revision: https://reviews.llvm.org/D159521
2023-09-19 23:29:05 +04:00
Peter Klausler
682270877d
[flang] Correct handling of assumed-rank allocatables in ALLOCATE (#66718)
Construct entities that are associations from selectors in ASSOCIATE,
CHANGE TEAMS, and SELECT TYPE constructs do not have the ALLOCATABLE or
POINTER attributes, even when associating with allocatables or pointers;
associations from selectors in SELECT RANK constructs do have those
attributes.
2023-09-19 12:27:35 -07:00
Danila Malyutin
01475dc29a
[github] Make branch workflow more robust (#66781)
Avoid false positives by requiring space after `/branch` command so the
action won't trigger on diffs that include filenames like
`.../BranchProbabilityInfo.cpp`.
2023-09-19 22:18:16 +03:00
Alexey Bataev
7db87a66b0 [SLP]Fix PR66795: Check correct deps for vectorized inst with multiple
vectorized node uses.

If the instruction is vectorized in many different vector nodes, it may
break the dependency analysis for gathered nodes with matched scalars.
Need to properly check the dependency between such gather nodes to avoid
cycle dependency.
2023-09-19 12:11:33 -07:00
Zequan Wu
816144bfd2 [Coverage] Skip visiting ctor member initializers with invalid source locations. 2023-09-19 14:59:41 -04:00
Sunho Kim
209c242845 [ORC] Add writePointers to ExecutorProcessControl's MemoryAccess
Add pointer write functionality to MemoryAccess that is needed for implementing redirection manager. It also refactors the code a bit by introducing InProcessMemoryAccess class.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D157378
2023-09-20 03:49:08 +09:00
Slava Zakharin
73086dab9e Revert "Revert "[flang][hlfir] Fixed assignment/finalization order for user-defined assignments. (#66736)""
This reverts commit 775754e328.

Relanding with removing part of the LIT test. There seems to be operations
ordering indeterminism that is unrelated to my change. I will address this
issue separately.
2023-09-19 11:40:58 -07:00
Slava Zakharin
775754e328 Revert "[flang][hlfir] Fixed assignment/finalization order for user-defined assignments. (#66736)"
This reverts commit a9a1f849a9.
2023-09-19 11:31:58 -07:00
Corentin Jabot
a041572353 Let the c(xx)_status pages reflect that clang 17 is released 2023-09-19 20:28:45 +02:00
jimingham
7265f792dc
Fix a bug with cancelling "attach -w" after you have run a process previously (#65822)
The problem is that the when the "attach" command is initiated, the
ExecutionContext for the command has a process - it's the exited one
from the previour run. But the `attach wait` creates a new process for
the attach, and then errors out instead of interrupting when it finds
that its process and the one in the command's ExecutionContext don't
match.

This change checks that if we're returning a target from
GetExecutionContext, we fill the context with it's current process, not
some historical one.
2023-09-19 11:25:53 -07:00
Arthur Eubanks
1a8c69176e [X86] Use RIP-relative addressing for data under large data threshold for medium code model
Since those data are assumed to be within the relocation offset limit.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D150297
2023-09-19 11:14:45 -07:00
Renaud Kauffmann
575a648306
[flang] Follow memory source through more operations (#66713)
Add support for fir.box_addr, fir.array_corr, fir.coordinate, fir.embox,
fir.rebox and fir.load.

1) Through the use of boolean `followBoxAddr` determine whether the
analysis should apply to the address of the box or the address wrapped
by the box.
2) Some asserts have been removed to allow for more SourceKinds though
the flow, in a particular SourceKind::Direct
3) getSource was a public method but the returned type (SourceKind) was
not public making it impossible to be called publicly
4) About 12 tests have been added to check for real Fortran scenarios 
5) More tests will be added with HLFIR
6) A few TODOs have been identified and will need to be addressed in
follow-up patches. I felt that more changes would increase the
complexity of the patch.
2023-09-19 11:10:49 -07:00
kstoimenov
c133fe141f
Addressed review comments to use ThreadSafe instead of !ThreadSafe 2023-09-19 11:05:42 -07:00
Philip Reames
fc95de38d9 [RISCV] Require alignment when forming gather with larger element type
This fixes a bug in my 928564caa5 that didn't get noticed in review.  I found it when looking at the strided load case (upcoming patch), and realized the previous commit was buggy too.

p.s. Sorry for the slightly confusing test diff.  I'd apparently used the wrong mask for the aligned positive test; it was actually unaligned.  Didn't seem worthy of a separate precommit.
2023-09-19 11:00:42 -07:00
Slava Zakharin
a9a1f849a9
[flang][hlfir] Fixed assignment/finalization order for user-defined assignments. (#66736)
This patch places the finalization code for the RHS of a user-defined
assignment after the assignment code. The change only affects
standalone RegionAssignOp operations.
2023-09-19 10:57:40 -07:00