Skip to content

Commit c31b08b

Browse files
author
z1.cciauto
committed
merge main into amd-staging
2 parents 313ff2b + dc8596d commit c31b08b

File tree

289 files changed

+10950
-2256
lines changed

Some content is hidden

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

289 files changed

+10950
-2256
lines changed

.ci/metrics/metrics.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,29 @@ def github_get_metrics(
336336
name_suffix = GITHUB_JOB_TO_TRACK[name_prefix][job.name]
337337
metric_name = name_prefix + "_" + name_suffix
338338

339+
ag_metric_name = None
340+
if libcxx_testing:
341+
job_key = None
342+
if job.name.find("stage1") != -1:
343+
job_key = "stage1"
344+
elif job.name.find("stage2") != -1:
345+
job_key = "stage2"
346+
elif job.name.find("stage3") != -1:
347+
job_key = "stage3"
348+
if job_key:
349+
ag_name = (
350+
name_prefix + "_" + GITHUB_JOB_TO_TRACK[name_prefix][job_key]
351+
)
352+
339353
if task.status != "completed":
340354
if job.status == "queued":
341355
queued_count[metric_name] += 1
356+
if libcxx_testing:
357+
queued_count[ag_name] += 1
342358
elif job.status == "in_progress":
343359
running_count[metric_name] += 1
360+
if libcxx_testing:
361+
running_count[ag_name] += 1
344362
continue
345363

346364
job_result = int(job.conclusion == "success" or job.conclusion == "skipped")

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@
112112
/mlir/**/NVGPU*/ @grypp
113113
/mlir/test/**/CUDA/ @grypp
114114

115+
# MLIR GPU Dialect
116+
/mlir/**/GPU*/ @fabianmcg
117+
115118
# MLIR NVVM Dialect in MLIR
116119
/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp
117120
/mlir/**/NVVM* @grypp

bolt/test/perf2bolt/perf_test.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
REQUIRES: system-linux, perf
44

5-
RUN: %clang %S/Inputs/perf_test.c -fuse-ld=lld -Wl,--script=%S/Inputs/perf_test.lds -o %t
5+
RUN: %clang %S/Inputs/perf_test.c -fuse-ld=lld -pie -Wl,--script=%S/Inputs/perf_test.lds -o %t
66
RUN: perf record -Fmax -e cycles:u -o %t2 -- %t
77
RUN: perf2bolt %t -p=%t2 -o %t3 -nl -ignore-build-id --show-density \
88
RUN: --heatmap %t.hm 2>&1 | FileCheck %s

clang-tools-extra/clang-doc/Serialize.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,8 @@ parseBases(RecordInfo &I, const CXXRecordDecl *D, bool IsFileInRootDir,
901901
if (!D->isThisDeclarationADefinition())
902902
return;
903903
for (const CXXBaseSpecifier &B : D->bases()) {
904-
if (const RecordType *Ty = B.getType()->getAs<RecordType>()) {
905-
if (const CXXRecordDecl *Base = cast_or_null<CXXRecordDecl>(
906-
Ty->getOriginalDecl()->getDefinition())) {
904+
if (const auto *Base = B.getType()->getAsCXXRecordDecl()) {
905+
if (Base->isCompleteDefinition()) {
907906
// Initialized without USR and name, this will be set in the following
908907
// if-else stmt.
909908
BaseRecordInfo BI(

clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void DefaultOperatorNewAlignmentCheck::check(
3131
return;
3232
const TagDecl *D = T->getAsTagDecl();
3333
// Alignment can not be obtained for undefined type.
34-
if (!D || !D->getDefinition() || !D->isCompleteDefinition())
34+
if (!D || !D->isCompleteDefinition())
3535
return;
3636

3737
ASTContext &Context = D->getASTContext();

clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ void SlicingCheck::diagnoseSlicedOverriddenMethods(
9090
}
9191
// Recursively process bases.
9292
for (const auto &Base : DerivedDecl.bases()) {
93-
if (const auto *BaseRecordType = Base.getType()->getAs<RecordType>()) {
94-
if (const auto *BaseRecord = cast_or_null<CXXRecordDecl>(
95-
BaseRecordType->getOriginalDecl()->getDefinition()))
93+
if (const auto *BaseRecord = Base.getType()->getAsCXXRecordDecl()) {
94+
if (BaseRecord->isCompleteDefinition())
9695
diagnoseSlicedOverriddenMethods(Call, *BaseRecord, BaseDecl);
9796
}
9897
}

clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,10 @@ bool MultipleInheritanceCheck::isInterface(const CXXRecordDecl *Node) {
7171
for (const auto &I : Node->bases()) {
7272
if (I.isVirtual())
7373
continue;
74-
const auto *Ty = I.getType()->getAs<RecordType>();
75-
if (!Ty)
74+
const auto *Base = I.getType()->getAsCXXRecordDecl();
75+
if (!Base)
7676
continue;
77-
const RecordDecl *D = Ty->getOriginalDecl()->getDefinition();
78-
if (!D)
79-
continue;
80-
const auto *Base = cast<CXXRecordDecl>(D);
77+
assert(Base->isCompleteDefinition());
8178
if (!isInterface(Base)) {
8279
addNodeToInterfaceMap(Node, false);
8380
return false;
@@ -103,23 +100,21 @@ void MultipleInheritanceCheck::check(const MatchFinder::MatchResult &Result) {
103100
for (const auto &I : D->bases()) {
104101
if (I.isVirtual())
105102
continue;
106-
const auto *Ty = I.getType()->getAs<RecordType>();
107-
if (!Ty)
103+
const auto *Base = I.getType()->getAsCXXRecordDecl();
104+
if (!Base)
108105
continue;
109-
const auto *Base =
110-
cast<CXXRecordDecl>(Ty->getOriginalDecl()->getDefinition());
106+
assert(Base->isCompleteDefinition());
111107
if (!isInterface(Base))
112108
NumConcrete++;
113109
}
114110

115111
// Check virtual bases to see if there is more than one concrete
116112
// non-virtual base.
117113
for (const auto &V : D->vbases()) {
118-
const auto *Ty = V.getType()->getAs<RecordType>();
119-
if (!Ty)
114+
const auto *Base = V.getType()->getAsCXXRecordDecl();
115+
if (!Base)
120116
continue;
121-
const auto *Base =
122-
cast<CXXRecordDecl>(Ty->getOriginalDecl()->getDefinition());
117+
assert(Base->isCompleteDefinition());
123118
if (!isInterface(Base))
124119
NumConcrete++;
125120
}

clang-tools-extra/clang-tidy/utils/TypeTraits.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ bool isTriviallyDefaultConstructible(QualType Type, const ASTContext &Context) {
119119
if (CanonicalType->isScalarType() || CanonicalType->isVectorType())
120120
return true;
121121

122-
if (const auto *RT = CanonicalType->getAs<RecordType>()) {
123-
return recordIsTriviallyDefaultConstructible(
124-
*RT->getOriginalDecl()->getDefinitionOrSelf(), Context);
122+
if (const auto *RD = CanonicalType->getAsRecordDecl()) {
123+
return recordIsTriviallyDefaultConstructible(*RD, Context);
125124
}
126125

127126
// No other types can match.

clang-tools-extra/clangd/CodeComplete.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ toCompletionItemKind(index::SymbolKind Kind,
9797
const llvm::StringRef *Signature = nullptr) {
9898
using SK = index::SymbolKind;
9999
switch (Kind) {
100+
// FIXME: for backwards compatibility, the include directive kind is treated
101+
// the same as Unknown
102+
case SK::IncludeDirective:
100103
case SK::Unknown:
101104
return CompletionItemKind::Missing;
102105
case SK::Module:

clang-tools-extra/clangd/CodeCompletionStrings.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ std::string getDeclComment(const ASTContext &Ctx, const NamedDecl &Decl) {
112112
std::string Doc;
113113

114114
if (Cfg.Documentation.CommentFormat == Config::CommentFormatPolicy::Doxygen &&
115-
isa<ParmVarDecl>(Decl)) {
115+
isa<ParmVarDecl, TemplateTypeParmDecl>(Decl)) {
116116
// Parameters are documented in their declaration context (function or
117117
// template function).
118118
const NamedDecl *ND = dyn_cast<NamedDecl>(Decl.getDeclContext());
@@ -135,7 +135,11 @@ std::string getDeclComment(const ASTContext &Ctx, const NamedDecl &Decl) {
135135
std::string RawDoc;
136136
llvm::raw_string_ostream OS(RawDoc);
137137

138-
V.parameterDocToString(dyn_cast<ParmVarDecl>(&Decl)->getName(), OS);
138+
if (auto *PVD = dyn_cast<ParmVarDecl>(&Decl))
139+
V.parameterDocToString(PVD->getName(), OS);
140+
else
141+
V.templateTypeParmDocToString(
142+
cast<TemplateTypeParmDecl>(&Decl)->getName(), OS);
139143

140144
Doc = StringRef(RawDoc).trim().str();
141145
} else {

0 commit comments

Comments
 (0)