Skip to content

Commit 9497686

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-multiple-fmaxnum-rdxs
2 parents 106312a + a928c61 commit 9497686

File tree

364 files changed

+7940
-3273
lines changed

Some content is hidden

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

364 files changed

+7940
-3273
lines changed

.ci/generate_test_report_github.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import generate_test_report_lib
1010

11+
1112
def compute_platform_title() -> str:
1213
logo = ":window:" if platform.system() == "Windows" else ":penguin:"
1314
# On Linux the machine value is x86_64 on Windows it is AMD64.

.ci/generate_test_report_lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def _format_ninja_failures(ninja_failures: list[tuple[str, str]]) -> list[str]:
100100
)
101101
return output
102102

103+
103104
def get_failures(junit_objects) -> dict[str, list[tuple[str, str]]]:
104105
failures = {}
105106
for results in junit_objects:

bolt/lib/Core/Relocation.cpp

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,41 +1018,15 @@ void Relocation::print(raw_ostream &OS) const {
10181018
default:
10191019
OS << "RType:" << Twine::utohexstr(Type);
10201020
break;
1021-
1022-
case Triple::aarch64: {
1023-
static const char *const AArch64RelocNames[] = {
1024-
#define ELF_RELOC(name, value) #name,
1025-
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
1026-
#undef ELF_RELOC
1027-
};
1028-
assert(Type < ArrayRef(AArch64RelocNames).size());
1029-
OS << AArch64RelocNames[Type];
1030-
} break;
1031-
1021+
case Triple::aarch64:
1022+
OS << object::getELFRelocationTypeName(ELF::EM_AARCH64, Type);
1023+
break;
10321024
case Triple::riscv64:
1033-
// RISC-V relocations are not sequentially numbered so we cannot use an
1034-
// array
1035-
switch (Type) {
1036-
default:
1037-
llvm_unreachable("illegal RISC-V relocation");
1038-
#define ELF_RELOC(name, value) \
1039-
case value: \
1040-
OS << #name; \
1025+
OS << object::getELFRelocationTypeName(ELF::EM_RISCV, Type);
10411026
break;
1042-
#include "llvm/BinaryFormat/ELFRelocs/RISCV.def"
1043-
#undef ELF_RELOC
1044-
}
1027+
case Triple::x86_64:
1028+
OS << object::getELFRelocationTypeName(ELF::EM_X86_64, Type);
10451029
break;
1046-
1047-
case Triple::x86_64: {
1048-
static const char *const X86RelocNames[] = {
1049-
#define ELF_RELOC(name, value) #name,
1050-
#include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
1051-
#undef ELF_RELOC
1052-
};
1053-
assert(Type < ArrayRef(X86RelocNames).size());
1054-
OS << X86RelocNames[Type];
1055-
} break;
10561030
}
10571031
OS << ", 0x" << Twine::utohexstr(Offset);
10581032
if (Symbol) {

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,8 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
640640
Insts[1].addOperand(MCOperand::createImm(0));
641641
Insts[1].addOperand(MCOperand::createImm(0));
642642
setOperandToSymbolRef(Insts[1], /* OpNum */ 2, Target, 0, Ctx,
643-
ELF::R_AARCH64_ADD_ABS_LO12_NC);
643+
isLDRXl(LDRInst) ? ELF::R_AARCH64_LDST64_ABS_LO12_NC
644+
: ELF::R_AARCH64_LDST32_ABS_LO12_NC);
644645
return Insts;
645646
}
646647

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Verify that llvm-bolt correctly prints relocation types.
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: %clang %cflags -nostartfiles %s -o %t.exe -Wl,-q,--no-relax
6+
# RUN: llvm-bolt %t.exe --print-cfg --print-relocations -o %t.bolt \
7+
# RUN: | FileCheck %s
8+
9+
.section .text
10+
.align 4
11+
.globl _start
12+
.type _start, %function
13+
_start:
14+
15+
adrp x0, _start
16+
# CHECK: adrp
17+
# CHECK-SAME: R_AARCH64_ADR_PREL_PG_HI21
18+
19+
add x0, x0, :lo12:_start
20+
# CHECK-NEXT: add
21+
# CHECK-SAME: R_AARCH64_ADD_ABS_LO12_NC
22+
23+
ret
24+
.size _start, .-_start

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ static void insertArray(Object &Obj, json::Value &Array, StringRef Key) {
468468
static void serializeInfo(const RecordInfo &I, json::Object &Obj,
469469
const std::optional<StringRef> &RepositoryUrl) {
470470
serializeCommonAttributes(I, Obj, RepositoryUrl);
471-
Obj["FullName"] = I.FullName;
472471
Obj["TagType"] = getTagType(I.TagType);
473472
Obj["IsTypedef"] = I.IsTypeDef;
474473
Obj["MangledName"] = I.MangledName;

clang-tools-extra/clang-doc/Representation.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ struct FunctionInfo : public SymbolInfo {
437437
// (AS_public = 0, AS_protected = 1, AS_private = 2, AS_none = 3)
438438
AccessSpecifier Access = AccessSpecifier::AS_public;
439439

440-
// Full qualified name of this function, including namespaces and template
441-
// specializations.
442-
SmallString<16> FullName;
443-
444440
// Function Prototype
445441
SmallString<256> Prototype;
446442

@@ -460,10 +456,6 @@ struct RecordInfo : public SymbolInfo {
460456
// Type of this record (struct, class, union, interface).
461457
TagTypeKind TagType = TagTypeKind::Struct;
462458

463-
// Full qualified name of this record, including namespaces and template
464-
// specializations.
465-
SmallString<16> FullName;
466-
467459
// When present, this record is a template or specialization.
468460
std::optional<TemplateInfo> Template;
469461

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

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -178,55 +178,6 @@ static llvm::SmallString<16> getTypeAlias(const TypeAliasDecl *Alias) {
178178
return Result;
179179
}
180180

181-
// extract full syntax for record declaration
182-
static llvm::SmallString<16> getRecordPrototype(const CXXRecordDecl *CXXRD) {
183-
llvm::SmallString<16> Result;
184-
LangOptions LangOpts;
185-
PrintingPolicy Policy(LangOpts);
186-
Policy.SuppressTagKeyword = false;
187-
Policy.FullyQualifiedName = true;
188-
Policy.IncludeNewlines = false;
189-
llvm::raw_svector_ostream OS(Result);
190-
if (const auto *TD = CXXRD->getDescribedClassTemplate()) {
191-
OS << "template <";
192-
bool FirstParam = true;
193-
for (const auto *Param : *TD->getTemplateParameters()) {
194-
if (!FirstParam)
195-
OS << ", ";
196-
Param->print(OS, Policy);
197-
FirstParam = false;
198-
}
199-
OS << ">\n";
200-
}
201-
202-
if (CXXRD->isStruct())
203-
OS << "struct ";
204-
else if (CXXRD->isClass())
205-
OS << "class ";
206-
else if (CXXRD->isUnion())
207-
OS << "union ";
208-
209-
OS << CXXRD->getNameAsString();
210-
211-
// We need to make sure we have a good enough declaration to check. In the
212-
// case where the class is a forward declaration, we'll fail assertions in
213-
// DeclCXX.
214-
if (CXXRD->isCompleteDefinition() && CXXRD->getNumBases() > 0) {
215-
OS << " : ";
216-
bool FirstBase = true;
217-
for (const auto &Base : CXXRD->bases()) {
218-
if (!FirstBase)
219-
OS << ", ";
220-
if (Base.isVirtual())
221-
OS << "virtual ";
222-
OS << getAccessSpelling(Base.getAccessSpecifier()) << " ";
223-
OS << Base.getType().getAsString(Policy);
224-
FirstBase = false;
225-
}
226-
}
227-
return Result;
228-
}
229-
230181
// A function to extract the appropriate relative path for a given info's
231182
// documentation. The path returned is a composite of the parent namespaces.
232183
//
@@ -1033,7 +984,6 @@ emitInfo(const RecordDecl *D, const FullComment *FC, Location Loc,
1033984
parseFields(*RI, D, PublicOnly);
1034985

1035986
if (const auto *C = dyn_cast<CXXRecordDecl>(D)) {
1036-
RI->FullName = getRecordPrototype(C);
1037987
if (const TypedefNameDecl *TD = C->getTypedefNameForAnonDecl()) {
1038988
RI->Name = TD->getNameAsString();
1039989
RI->IsTypeDef = true;

clang-tools-extra/test/clang-doc/json/class.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ struct MyClass {
124124
// CHECK-NEXT: }
125125
// CHECK-NEXT: }
126126
// CHECK-NEXT: ],
127-
// COM: FIXME: FullName is not emitted correctly.
128-
// CHECK-NEXT: "FullName": "",
129127
// CHECK-NEXT: "HasEnums": true,
130128
// CHECK-NEXT: "HasPublicFunctions": true,
131129
// CHECK-NEXT: "HasPublicMembers": true,

clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ static std::unique_ptr<Generator> getJSONGenerator() {
1616
TEST(JSONGeneratorTest, emitRecordJSON) {
1717
RecordInfo I;
1818
I.Name = "Foo";
19-
// FIXME: FullName is not emitted correctly.
20-
I.FullName = "";
2119
I.IsTypeDef = false;
2220
I.Namespace.emplace_back(EmptySID, "GlobalNamespace", InfoType::IT_namespace);
2321
I.Path = "GlobalNamespace";
@@ -64,7 +62,6 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
6462
{
6563
"Access": "public",
6664
"End": true,
67-
"FullName": "",
6865
"HasPublicFunctions": true,
6966
"HasPublicMembers": true,
7067
"InfoType": "record",
@@ -115,7 +112,6 @@ TEST(JSONGeneratorTest, emitRecordJSON) {
115112
"USR": "0000000000000000000000000000000000000000"
116113
}
117114
],
118-
"FullName": "",
119115
"HasEnums": true,
120116
"HasPublicFunctions": true,
121117
"HasRecords": true,

0 commit comments

Comments
 (0)