Skip to content

Commit 2ee7acd

Browse files
author
z1_cciauto
authored
merge main into amd-staging (llvm#3493)
2 parents 7e06bdc + 69c6405 commit 2ee7acd

File tree

145 files changed

+14136
-5244
lines changed

Some content is hidden

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

145 files changed

+14136
-5244
lines changed

.ci/monolithic-linux.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
6565
start-group "ninja"
6666

6767
# Targets are not escaped as they are passed as separate arguments.
68-
ninja -C "${BUILD_DIR}" -k 0 ${targets}
68+
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
6969

7070
if [[ "${runtime_targets}" != "" ]]; then
7171
start-group "ninja Runtimes"
7272

73-
ninja -C "${BUILD_DIR}" ${runtime_targets}
73+
ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log
7474
fi
7575

7676
# Compiling runtimes with just-built Clang and running their tests
@@ -85,7 +85,8 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
8585

8686
start-group "ninja Runtimes C++26"
8787

88-
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
88+
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
89+
|& tee ninja_runtimes_needs_reconfig1.log
8990

9091
start-group "CMake Runtimes Clang Modules"
9192

@@ -96,5 +97,6 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
9697

9798
start-group "ninja Runtimes Clang Modules"
9899

99-
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
100+
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
101+
|& tee ninja_runtimes_needs_reconfig2.log
100102
fi

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
5151
start-group "ninja"
5252

5353
# Targets are not escaped as they are passed as separate arguments.
54-
ninja -C "${BUILD_DIR}" -k 0 ${targets}
54+
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log

.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

clang/include/clang/AST/Type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,6 +2724,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
27242724
bool isHLSLAttributedResourceType() const;
27252725
bool isHLSLInlineSpirvType() const;
27262726
bool isHLSLResourceRecord() const;
2727+
bool isHLSLResourceRecordArray() const;
27272728
bool isHLSLIntangibleType()
27282729
const; // Any HLSL intangible type (builtin, array, class)
27292730

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/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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def CIR_Dialect : Dialect {
4040
static llvm::StringRef getCalleeAttrName() { return "callee"; }
4141
static llvm::StringRef getNoThrowAttrName() { return "nothrow"; }
4242
static llvm::StringRef getSideEffectAttrName() { return "side_effect"; }
43+
static llvm::StringRef getModuleLevelAsmAttrName() { return "cir.module_asm"; }
4344

4445
void registerAttributes();
4546
void registerTypes();

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,49 @@ def CIR_GetGlobalOp : CIR_Op<"get_global", [
16911691
}];
16921692
}
16931693

1694+
//===----------------------------------------------------------------------===//
1695+
// VTableAddrPointOp
1696+
//===----------------------------------------------------------------------===//
1697+
1698+
def CIR_VTableAddrPointOp : CIR_Op<"vtable.address_point", [
1699+
Pure, DeclareOpInterfaceMethods<SymbolUserOpInterface>
1700+
]> {
1701+
let summary = "Get the vtable (global variable) address point";
1702+
let description = [{
1703+
The `vtable.address_point` operation retrieves the "effective" address
1704+
(address point) of a C++ virtual table. An object internal `__vptr`
1705+
gets initializated on top of the value returned by this operation.
1706+
1707+
`address_point.index` (vtable index) provides the appropriate vtable within
1708+
the vtable group (as specified by Itanium ABI), and `address_point.offset`
1709+
(address point index) the actual address point within that vtable.
1710+
1711+
The return type is always `!cir.vptr`.
1712+
1713+
Example:
1714+
```mlir
1715+
cir.global linkonce_odr @_ZTV1B = ...
1716+
...
1717+
%3 = cir.vtable.address_point(@_ZTV1B,
1718+
address_point = <index = 0, offset = 2>) : !cir.vptr
1719+
```
1720+
}];
1721+
1722+
let arguments = (ins
1723+
FlatSymbolRefAttr:$name,
1724+
CIR_AddressPointAttr:$address_point
1725+
);
1726+
1727+
let results = (outs Res<CIR_VPtrType, "", []>:$addr);
1728+
1729+
let assemblyFormat = [{
1730+
`(`
1731+
$name `,` `address_point` `=` $address_point
1732+
`)`
1733+
`:` qualified(type($addr)) attr-dict
1734+
}];
1735+
}
1736+
16941737
//===----------------------------------------------------------------------===//
16951738
// SetBitfieldOp
16961739
//===----------------------------------------------------------------------===//

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ struct MissingFeatures {
199199
static bool dataLayoutTypeAllocSize() { return false; }
200200
static bool deferredCXXGlobalInit() { return false; }
201201
static bool ehCleanupFlags() { return false; }
202+
static bool ehCleanupScope() { return false; }
202203
static bool ehstackBranches() { return false; }
203204
static bool emitCheckedInBoundsGEP() { return false; }
204205
static bool emitCondLikelihoodViaExpectIntrinsic() { return false; }
@@ -253,6 +254,7 @@ struct MissingFeatures {
253254
static bool thunks() { return false; }
254255
static bool tryEmitAsConstant() { return false; }
255256
static bool typeChecks() { return false; }
257+
static bool vtableInitializer() { return false; }
256258
static bool weakRefReference() { return false; }
257259
static bool writebacks() { return false; }
258260
static bool appleKext() { return false; }

clang/include/clang/Sema/SemaWasm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class SemaWasm : public SemaBase {
3737
bool BuiltinWasmTableGrow(CallExpr *TheCall);
3838
bool BuiltinWasmTableFill(CallExpr *TheCall);
3939
bool BuiltinWasmTableCopy(CallExpr *TheCall);
40-
bool BuiltinWasmTestFunctionPointerSignature(CallExpr *TheCall);
40+
bool BuiltinWasmTestFunctionPointerSignature(const TargetInfo &TI,
41+
CallExpr *TheCall);
4142

4243
WebAssemblyImportNameAttr *
4344
mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL);

0 commit comments

Comments
 (0)