Commit Graph

543579 Commits

Author SHA1 Message Date
3dba44fe54 add more required build stuff
All checks were successful
Build Clang P2996 / build (push) Successful in 44m48s
2025-11-18 03:35:08 +01:00
7f8bc1b339 hopefully smaller binary size
Some checks failed
Build Clang P2996 / build (push) Has been cancelled
2025-11-18 03:33:32 +01:00
4a56d347c9 use clang instead of gcc
All checks were successful
Build Clang P2996 / build (push) Successful in 1h3m0s
2025-11-12 03:06:27 +01:00
9c476b83b2 install cmake as step
Some checks failed
Build Clang P2996 / build (push) Failing after 1h31m17s
2025-11-12 01:32:33 +01:00
901bac62c8 use image with node
Some checks failed
Build Clang P2996 / build (push) Failing after 1m3s
2025-11-12 01:29:13 +01:00
2b7b1e9ed4 add workflow
Some checks failed
Build Clang P2996 / build (push) Failing after 17s
2025-11-12 01:26:32 +01:00
zebullax
4fd4f57ef9 Check against subst failure ouside of imm context (#206)
Signed-off-by: zebullax <zebullax@gmail.com>
2025-11-11 11:24:11 +09:00
zebullax
d34e5cd278 Remove deprecated flags from documentation (#201)
Signed-off-by: zebullax <zebullax@gmail.com>
2025-11-01 09:39:51 +09:00
zebullax
106b53472d Check against function in template_argument_of (#199) 2025-10-31 18:11:27 +09:00
zebullax
08419a75ac Fix is_noexcept for implicit noexcept destructors when marked as default or deleted (#196) 2025-10-30 01:30:51 +09:00
zebullax
9171cf41ef Fix is_public and is_class_member for scoped/unscoped enum (#194)
* Add bubble up for unscoped enum in membership check

Check membership for public check access

Signed-off-by: zebullax <zebullax@gmail.com>

* Fix golden copy for generated headers

Signed-off-by: zebullax <zebullax@gmail.com>

* Skip validation of reflection unittest that introduce non ascii character

Signed-off-by: zebullax <zebullax@gmail.com>

* Check class membership for is_private/protected/public

Signed-off-by: zebullax <zebullax@gmail.com>

---------

Signed-off-by: zebullax <zebullax@gmail.com>
2025-10-22 17:46:23 +09:00
zebullax
63a00eeeed Revert "Merge pull request #191 from bloomberg/dealiasRetTypeOfArg"
This reverts commit 21cba05736, reversing
changes made to c30343bfe5.

Signed-off-by: zebullax <zebullax@gmail.com>
2025-10-15 09:05:49 +09:00
zebullax
21cba05736 Merge pull request #191 from bloomberg/dealiasRetTypeOfArg
Fix "return_type_of doesn't unwrap aliases"
2025-10-14 09:31:40 +09:00
zebullax
c30343bfe5 Merge pull request #190 from bloomberg/zebullax-patch-1
Update tracking status in README documentation
2025-10-13 12:01:02 +09:00
zebullax
de6b834d80 Desugar type passed to return_type_of
Signed-off-by: zebullax <zebullax@gmail.com>
2025-10-11 10:46:07 +09:00
zebullax
d0eae538c7 Update tracking status
Update description to reflect split of define_* into standalone papers

Signed-off-by: zebullax <zebullax@gmail.com>

Update P2996.md
2025-10-11 10:11:11 +09:00
Dan Katz
d77eff1cbd Merge branch 'main' into p2996 2025-07-02 12:14:34 -04:00
Kareem Ergawy
b1774222c7 [flang] Emit fir.global in the global address space (#146653)
Instead of emitting globals in the program/default address space, emit
them in the global address space. This also requires changes how address
of code-gen is handled, we need to cast to the default address space to
prevent code-gen issues.
2025-07-02 17:15:22 +02:00
bd1976bris
3b4e79398d [DTLTO][LLD][ELF] Add support for Integrated Distributed ThinLTO (#142757)
This patch introduces support for Integrated Distributed ThinLTO (DTLTO)
in ELF LLD.

DTLTO enables the distribution of ThinLTO backend compilations via
external distribution systems, such as Incredibuild, during the
traditional link step: https://llvm.org/docs/DTLTO.html.

It is expected that users will invoke DTLTO through the compiler driver
(e.g., Clang) rather than calling LLD directly. A Clang-side interface
for DTLTO will be added in a follow-up patch.

Note: Bitcode members of archives (thin or non-thin) are not currently
supported. This will be addressed in a future change. As a consequence
of this lack of support, this patch is not sufficient to allow for
self-hosting an LLVM build with DTLTO. Theoretically,
--start-lib/--end-lib could be used instead of archives in a self-host
build. However, it's unclear how --start-lib/--end-lib can be easily
used with the LLVM build system.

Testing:
- ELF LLD `lit` test coverage has been added, using a mock distributor
  to avoid requiring Clang.
- Cross-project `lit` tests cover integration with Clang.

For the design discussion of the DTLTO feature, see: #126654.
2025-07-02 16:12:27 +01:00
Michael Buch
e32439249d [lldb][test] Consolidate generic and libcxx std::deque formatter tests (#146697)
The plan is to move all STL formatter API tests into a single directory.

The `std::deque` test is currently the only test that is duplicated
between the `libcxx` and `generic` directories. This patch moves the
libcxx deque tests into `generic` (moving over any functionality that
wasn't tested in the `generic` tests, mainly formatting
pointers/references to `std::deque`).
2025-07-02 16:05:09 +01:00
Henrich Lauko
3cb28e9dee [CIR] Untie Type and Attribute definitions (#146663)
This will allow to use Attributes and Types together in tablegen without inducing cyclic dependency.

This mirrors incubator changes from https://github.com/llvm/clangir/pull/1727
2025-07-02 17:01:59 +02:00
Stephen Tozer
242996efee [Clang][DLCov][NFCish] Fix debugloc coverage tracking macro in Clang (#146521)
In a previous commit, the llvm-config-defined macro
LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING was renamed to
LLVM_ENABLE_DEBUGLOC_TRACKING_COVERAGE. One instance of this in Clang
remains unchanged; this patch renames it, and adds an explicit
llvm-config inclusion to ensure the define doesn't silently get removed.

NFC outside of coverage tracking builds, which we do not currently test.
2025-07-02 15:57:56 +01:00
Juan Manuel Martinez Caamaño
03919ef8d9 [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (#143507)
cl_amd_media_ops/cl_amd_media_ops2 builtins are currently not declared
with -fdeclare-opencl-builtins.

This patch adds support for these builtins.
2025-07-02 16:55:24 +02:00
Paddy McDonald
4db8ce7251 [clang-fuzzer] Fix latent race condition in build (#146119)
Add explicit dependency for gen_vt to the CMakeLists.txt for
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp to prevent race
condition on generation of llvm/CodeGen/GenVT.inc This explicit
dependency was added in other CMakeLists.txt when the tablegen was added
for GenVT.inc file in https://reviews.llvm.org/D148770, but not for
handle-llvm

A similar fix was made in
https://github.com/llvm/llvm-project/pull/109306

rdar://151325382
2025-07-02 07:53:33 -07:00
Henrich Lauko
e288561e6b [CIR] Clean up FPAttr (#146662)
- Adds CIR_ prefix to the definition
- Removes redundant builder and cleans up attribute creations

This mirrors incubator changes from https://github.com/llvm/clangir/pull/1726
2025-07-02 16:52:15 +02:00
Andrei Safronov
3dc09fbf29 [Xtensa] Implement THREADPTR and DFPAccel Xtensa Options. (#145543)
Implment base support of the TLS functionality using Xtensa THREADPTR
Option. Implement basic functionality of the DFPAccel Option(registers
support).
2025-07-02 17:47:07 +03:00
Nikita Popov
2dc44b3a7b [InstCombine] Fix multi-use handling for multi-GEP rewrite (#146689)
If we're expanding offsets for a chain of GEPs in RewriteGEPs mode, we
should also rewrite GEPs that have one-use themselves, but are kept
alive by a multi-use GEP later in the chain.

For the sake of simplicity, I've changed this to just skip the one-use
condition entirely (which will perform an unnecessary rewrite of a no
longer used GEP, but shouldn't otherwise matter).
2025-07-02 16:45:27 +02:00
Jay Foad
ad715beca1 [AMDGPU] Remove HasSampler variable. NFC. (#146682)
Putting the complex condition in a variable does not help readability.
It is simpler to use separate `if`s.
2025-07-02 15:44:32 +01:00
flovent
5a8d096ae3 [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (#127394)
this PR fixes #126424
for `ArraySubScriptExpr`, `hasBase` Matcher will get right operand when
it is not integer type, but is not for sure that left operand is integer
type. For the example code below `hasBase` will get `r` for the
Subsequent matching and causing false positive.
```
template <typename R>
int f(std::map<R*, int>& map, R* r) {
  return map[r];
}
```
so is needed to see if index is integer type to avoid this situation.
2025-07-02 17:41:24 +03:00
Ramkumar Ramachandra
cbfd0d68ea [HashRecognize] Rewrite arePHIsIntertwined (#144878)
The test crc8.le.tc16 is a valid CRC algorithm, but isn't recognized as
such due to a buggy arePHIsIntertwined, which is asymmetric in its
PHINode arguments. There is also a fundamental correctness issue: the
core functionality is to match a XOR that's a recurrence in both PHI
nodes, ignoring casts, but the user of the XOR is never checked. Rewrite
and rename the function.

crc8.le.tc16 is still not recognized as a valid CRC algorithm, due to an
incorrect check for loop iterations exceeding the bitwidth of the
result: in reality, it should not exceed the bitwidth of LHSAux, but we
leave this fix to a follow-up.

Co-authored-by: Piotr Fusik <p.fusik@samsung.com>
2025-07-02 15:36:27 +01:00
Henrich Lauko
8dcdc0ff1f [CIR] Clean up IntAttr (#146661)
- Add common CIR_ prefix
- Simplify printing/parsing
- Make it use IntTypeInterface

This mirrors incubator changes from https://github.com/llvm/clangir/pull/1725
2025-07-02 16:36:09 +02:00
Ayokunle Amodu
38ad6b1983 [mlir][Affine] Fix crash in affine-loop-fusion pass by guarding against an empty op list (#144841)
Related: #139231

This patch fixes a crash in the affine-loop-fusion pass when
`getInnermostCommonLoop` is called with an empty list of operations.

The function expects at least one op to analyze, and passing an empty
array of ops causes an assertion failure. This change ensures the pass
checks for an empty op array before calling `getInnermostCommonLoop`.

@bondhugula @matthias-springer
2025-07-02 16:31:49 +02:00
Henrich Lauko
5491576a16 [CIR] Introduce IntTypeInterface to allow uniform integer types handling (#146660)
This will in future allow to use builtin integer types within cir operations

This mirrors incubat changes from https://github.com/llvm/clangir/pull/1724
2025-07-02 16:29:03 +02:00
Joseph Huber
24828c8c45 [libc] Efficiently implement aligned_alloc for AMDGPU (#146585)
Summary:
This patch uses the actual allocator interface to implement
`aligned_alloc`. We do this by simply rounding up the amount allocated.
Because of how index calculation works, any offset within an allocated
pointer will still map to the same chunk, so we can just adjust
internally and it will free all the same.
2025-07-02 09:25:57 -05:00
Fabian Mora
bca79ec0d2 [mlir][linalg] Use ub.poison in linalg vectorizer instead of 0 for some transfer ops (#146544)
This patch is a follow up to https://github.com/llvm/llvm-project/pull/146088 and changes the padding value in the linalg vectorizer from `0` to `ub.poison` in `vector.transfer_read`s created for extracting slices or when vectorizing a generic.

Signed-off-by: Fabian Mora <fabian.mora-cordero@amd.com>
2025-07-02 10:10:03 -04:00
Kai Nacke
ebcf7f91ff [SystemZ][HLASM] Emit END instruction (#146110)
A HLASM source file must end with the END instruction. It is implemented
by adding a new function to the target streamer. This change also turns
SystemZHLASMSAsmString.h into a proper header file, and only uses the
SystemZTargetHLASMStreamer when HLASM output is generated.
2025-07-02 10:08:25 -04:00
woruyu
bbcebec3af [DAG] Refactor X86 combineVSelectWithAllOnesOrZeros fold into a generic DAG Combine (#145298)
This PR resolves https://github.com/llvm/llvm-project/issues/144513

The modification include five pattern :
1.vselect Cond, 0, 0 → 0
2.vselect Cond, -1, 0 → bitcast Cond
3.vselect Cond, -1, x → or Cond, x
4.vselect Cond, x, 0 → and Cond, x
5.vselect Cond, 000..., X -> andn Cond, X

1-4 have been migrated to DAGCombine. 5 still in x86 code.

The reason is that you cannot use the andn instruction directly in
DAGCombine, you can only use and+xor, which will introduce optimization
order issues. For example, in the x86 backend, select Cond, 0, x →
(~Cond) & x, the backend will first check whether the cond node of
(~Cond) is a setcc node. If so, it will modify the comparison operator
of the condition.So the x86 backend cannot complete the optimization of
andn.In short, I think it is a better choice to keep the pattern of
vselect Cond, 000..., X instead of and+xor in combineDAG.

For commit, the first is code changes and x86 test(note 1), the second
is tests in other backend(node 2).

---------

Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
2025-07-02 15:07:48 +01:00
Eric
d78036f06e Only restart failed libc++ jobs, not cancelled ones. (#146397)
Despite the error message for preempted jobs containing the words
"cancelled", these are considered workflow "failures" by github.

This is important, because if we fail to distinguish between "failed"
and "cancelled" jobs, the restarter will fight to restart jobs a user
intentionally cancelled (either by pressing the "cancel" button, or by
pushing an update to a PR).

This reverts commit 3ea7fc7339. This also
reverts earlier attempts to solve this problem by matching the messages
to detect manual cancellations.

This change also removes ldionne's test workflow, as its hard to
correctly keep in sync.

This change does not attempt to address the maintainability or
testability of this script, which continues to be an issue. If asked to
address these issues, my plan is to write the script in python (which
most people are more familar with), and turn this action into a "docker
action" using a container with the python action and dependencies built
into it. Let me know if that's a direction we're interested in heading.
2025-07-02 10:04:37 -04:00
David Spickett
8b3cc4d1ed [llvm][docs] Remove LLDB DWARF64 release note
As a precaution until the issues reported (by me)
in https://github.com/llvm/llvm-project/issues/135208
are investigated.
2025-07-02 14:02:57 +00:00
Abhina Sree
a9ee1797b7 Remove helper function and use target agnostic needConversion function (#146680)
This patch adds back the needed AutoConvert.h header and removes the
unneeded include guard of MVS to prevent this header from being removed
in the future
2025-07-02 10:02:46 -04:00
Michael Buch
fc00256b2b [lldb][test][NFC] Rename libcxx unordered_map tests to unordered_map-iterator
The actual `unordered_map` tests live in
`data-formatter-stl/generic/unordered`. The tests here are only testing
`std::unordered_map::iterator`. This patch renames the directory
accordingly. This is in preparation for moving all of the STL tests into
the `generic` directory.
2025-07-02 14:36:41 +01:00
Jay Foad
2b03efc7fb [AMDGPU] Use isImage. NFC. (#146677) 2025-07-02 14:18:42 +01:00
Matt Arsenault
dbe441e716 X86: Avoid some uses of getPointerTy (#146306)
In most contexts the pointer type is implied by the operation
and should be propagated; getPointerTy is for niche cases where
there is a synthesized value.
2025-07-02 22:14:16 +09:00
Ross Brunton
4f02965ae2 [Offload] Store kernel name in GenericKernelTy (#142799)
GenericKernelTy has a pointer to the name that was used to create it.
However, the name passed in as an argument may not outlive the kernel.
Instead, GenericKernelTy now contains a std::string, and copies the
name into there.
2025-07-02 14:11:05 +01:00
Alexandre Ganea
e63de82d90 [LLD][COFF] Disallow importing DllMain from import libraries (#146610)
This is a workaround for
https://github.com/llvm/llvm-project/issues/82050 by skipping the `DllMain` symbol if seen in aimport library. If this situation occurs, after this commit a warning will also be displayed. The warning can be silenced with `/ignore:exporteddllmain`
2025-07-02 08:53:18 -04:00
Callum Fare
acb52a8a98 [Offload] Improve liboffload documentation (#142403)
- Update the main README to reflect the current project status
- Rework the main API generation documentation. General fixes/tidying,
but also spell out explicitly how to make API changes at the top of the
document since this is what most people will care about.

---------

Co-authored-by: Martin Grant <martingrant@outlook.com>
2025-07-02 13:52:27 +01:00
Steven Perron
4e213159af [SPIRV] Add FloatControl2 capability (#144371)
Add handling for FPFastMathMode in SPIR-V shaders. This is a first pass
that
simply does a direct translation when the proper extension is available.
This will unblock work for HLSL. However, it is not a full solution.

The default math mode for spir-v is determined by the API. When
targeting Vulkan many of the fast math options are assumed. We should do
something particular when targeting Vulkan.

We will also need to handle the hlsl "precise" keyword correctly when
FPFastMathMode is not available.

Unblockes https://github.com/llvm/llvm-project/issues/140739, but we are
keeing it open to track the remaining issues mentioned above.
2025-07-02 08:48:57 -04:00
jyli0116
9c0743fbc5 [GlobalISel] Allow expansion of urem by constant in prelegalizer (#145914)
This patch allows urem by a constant to be expanded more efficiently to
avoid the need for expensive udiv instructions. This is part of the
resolution to issue #118090
2025-07-02 13:46:36 +01:00
Kunqiu Chen
0aafeb8ba1 Reland [TSan] Clarify and enforce shadow end alignment (#146676)
#144648 was reverted because it failed the new sanitizer test
`munmap_clear_shadow.c` in IOS's CI.
That issue could be fixed by disabling the test on some platforms, due
to the incompatibility of the test on these platforms.

In detail, we should disable the test in FreeBSD, Apple, NetBSD,
Solaris, and Haiku, where `ReleaseMemoryPagesToOS` executes
`madvise(beg, end, MADV_FREE)`, which tags the relevant pages as 'FREE'
and does not release them immediately.
2025-07-02 20:28:30 +08:00
Shilei Tian
c0e9084b1c [AMDGPU] Add a debug option -amdgpu-snop-padding for GCNHazardRecognizer (#146587)
This can help to identify if there is potential hazards.

Co-authored-by: Byrnes, Jeffrey <Jeffrey.Byrnes@amd.com>
2025-07-02 08:16:38 -04:00