Skip to content

Commit c946b08

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project into resource-array-impl-binding-attr
2 parents b596824 + 41b5880 commit c946b08

File tree

327 files changed

+13116
-5699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+13116
-5699
lines changed

.ci/monolithic-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runtime_targets="${4}"
2929
runtime_targets_needs_reconfig="${5}"
3030
enable_cir="${6}"
3131

32-
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
32+
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct"
3333

3434
start-group "CMake"
3535
export PIP_BREAK_SYSTEM_PACKAGES=1

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
3939
-D LLVM_ENABLE_ASSERTIONS=ON \
4040
-D LLVM_BUILD_EXAMPLES=ON \
4141
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
42-
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests" \
42+
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \
4343
-D COMPILER_RT_BUILD_ORC=OFF \
4444
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
4545
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,6 @@ a3a007ad5fa20abc90ead4e1030b481bf109b4cf
143143
b7e332d3f59f567b1999fbcc660d7837cba8e406
144144
6056f942abe83b05406df8b04e95ec37a3d160b5
145145
906295b8a31c8dac5aa845864c0bca9f02f86184
146+
147+
# [mlir][tensor][linalg] Move Pack/UnPack Ops to Linalg
148+
517800e37e8d3a4ee84214bef65e227612c2a98b
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: MLIR SPIR-V Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
paths:
10+
- 'mlir/include/mlir/Dialect/SPIRV/**'
11+
- 'mlir/lib/Dialect/SPIRV/**'
12+
- 'mlir/include/mlir/Target/SPIRV/**'
13+
- 'mlir/lib/Target/SPIRV/**'
14+
- 'mlir/test/Target/SPIRV/**'
15+
- '.github/workflows/mlir-spirv-tests.yml'
16+
17+
concurrency:
18+
# Skip intermediate builds: always.
19+
# Cancel intermediate builds: only if it is a pull request build.
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
22+
23+
jobs:
24+
check_spirv:
25+
if: github.repository_owner == 'llvm'
26+
name: Test MLIR SPIR-V
27+
uses: ./.github/workflows/llvm-project-tests.yml
28+
with:
29+
build_target: check-mlir
30+
projects: mlir
31+
extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="host" -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON'
32+
os_list: '["ubuntu-24.04"]'

bolt/unittests/Core/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ add_bolt_unittest(CoreTests
1111
MemoryMaps.cpp
1212
DynoStats.cpp
1313

14+
# FIXME CoreTests uses `llvm::detail::TakeError(llvm::Error)`, but linking
15+
# to LLVMTestingSupport introduces a transitive dependency on the
16+
# dynamic LLVM library when LLVM_LINK_LLVM_DYLIB is ON.
17+
${LLVM_MAIN_SRC_DIR}/lib/Testing/Support/Error.cpp
18+
1419
DISABLE_LLVM_LINK_LLVM_DYLIB
1520
)
1621

@@ -20,7 +25,6 @@ target_link_libraries(CoreTests
2025
LLVMBOLTRewrite
2126
LLVMBOLTProfile
2227
LLVMBOLTUtils
23-
LLVMTestingSupport
2428
)
2529

2630
foreach (tgt ${BOLT_TARGETS_TO_BUILD})

bolt/unittests/Profile/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ target_link_libraries(ProfileTests
1616
LLVMBOLTCore
1717
LLVMBOLTProfile
1818
LLVMTargetParser
19-
LLVMTestingSupport
2019
)
2120

2221
foreach (tgt ${BOLT_TARGETS_TO_BUILD})
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
//===--- ABIVersions.def - Clang ABI Versions Database ----------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file enumerates Clang ABI versions.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
//
13+
/// @file ABIVersions.def
14+
///
15+
/// In this file, each of the Clang ABI Versions is enumerated
16+
/// ABI_VER_MAJOR_MINOR, ABI_VER_MAJOR, or ABI_VER_LATEST macro.
17+
///
18+
/// ABI_VER_MAJOR is used when the minor version is 0 or can be omitted.
19+
///
20+
/// The first argument of ABI_VER_MAJOR_MINOR and ABI_VER_MAJOR is the major
21+
/// version.
22+
///
23+
/// The second argument of ABI_VER_MAJOR_MINOR is the minor version.
24+
///
25+
/// The first argument of ABI_VER_LATEST is an identifier `Latest`.
26+
27+
#if defined(ABI_VER_MAJOR_MINOR) != defined(ABI_VER_MAJOR) || \
28+
defined(ABI_VER_MAJOR) != defined(ABI_VER_LATEST)
29+
# error ABI_VER_MAJOR_MINOR, ABI_VER_MAJOR and ABI_VER_LATEST should be defined simultaneously
30+
#endif
31+
32+
#ifndef ABI_VER_MAJOR_MINOR
33+
# define ABI_VER_MAJOR_MINOR(Major, Minor)
34+
#endif
35+
36+
#ifndef ABI_VER_MAJOR
37+
# define ABI_VER_MAJOR(Major)
38+
#endif
39+
40+
#ifndef ABI_VER_LATEST
41+
# define ABI_VER_LATEST(Latest)
42+
#endif
43+
44+
/// Attempt to be ABI-compatible with code generated by Clang 3.8.x
45+
/// (SVN r257626). This causes <1 x long long> to be passed in an integer
46+
/// register instead of an SSE register on x64_64.
47+
ABI_VER_MAJOR_MINOR(3, 8)
48+
49+
/// Attempt to be ABI-compatible with code generated by Clang 4.0.x
50+
/// (SVN r291814). This causes move operations to be ignored when determining
51+
/// whether a class type can be passed or returned directly.
52+
ABI_VER_MAJOR(4)
53+
54+
/// Attempt to be ABI-compatible with code generated by Clang 6.0.x
55+
/// (SVN r321711). This causes determination of whether a type is
56+
/// standard-layout to ignore collisions between empty base classes and between
57+
/// base classes and member subobjects, which affects whether we reuse base
58+
/// class tail padding in some ABIs.
59+
ABI_VER_MAJOR(6)
60+
61+
/// Attempt to be ABI-compatible with code generated by Clang 7.0.x
62+
/// (SVN r338536). This causes alignof (C++) and _Alignof (C11) to be compatible
63+
/// with __alignof (i.e., return the preferred alignment) rather than returning
64+
/// the required alignment.
65+
ABI_VER_MAJOR(7)
66+
67+
/// Attempt to be ABI-compatible with code generated by Clang 9.0.x
68+
/// (SVN r351319). This causes vectors of __int128 to be passed in memory
69+
/// instead of passing in multiple scalar registers on x86_64 on Linux and
70+
/// NetBSD.
71+
ABI_VER_MAJOR(9)
72+
73+
/// Attempt to be ABI-compatible with code generated by Clang 11.0.x
74+
/// (git 2e10b7a39b93). This causes clang to pass unions with a 256-bit vector
75+
/// member on the stack instead of using registers, to not properly mangle
76+
/// substitutions for template names in some cases, and to mangle declaration
77+
/// template arguments without a cast to the parameter type even when that can
78+
/// lead to mangling collisions.
79+
ABI_VER_MAJOR(11)
80+
81+
/// Attempt to be ABI-compatible with code generated by Clang 12.0.x
82+
/// (git 8e464dd76bef). This causes clang to mangle lambdas within global-scope
83+
/// inline variables incorrectly.
84+
ABI_VER_MAJOR(12)
85+
86+
/// Attempt to be ABI-compatible with code generated by Clang 14.0.x.
87+
/// This causes clang to:
88+
/// - mangle dependent nested names incorrectly.
89+
/// - make trivial only those defaulted copy constructors with a
90+
/// parameter-type-list equivalent to the parameter-type-list of an implicit
91+
/// declaration.
92+
ABI_VER_MAJOR(14)
93+
94+
/// Attempt to be ABI-compatible with code generated by Clang 15.0.x.
95+
/// This causes clang to:
96+
/// - Reverse the implementation for CWG692, CWG1395 and CWG1432.
97+
/// - pack non-POD members of packed structs.
98+
/// - consider classes with defaulted special member functions non-pod.
99+
ABI_VER_MAJOR(15)
100+
101+
/// Attempt to be ABI-compatible with code generated by Clang 17.0.x.
102+
/// This causes clang to revert some fixes to its implementation of the Itanium
103+
/// name mangling scheme, with the consequence that overloaded function
104+
/// templates are mangled the same if they differ only by:
105+
/// - constraints
106+
/// - whether a non-type template parameter has a deduced type
107+
/// - the parameter list of a template template parameter
108+
ABI_VER_MAJOR(17)
109+
110+
/// Attempt to be ABI-compatible with code generated by Clang 18.0.x.
111+
/// This causes clang to revert some fixes to the mangling of lambdas in the
112+
/// initializers of members of local classes.
113+
ABI_VER_MAJOR(18)
114+
115+
/// Attempt to be ABI-compatible with code generated by Clang 19.0.x.
116+
/// This causes clang to:
117+
/// - Incorrectly mangle the 'base type' substitutions of the CXX construction
118+
/// vtable because it hasn't added 'type' as a substitution.
119+
/// - Skip mangling enclosing class templates of member-like friend function
120+
/// templates.
121+
/// - Ignore empty struct arguments in C++ mode for ARM, instead of passing
122+
/// them as if they had a size of 1 byte.
123+
ABI_VER_MAJOR(19)
124+
125+
/// Attempt to be ABI-compatible with code generated by Clang 20.0.x.
126+
/// This causes clang to:
127+
/// - Incorrectly return C++ records in AVX registers on x86_64.
128+
ABI_VER_MAJOR(20)
129+
130+
/// Conform to the underlying platform's C and C++ ABIs as closely as we can.
131+
ABI_VER_LATEST(Latest)
132+
133+
#undef ABI_VER_MAJOR_MINOR
134+
#undef ABI_VER_MAJOR
135+
#undef ABI_VER_LATEST

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13234,9 +13234,9 @@ def err_wasm_builtin_arg_must_match_table_element_type : Error <
1323413234
"%ordinal0 argument must match the element type of the WebAssembly table in the %ordinal1 argument">;
1323513235
def err_wasm_builtin_arg_must_be_integer_type : Error <
1323613236
"%ordinal0 argument must be an integer">;
13237-
def err_wasm_builtin_test_fp_sig_cannot_include_reference_type
13238-
: Error<"not supported for "
13239-
"function pointers with a reference type %select{return "
13237+
def err_wasm_builtin_test_fp_sig_cannot_include_struct_or_union
13238+
: Error<"not supported with the multivalue ABI for "
13239+
"function pointers with a struct/union as %select{return "
1324013240
"value|parameter}0">;
1324113241

1324213242
// OpenACC diagnostics.

clang/include/clang/Basic/LangOptions.h

Lines changed: 4 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -186,95 +186,10 @@ class LangOptionsBase {
186186

187187
/// Clang versions with different platform ABI conformance.
188188
enum class ClangABI {
189-
/// Attempt to be ABI-compatible with code generated by Clang 3.8.x
190-
/// (SVN r257626). This causes <1 x long long> to be passed in an
191-
/// integer register instead of an SSE register on x64_64.
192-
Ver3_8,
193-
194-
/// Attempt to be ABI-compatible with code generated by Clang 4.0.x
195-
/// (SVN r291814). This causes move operations to be ignored when
196-
/// determining whether a class type can be passed or returned directly.
197-
Ver4,
198-
199-
/// Attempt to be ABI-compatible with code generated by Clang 6.0.x
200-
/// (SVN r321711). This causes determination of whether a type is
201-
/// standard-layout to ignore collisions between empty base classes
202-
/// and between base classes and member subobjects, which affects
203-
/// whether we reuse base class tail padding in some ABIs.
204-
Ver6,
205-
206-
/// Attempt to be ABI-compatible with code generated by Clang 7.0.x
207-
/// (SVN r338536). This causes alignof (C++) and _Alignof (C11) to be
208-
/// compatible with __alignof (i.e., return the preferred alignment)
209-
/// rather than returning the required alignment.
210-
Ver7,
211-
212-
/// Attempt to be ABI-compatible with code generated by Clang 9.0.x
213-
/// (SVN r351319). This causes vectors of __int128 to be passed in memory
214-
/// instead of passing in multiple scalar registers on x86_64 on Linux and
215-
/// NetBSD.
216-
Ver9,
217-
218-
/// Attempt to be ABI-compatible with code generated by Clang 11.0.x
219-
/// (git 2e10b7a39b93). This causes clang to pass unions with a 256-bit
220-
/// vector member on the stack instead of using registers, to not properly
221-
/// mangle substitutions for template names in some cases, and to mangle
222-
/// declaration template arguments without a cast to the parameter type
223-
/// even when that can lead to mangling collisions.
224-
Ver11,
225-
226-
/// Attempt to be ABI-compatible with code generated by Clang 12.0.x
227-
/// (git 8e464dd76bef). This causes clang to mangle lambdas within
228-
/// global-scope inline variables incorrectly.
229-
Ver12,
230-
231-
/// Attempt to be ABI-compatible with code generated by Clang 14.0.x.
232-
/// This causes clang to:
233-
/// - mangle dependent nested names incorrectly.
234-
/// - make trivial only those defaulted copy constructors with a
235-
/// parameter-type-list equivalent to the parameter-type-list of an
236-
/// implicit declaration.
237-
Ver14,
238-
239-
/// Attempt to be ABI-compatible with code generated by Clang 15.0.x.
240-
/// This causes clang to:
241-
/// - Reverse the implementation for DR692, DR1395 and DR1432.
242-
/// - pack non-POD members of packed structs.
243-
/// - consider classes with defaulted special member functions non-pod.
244-
Ver15,
245-
246-
/// Attempt to be ABI-compatible with code generated by Clang 17.0.x.
247-
/// This causes clang to revert some fixes to its implementation of the
248-
/// Itanium name mangling scheme, with the consequence that overloaded
249-
/// function templates are mangled the same if they differ only by:
250-
/// - constraints
251-
/// - whether a non-type template parameter has a deduced type
252-
/// - the parameter list of a template template parameter
253-
Ver17,
254-
255-
/// Attempt to be ABI-compatible with code generated by Clang 18.0.x.
256-
/// This causes clang to revert some fixes to the mangling of lambdas
257-
/// in the initializers of members of local classes.
258-
Ver18,
259-
260-
/// Attempt to be ABI-compatible with code generated by Clang 19.0.x.
261-
/// This causes clang to:
262-
/// - Incorrectly mangle the 'base type' substitutions of the CXX
263-
/// construction vtable because it hasn't added 'type' as a substitution.
264-
/// - Skip mangling enclosing class templates of member-like friend
265-
/// function templates.
266-
/// - Ignore empty struct arguments in C++ mode for ARM, instead of
267-
/// passing them as if they had a size of 1 byte.
268-
Ver19,
269-
270-
/// Attempt to be ABI-compatible with code generated by Clang 20.0.x.
271-
/// This causes clang to:
272-
/// - Incorrectly return C++ records in AVX registers on x86_64.
273-
Ver20,
274-
275-
/// Conform to the underlying platform's C and C++ ABIs as closely
276-
/// as we can.
277-
Latest
189+
#define ABI_VER_MAJOR_MINOR(Major, Minor) Ver##Major##_##Minor,
190+
#define ABI_VER_MAJOR(Major) Ver##Major,
191+
#define ABI_VER_LATEST(Latest) Latest
192+
#include "clang/Basic/ABIVersions.def"
278193
};
279194

280195
enum class CoreFoundationABI {

clang/include/clang/CIR/Dialect/IR/CIRAttrs.td

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,4 +516,36 @@ def CIR_BitfieldInfoAttr : CIR_Attr<"BitfieldInfo", "bitfield_info"> {
516516
];
517517
}
518518

519+
//===----------------------------------------------------------------------===//
520+
// AddressPointAttr
521+
//===----------------------------------------------------------------------===//
522+
523+
def CIR_AddressPointAttr : CIR_Attr<"AddressPoint", "address_point"> {
524+
let summary = "Address point attribute";
525+
526+
let description = [{
527+
Attribute specifying the address point within a C++ virtual table (vtable).
528+
529+
The `index` (vtable index) parameter identifies which vtable to use within a
530+
vtable group, while the `offset` (address point index) specifies the offset
531+
within that vtable where the address begins.
532+
533+
Example:
534+
```mlir
535+
cir.global linkonce_odr @_ZTV1B = ...
536+
...
537+
%3 = cir.vtable.address_point(@_ZTV1B,
538+
address_point = <index = 0, offset = 2>)
539+
: !cir.vptr
540+
```
541+
}];
542+
543+
let parameters = (ins "int32_t":$index,
544+
"int32_t":$offset);
545+
546+
let assemblyFormat = [{
547+
`<` struct($index, $offset) `>`
548+
}];
549+
}
550+
519551
#endif // CLANG_CIR_DIALECT_IR_CIRATTRS_TD

0 commit comments

Comments
 (0)