Skip to content

Commit b0657ae

Browse files
committed
merge main into amd-staging
2 parents 59047da + 7c10e57 commit b0657ae

File tree

327 files changed

+21202
-7666
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

+21202
-7666
lines changed

clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct IntegerLiteralCheck {
2929
// integer (wb), and can be a complex number ('i', 'j'). In MS compatibility
3030
// mode, suffixes like i32 are supported.
3131
static constexpr llvm::StringLiteral Suffixes =
32-
llvm::StringLiteral("uUlLzZwWbBiIjJ");
32+
llvm::StringLiteral("uUlLzZwWiIjJ");
3333
};
3434

3535
struct FloatingLiteralCheck {

clang-tools-extra/test/clang-tidy/checkers/cert/uppercase-literal-suffix-integer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,12 @@ void integer_suffix() {
128128
static_assert(is_same<decltype(v24), const unsigned long long>::value, "");
129129
static_assert(v24 == 1, "");
130130
}
131+
132+
void no_warning_on_hex_literals() {
133+
int a = 0xa;
134+
int b = 0xb;
135+
int c = 0xc;
136+
int d = 0xd;
137+
int e = 0xe;
138+
int f = 0xf;
139+
}

clang/docs/OpenMPSupport.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ implementation.
443443
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
444444
| Traits for default device envirable | :none:`unclaimed` | :none:`unclaimed` | |
445445
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
446-
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/148048 |
446+
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | (Parse) https://github.com/llvm/llvm-project/pull/148048, |
447+
| | | | (Sema) https://github.com/llvm/llvm-project/pull/152786 |
447448
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
448449
| Canonical loop sequences | :none:`unclaimed` | :part:`In Progress` | |
449450
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ OpenMP Support
734734
modifier in the ``adjust_args`` clause.
735735
- Allow array length to be omitted in array section subscript expression.
736736
- Fixed non-contiguous strided update in the ``omp target update`` directive with the ``from`` clause.
737+
- Properly handle array section/assumed-size array privatization in C/C++.
737738

738739
Improvements
739740
^^^^^^^^^^^^

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ def AnalyzerNoReturn : InheritableAttr {
979979
}
980980

981981
def InferredNoReturn : InheritableAttr {
982-
let Spellings = [];
982+
let Spellings = [];
983983
let SemaHandler = 0;
984984
let Subjects = SubjectList<[Function], ErrorDiag>;
985985
let Documentation = [InternalOnly];

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,10 @@ TARGET_BUILTIN(__builtin_amdgcn_flat_load_monitor_b128, "V4iV4i*0Ii", "nc", "gfx
675675
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b32, "ii*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
676676
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b64, "V2iV2i*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
677677
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_b128, "V4iV4i*1Iii", "nc", "gfx1250-insts,wavefrontsize32")
678+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b8, "vc*1c*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
679+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b32, "vi*1i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
680+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b64, "vV2i*1V2i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
681+
TARGET_BUILTIN(__builtin_amdgcn_cluster_load_async_to_lds_b128, "vV4i*1V4i*3IiIii", "nc", "gfx1250-insts,wavefrontsize32")
678682
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b8, "vc*1c*3IiIi", "nc", "gfx1250-insts")
679683
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b32, "vi*1i*3IiIi", "nc", "gfx1250-insts")
680684
TARGET_BUILTIN(__builtin_amdgcn_global_load_async_to_lds_b64, "vV2i*1V2i*3IiIi", "nc", "gfx1250-insts")

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10694,7 +10694,7 @@ def warn_dangling_reference_captured_by_unknown : Warning<
1069410694

1069510695
// Diagnostics based on the Lifetime safety analysis.
1069610696
def warn_lifetime_safety_loan_expires_permissive : Warning<
10697-
"object whose reference is captured does not live long enough">,
10697+
"object whose reference is captured does not live long enough">,
1069810698
InGroup<LifetimeSafetyPermissive>, DefaultIgnore;
1069910699
def warn_lifetime_safety_loan_expires_strict : Warning<
1070010700
"object whose reference is captured may not live long enough">,

clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
245245
return createGetGlobal(global.getLoc(), global);
246246
}
247247

248+
/// Create a copy with inferred length.
249+
cir::CopyOp createCopy(mlir::Value dst, mlir::Value src) {
250+
return cir::CopyOp::create(*this, dst.getLoc(), dst, src);
251+
}
252+
248253
cir::StoreOp createStore(mlir::Location loc, mlir::Value val, mlir::Value dst,
249254
bool isVolatile = false,
250255
mlir::IntegerAttr align = {},

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

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,6 +2451,52 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> {
24512451
];
24522452
}
24532453

2454+
//===----------------------------------------------------------------------===//
2455+
// CopyOp
2456+
//===----------------------------------------------------------------------===//
2457+
2458+
def CIR_CopyOp : CIR_Op<"copy",[
2459+
SameTypeOperands,
2460+
DeclareOpInterfaceMethods<PromotableMemOpInterface>
2461+
]> {
2462+
let summary = "Copies contents from a CIR pointer to another";
2463+
let description = [{
2464+
Given two CIR pointers, `src` and `dst`, `cir.copy` will copy the memory
2465+
pointed by `src` to the memory pointed by `dst`.
2466+
2467+
The number of bytes copied is inferred from the pointee type. The pointee
2468+
type of `src` and `dst` must match and both must implement the
2469+
`DataLayoutTypeInterface`.
2470+
2471+
Examples:
2472+
2473+
```mlir
2474+
// Copying contents from one record to another:
2475+
cir.copy %0 to %1 : !cir.ptr<!record_ty>
2476+
```
2477+
}];
2478+
2479+
let arguments = (ins
2480+
Arg<CIR_PointerType, "", [MemWrite]>:$dst,
2481+
Arg<CIR_PointerType, "", [MemRead]>:$src
2482+
);
2483+
2484+
let assemblyFormat = [{$src `to` $dst
2485+
attr-dict `:` qualified(type($dst))
2486+
}];
2487+
let hasVerifier = 1;
2488+
2489+
let extraClassDeclaration = [{
2490+
/// Returns the pointer type being copied.
2491+
cir::PointerType getType() { return getSrc().getType(); }
2492+
2493+
/// Returns the number of bytes to be copied.
2494+
unsigned getLength(const mlir::DataLayout &dt) {
2495+
return dt.getTypeSize(getType().getPointee());
2496+
}
2497+
}];
2498+
}
2499+
24542500
//===----------------------------------------------------------------------===//
24552501
// ReturnAddrOp and FrameAddrOp
24562502
//===----------------------------------------------------------------------===//
@@ -3752,12 +3798,23 @@ class CIR_UnaryFPToFPBuiltinOp<string mnemonic, string llvmOpName>
37523798
let llvmOp = llvmOpName;
37533799
}
37543800

3801+
def CIR_ACosOp : CIR_UnaryFPToFPBuiltinOp<"acos", "ACosOp"> {
3802+
let summary = "Computes the arcus cosine of the specified value";
3803+
let description = [{
3804+
`cir.acos`computes the arcus cosine of a given value and
3805+
returns a result of the same type.
3806+
3807+
Floating-point exceptions are ignored, and it does not set `errno`.
3808+
}];
3809+
}
3810+
37553811
def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> {
37563812
let summary = "Computes the floating-point absolute value";
37573813
let description = [{
37583814
`cir.fabs` computes the absolute value of a floating-point operand
3759-
and returns a result of the same type, ignoring floating-point
3760-
exceptions. It does not set `errno`.
3815+
and returns a result of the same type.
3816+
3817+
Floating-point exceptions are ignored, and it does not set `errno`.
37613818
}];
37623819
}
37633820

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ struct MissingFeatures {
168168
// Misc
169169
static bool abiArgInfo() { return false; }
170170
static bool addHeapAllocSiteMetadata() { return false; }
171+
static bool aggEmitFinalDestCopyRValue() { return false; }
171172
static bool aggValueSlot() { return false; }
172173
static bool aggValueSlotAlias() { return false; }
173174
static bool aggValueSlotDestructedFlag() { return false; }

0 commit comments

Comments
 (0)