536080 Commits

Author SHA1 Message Date
Aiden Grossman
32adf2c360
[Github][CI] Rename New Premerge Jobs (#138024)
This patch renames the new premerge job as suggested in
https://discourse.llvm.org/t/github-ci-notifications-and-main-branch/85868/10.
This uses more industry standard terms (like CI vs premerge checks which
might be somewhat of a LLVM CI idiom?) and makes it more generic if we
end up doing postcommit testing through Github.
2025-05-01 23:22:05 -07:00
Vlad Serebrennikov
630a0ff2c2 [clang][NFC] Convert Sema::TrivialABIHandling to scoped enum 2025-05-02 09:12:52 +03:00
Jonathan Thackray
6f39995da2
[mlir] Ensure fmaximum/fminimum is defined in mlir/Dialect/LLVMIR/LLVMEnums.td (#138198)
Fix a compile error (with LLVM_ENABLE_WERROR=On) when building
`bin/flang`:
```
   enumeration values 'FMaximum' and 'FMinimum' not handled in switch
```
caused by adding new LLVM IR instructions in #137701.

This wasn't picked up by the auto CI builders on GitHub, so I hadn't
realised until @kazutakahirata notified me about it.
2025-05-02 07:02:43 +01:00
Justin Bogner
ae34440834
[DirectX] Make DXILOpLowering responsible for cleaning up dead intrinsics (#138199)
This moves the responsibility for cleaning up dead intrinsics from
DXILFinalizeLinkage to DXILOpLowering, and moves DXILFinalizeLinkage
back to it's pre-#136244 place in the pipeline. Doing this avoids issues
with DXIL passes running on obviously dead code, and makes it more clear
what DXILFinalizeLinkage is really doing.

This also helps with the story for #134260, as cleaning up dead
intrinsics doesn't make sense if this becomes a more generic pass.

Note that test/CodeGen/DirectX/remove-dead-intriniscs.ll already covers
most of the testing here. It'd be nice to have something that catches
the regression from changing the pass ordering but I couldn't come up
with anything that wouldn't be incredibly fragile.

Fixes #138180.
2025-05-01 22:07:07 -07:00
Kelvin Li
8f06f5dca0
[flang] update LIT test for AIX (NFC) (#138228) 2025-05-02 01:01:30 -04:00
Urvi Rav
35e743d4bf
default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (#128640)
This PR replaces the `default` clause with the `otherwise` clause for
the `metadirective` in OpenMP. The `otherwise` clause serves as a
fallback condition when no directive from the when clauses is selected.
In the `when` clause, context selectors define traits evaluated to
determine the directive to be applied.
The previous merge was reverted due to a failing test case, which has
now been resolved.

---------

Co-authored-by: urvi-rav <urvi.rav@hpe.com>
2025-05-02 10:29:57 +05:30
Vlad Serebrennikov
7e71db8463 [clang][NFC] Convert Sema::AvailabilityMergeKind to scoped enum 2025-05-02 07:56:57 +03:00
Vlad Serebrennikov
ed673aac7a [clang][NFC] Convert Sema::OffsetOfKind to scoped enum 2025-05-02 07:49:47 +03:00
Vlad Serebrennikov
8089c3d1ed [clang][NFC] Convert Sema::NonTagKind to scoped enum 2025-05-02 07:45:22 +03:00
Vlad Serebrennikov
09fb9adbd2 [clang][NFC] Convert Sema::NonTrivialCUnionContext to scoped enum 2025-05-02 07:39:54 +03:00
Vlad Serebrennikov
68fd69aca6 [clang][NFC] Convert Sema::PointerAuthDiscArgKind to scoped enum 2025-05-02 07:33:52 +03:00
Jannick Kremer
ade1203337
[libclang/python] Add tests for equality operators. (#138132)
Adds tests for SourceRange, SourceLocation and Cursor.
This is a follow-up to #138074
2025-05-02 06:24:18 +02:00
Snehasish Kumar
099a0fa3f2
[MemProf] Add v4 which contains CalleeGuids to CallSiteInfo. (#137394)
This patch adds CalleeGuids to the serialized format and increments the version number to 4. The unit tests are updated to include a new test for v4 and the YAML format is also updated to be able to roundtrip the v4 format.
2025-05-01 20:17:21 -07:00
Eugene Epshteyn
36541ec3ca
[flang] Fix #else with trailing text (#138045)
Fixed the issue, where the extra text on #else line (' Z' in the example
below) caused the data from the "else" clause to be processed together
with the data of "then" clause.
```
#ifndef XYZ42 
      PARAMETER(A=2)
#else Z
      PARAMETER(A=3)
#endif
      end
```
2025-05-01 23:07:52 -04:00
Jim Lin
f46ff4c204 [NFC][regalloc] Fix typo in llvm/lib/CodeGen/AllocationOrder.h. 2025-05-02 10:11:34 +08:00
Sirui Mu
44c4b4cef9
[CIR] Upstream cir.call with scalar arguments (#136810)
This PR upstreams support for scalar arguments in `cir.call` operation.

Related to #132487 .
2025-05-02 10:04:48 +08:00
Felipe de Azevedo Piovezan
2cae14fdc6 Revert "[lldb] Change synthetic symbol names to have file address (#137512)"
This reverts commit b69957fa642635f769c3aa33a539f74497df0b4d.
2025-05-01 18:27:34 -07:00
Jannick Kremer
feda31e048
[libclang/python] Remove compatibility workaround for briefComment (#138135)
Remove a workaround that made cindex.py from LLVM 3.2 work with older
libclang.so versions
2025-05-02 03:23:04 +02:00
Valentin Clement (バレンタイン クレメン)
9b6b144438
Revert "[flang][cuda] Use a reference for asyncObject" (#138221)
Reverts llvm/llvm-project#138186
2025-05-01 17:41:44 -07:00
Valentin Clement (バレンタイン クレメン)
7f922f1400
[flang][cuda] Use a reference for asyncObject (#138186)
Switch from `int64_t` to `int64_t*` to fit with the rest of the
implementation.

New tentative with some fix. The previous was reverted yesterday.
2025-05-01 17:04:12 -07:00
Peter Collingbourne
4b1f1f77b0 ELF: Fix man page formatting. 2025-05-01 16:50:37 -07:00
Luke Lau
aa6d541065
[InstSimplify] Fold {u,s}{min,max} x, poison -> poison (#138166)
Following from the discussion in
https://github.com/llvm/llvm-project/pull/138095#discussion_r2070484664,
these intrinsics are poison if any of their operands are poison, and are
marked as such in propagatesPoison in ValueTracking.cpp.

This will help fold away leftover vectors produced by VectorCombine when
scalarizing intrinsics.
2025-05-02 07:49:27 +08:00
jimingham
471fe9c689
Fix TestEvents.py after: 4fdb8cb (#138211)
I changed the option name from at-first-stop (-F) to at-initial-stop
(-I) but missed one place in the testsuite.
2025-05-01 16:01:50 -07:00
James Newling
1a44f38d2a
[mlir][vector] Canonicalize/fold 'order preserving' transposes (#135841)
Handles special case where transpose doesn't permute any non-1
dimensions (and so is effectively a shape_cast) and is adjacent to a
shape_cast that it can fold into. For example

```
%1 = vector.transpose %0, [1, 0, 3, 2] : vector<4x1x1x6xf32> to vector<1x4x6x1xf32>
```

can be folded into an adjacent shape_cast. An alternative to this PR
would be to canonicalize such transposes to shape_casts directly, but I
think it'll be difficult getting consensus that shape_cast is 'more
canonical' than transpose, so this PR compromises with the less
opinionated claim that

1) shape_cast is more canonical than shape_cast(transpose)
2) shape_cast is more canonical than transpose(shape_cast)

The pattern `ConvertIllegalShapeCastOpsToTransposes` that is specific to
transposes with scalable dimensions reverses the canonicalization added
here, so I've I've disabled this canonicalization for scalable vectors
2025-05-01 15:50:55 -07:00
James Newling
ed8d4fe0b1
[mlir][vector] Separate bitwidth specific tests out (#138071)
In https://github.com/llvm/llvm-project/pull/136581 the logic pertaining
to bitwidth was removed from the patterns. This PR further factorizes
bitwidth logic out of the main test file.

The number of tests with bitwidth (in the new file added in this PR) is
now lower than before this PR. This is because this PR only tests the
bitwidth specific logic once (there was a fair amount of redundant
testing before).

I didn't do this test refactoring in
https://github.com/llvm/llvm-project/pull/136581 because I wanted to
make it clear that it was NFC by leaving the tests unchanged there
2025-05-01 15:50:06 -07:00
Prabhu Rajasekaran
1b1e360b76
[NFC][clang] No sharedlibs for UEFI (#137872)
There is no support for shared libraries for UEFI target. Remove the
incorrect -dll flag set from UEFI toolchain.
2025-05-01 15:49:32 -07:00
Ely Ronnen
b69957fa64
[lldb] Change synthetic symbol names to have file address (#137512)
Changes the default synthetic symbol names to contain their file address
2025-05-01 15:32:34 -07:00
Jorge Gorbe Moya
cd6a614ef5 [bazel] Add missing dep after a073bb5afdb8715429d98ea80ecdef1390fb4962 2025-05-01 15:16:38 -07:00
Maksim Panchenko
7d6fda4fd3
[BOLT] Run PatchEntries pass before LongJmp (#137236)
With --force-patch option, every original function entry point is
overwritten with a trampoline to a new version of the function to
prevent the execution of the original code.

If the function size is too small for the trampoline code, we are forced
to bail out on rewriting the function. That presented a problem on
AArch64 due to LongJmp pass that assumed the presence of the new copy of
the function. If the new copy was not emitted it could have lead to a
relocation overflow.

Run PatchEntries pass before LongJmp and make the latter aware of the
functions that are not going to be emitted. Make --force-patch option
behavior on AArch64 consistent with other architectures.
2025-05-01 15:09:09 -07:00
Jorge Gorbe Moya
472c211f58 [bazel] Add deps missing from 0009a1783490a8ff69251a0ec7df1891a427cfb0 to //mlir:AllExtensions 2025-05-01 15:07:43 -07:00
Andy Kaylor
a76936f1c0
[CIR] Upstream support for range-based for loops (#138176)
This upstreams the code needed to handle CXXForRangeStmt.
2025-05-01 14:47:20 -07:00
Erich Keane
4efcc52ed8
[OpenACC][CIR] Implement Loop lowering of seq/auto/independent (#138164)
These just add a standard 'device_type' flag to the acc.loop, so
implement that lowering. This also modifies the dialect to add helpers
for these as well, to be consistent with the previous ones.
2025-05-01 14:30:11 -07:00
Justin Cai
faf4e8af74
[Clang][SYCL] Add initial set of Intel OffloadArch values (#138158)
Following #137070, this PR adds an initial set of Intel `OffloadArch`
values with corresponding predicates that will be used in SYCL
offloading. More Intel architectures will be added in a future PR.
2025-05-01 16:29:48 -05:00
Alexey Bataev
9400270449 [SLP]Fix comparator for vector operands of extractelements in PHICompare
Need to make comparator to follow strict-weak ordering to fix compiler
crashes.

Fixes #138178
2025-05-01 14:28:20 -07:00
Nishant Patel
3a492abf05
[mlir][vector] Add linearization pattern for vector.splat (#137651)
This PR is a breakdown [2 / 4] of the PR #136193 
The PR adds linearization patterns for vector.splat.
2025-05-01 14:26:26 -07:00
Yingwei Zheng
c37b2549ff
Revert "[InstSimplify] Fold getelementptr inbounds null, idx -> null (#130742)" (#138168)
Revert #130742 for now to avoid breaking glibc failures until the
workaround patches are landed.
2025-05-01 14:21:59 -07:00
Susan Tan (ス-ザン タン)
a073bb5afd
[mlir][acc] Add LegalizeDataValues support for DeclareEnterOp (#138008)
The patch extends the existing LegalizeDataValues to support
DeclareEnter and DeclareExit pair.
Since unlike other ops, DeclareEnter and DeclareExit don't have a region
defined, we use dominance/post dominance information to ensure only the
uses within the region dominated by DeclareEnter and post dominated by
DeclareExit are updated with data on device.
2025-05-01 13:46:34 -07:00
jimingham
4fdb8cb42f
Make stop-hooks fire when lldb first gains control of a process. (#137410)
stop-hooks are supposed to trigger every time the process stops, but as
initially implemented they would only fire when control was returned to
the user. So for instance when a process was launched the stop hook
would only trigger when the process hit a breakpoint or crashed.

However, it would be really useful to be able to trigger a stop hook
when lldb first gains control over the process. One way to do that would
be to implement general "target lifecycle events" and then send process
created events that users could bind actions to.

OTOH, extending the stop hooks to fire when lldb first gains control
over the process is a pretty natural extension to the notion of a stop
hook. So this patch takes the shorter route to that ability by making
stop-hooks fire when lldb first gains control over the process.

I also added the ability to specify whether to trigger the stop hook "on
gaining control". I'm on the fence about whether to set the default to
be "trigger on gaining control" or "don't trigger on gaining control".
Since I think it's a generally useful feature, I've set the default to
"trigger on gaining control".
2025-05-01 13:46:19 -07:00
Andre Kuhlenschmidt
42f5d716cb
[flang][frontend] warn when a volatile target is pointer associated with an non-volatile pointer (#136778)
closes #135805
2025-05-01 13:45:13 -07:00
Florian Hahn
8d02529f77
[VPlan] Consistently use ArrayRef<VPValue *> for operands in ctors (NFC) (#137798)
Now that there is an ArrayRef constructor taking iterator_ranges, use it
consistently to slightly simplify code.

Depends on https://github.com/llvm/llvm-project/pull/137796.

PR: https://github.com/llvm/llvm-project/pull/137798
2025-05-01 21:19:10 +01:00
Kazu Hirata
b2e2ae8702 [mlir] Fix warnings
This patch fixes:

  mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp:901:12:
  error: variable 'origVecType' set but not used
  [-Werror,-Wunused-but-set-variable]

  mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp:908:12:
  error: variable 'origTensorDescTy' set but not used
  [-Werror,-Wunused-but-set-variable]
2025-05-01 12:41:31 -07:00
Alex MacLean
978df3b9f1
[NVPTX][test] Fixup to get ptxas passing for byval-const-global.ll (#138175) 2025-05-01 12:38:39 -07:00
Kazu Hirata
441b68370a [mlir] Fix a warning
This patch fixes:

  mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp:586:14: error:
  variable 'realParam' set but not used
  [-Werror,-Wunused-but-set-variable]
2025-05-01 12:34:55 -07:00
Kazu Hirata
2bff80f25d [lldb] Fix a warning
This patch fixes:

  lldb/source/Target/Memory.cpp:438:3: error: 'lock_guard' may not
  intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]
2025-05-01 12:27:08 -07:00
Jay Foad
c2bec64833
[AMDGPU] Simplify GCNTTIImpl::isValidAddrSpaceCast. NFCI. (#137986)
This just removes some code that references specific address spaces.
2025-05-01 20:18:48 +01:00
Shafik Yaghmour
d7f98a4ef9
[Clang][NFC] Use std::move to avoid copy (#138073)
Static analysis flagged this code for using copy when we could use
std::move.

Worth noting that CD.Message is a StringRef but Conflict.Message is
std::string. Otherwise I would have used a temporary in place and avoid
a local variable.
2025-05-01 12:06:49 -07:00
Joseph Huber
a60984ec8d
[Offload] Add 'Maintainers.md' file for offload (#138177)
Summary:
The offload project lacks a maintainers file. Adding it with myself and
Johannes as the still active maintainers.
2025-05-01 14:06:33 -05:00
Ahmed Bougacha
1f56afa9b4 [InlineSpiller] Fix missing LiveRegMatrix declaration. NFC.
b25b51eb639d adds a reference to LiveRegMatrix in Spiller.h without
including the header, or adding a declaration.  That breaks modules
builds.

It looks like it might get reverted in #137801, but let's fix the
breakage in the meantime.
2025-05-01 11:40:07 -07:00
Krzysztof Parzyszek
760bba4666
[flang][OpenMP] Allow UPDATE clause to not have any arguments (#137521)
The UPDATE clause can be specified on both ATOMIC and DEPOBJ directives.
Currently, the ATOMIC directive has its own handling of it, and the
definition of the UPDATE clause only supports its use in the DEPOBJ
directive, where it takes a dependence-type as an argument.

The UPDATE clause on the ATOMIC directive may not have any arguments.
Since the implementation of the ATOMIC construct will be modified to use
the standard handling of clauses, the definition of UPDATE should
reflect that.
2025-05-01 13:30:45 -05:00
Shilei Tian
cf9d4048fb Reapply "[NFC][AMDGPU] Correct the check line update script for llvm/test/CodeGen/AMDGPU/attributor-flatscratchinit-undefined-behavior.ll"
This reverts commit 74f55c744a18b848cc780c42f0e3dde7e7c96195 with a fix for the
check lines.
2025-05-01 14:13:23 -04:00