Skip to content

Commit 2644a25

Browse files
author
iclsrc
committed
Merge from 'main' to 'sycl-web' (144 commits)
2 parents d32c3f2 + a63bbf2 commit 2644a25

File tree

769 files changed

+24715
-17414
lines changed

Some content is hidden

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

769 files changed

+24715
-17414
lines changed

.git-blame-ignore-revs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,40 @@ d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6
106106
ce46adb8b7ce645353eccaedf31ed9765dab77bb
107107
68070f908bb7ac5f0b5fa9722caa504ecf723f6b
108108
5213c57cb1f0d78aad9a253b7f6a2b62ff4c7859
109+
110+
# [mlir] Update create method
111+
9e7834cadf48292b5d127d6d98f9e6d565ed5d9a
112+
284a5c2c0b97edddf255ea210f939203ad3d09f2
113+
c090ed53fb73f59cf221f5610430af8047758117
114+
fcbcfe44cff00101a6a98a73971398eb8dd87710
115+
258daf539583b80e0217d1d87941412d65cf16aa
116+
c610b244937ed847b0275ccb038c0f2d36310b4a
117+
b58ad3650f2195117f484d551ffbada27e7d1e14
118+
258d04c810ab10f101324cbf1fe3c7be65eb1938
119+
a6bf40d1c6cf010b3ad90bf7f410983453f4deb2
120+
dcfc853c51aecf6538182378c016f8e1604e7e97
121+
3f74334c38120bbdefac012d478dfce8e4eb0906
122+
a636b7bfdd1d8304b78e8b42ec900a21736d4afb
123+
75aa7065dcf653de7870758cd502a7c714f4bcd7
124+
2f5312563fd5cb2e355ec49109f3e63875337c7c
125+
967626b842551ecd997c0d10eb68c3015b63a3d7
126+
588845defd09359a8b87db339b563af848cf45a7
127+
b0434925c98c9a8906afea60a1304c870b1f574a
128+
8fff238b2c363b036ce9e7bf7abab3acafc87ab2
129+
38976a03cd367b27437e0d1e81c0ccaee2777b47
130+
eaa67a3cf041009ae33a45159d0465262c3af5dc
131+
b0312be6aa664e4cb9abec6d080e971493093d05
132+
2736fbd8324bf21a130c8abd4bd0e7d3aa840ac1
133+
4ae9fdca8af095afd91705f8dd143e93b304b6fb
134+
f904cdd6c3049e605d24ed17680e80e7133908a0
135+
972ac59c9af4ad47af0b3542ae936b3470727e5f
136+
7b787965431e666858fdf66db25ee5a129833927
137+
c3823af156b517d926a56e3d0d585e2a15720e96
138+
dce6679cf5cbbdaffb9c2b51dc762c5c6689ea78
139+
9844ba6d9740206129b52633c555f767eaa45581
140+
5547c6cd03ddddd405a09e51624e1f19955a85b1
141+
a3a007ad5fa20abc90ead4e1030b481bf109b4cf
142+
46f6df0848ea04449c6179ecdedc404ee5b5cf11
143+
b7e332d3f59f567b1999fbcc660d7837cba8e406
144+
6056f942abe83b05406df8b04e95ec37a3d160b5
145+
906295b8a31c8dac5aa845864c0bca9f02f86184

bolt/include/bolt/Profile/DataAggregator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ class DataAggregator : public DataReader {
502502
/// entries).
503503
void imputeFallThroughs();
504504

505+
/// Register profiled functions for lite mode.
506+
void registerProfiledFunctions();
507+
505508
/// Debugging dump methods
506509
void dump() const;
507510
void dump(const PerfBranchSample &Sample) const;

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,26 @@ void DataAggregator::imputeFallThroughs() {
581581
outs() << "BOLT-INFO: imputed " << InferredTraces << " traces\n";
582582
}
583583

584+
void DataAggregator::registerProfiledFunctions() {
585+
DenseSet<uint64_t> Addrs;
586+
for (const auto &Trace : llvm::make_first_range(Traces)) {
587+
if (Trace.Branch != Trace::FT_ONLY &&
588+
Trace.Branch != Trace::FT_EXTERNAL_ORIGIN)
589+
Addrs.insert(Trace.Branch);
590+
Addrs.insert(Trace.From);
591+
}
592+
593+
for (const auto [PC, _] : BasicSamples)
594+
Addrs.insert(PC);
595+
596+
for (const PerfMemSample &MemSample : MemSamples)
597+
Addrs.insert(MemSample.PC);
598+
599+
for (const uint64_t Addr : Addrs)
600+
if (BinaryFunction *Func = getBinaryFunctionContainingAddress(Addr))
601+
Func->setHasProfileAvailable();
602+
}
603+
584604
Error DataAggregator::preprocessProfile(BinaryContext &BC) {
585605
this->BC = &BC;
586606

@@ -603,6 +623,7 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
603623
exit(0);
604624
}
605625

626+
registerProfiledFunctions();
606627
return Error::success();
607628
}
608629

@@ -1347,10 +1368,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13471368
}
13481369

13491370
const uint64_t FromOffset = Addr[0]->Offset;
1350-
BinaryFunction *FromFunc = getBinaryFunctionContainingAddress(FromOffset);
1351-
if (FromFunc)
1352-
FromFunc->setHasProfileAvailable();
1353-
13541371
int64_t Count = Counters[0];
13551372
int64_t Mispreds = Counters[1];
13561373

@@ -1361,11 +1378,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13611378
return std::error_code();
13621379
}
13631380

1364-
const uint64_t ToOffset = Addr[1]->Offset;
1365-
BinaryFunction *ToFunc = getBinaryFunctionContainingAddress(ToOffset);
1366-
if (ToFunc)
1367-
ToFunc->setHasProfileAvailable();
1368-
13691381
/// For fall-through types, adjust locations to match Trace container.
13701382
if (Type == FT || Type == FT_EXTERNAL_ORIGIN || Type == FT_EXTERNAL_RETURN) {
13711383
Addr[2] = Location(Addr[1]->Offset); // Trace To
@@ -1613,9 +1625,6 @@ std::error_code DataAggregator::parseBranchEvents() {
16131625
Traces.reserve(TraceMap.size());
16141626
for (const auto &[Trace, Info] : TraceMap) {
16151627
Traces.emplace_back(Trace, Info);
1616-
for (const uint64_t Addr : {Trace.Branch, Trace.From})
1617-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Addr))
1618-
BF->setHasProfileAvailable();
16191628
}
16201629
clear(TraceMap);
16211630

@@ -1676,9 +1685,6 @@ std::error_code DataAggregator::parseBasicEvents() {
16761685
continue;
16771686
++NumTotalSamples;
16781687

1679-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1680-
BF->setHasProfileAvailable();
1681-
16821688
++BasicSamples[Sample->PC];
16831689
EventNames.insert(Sample->EventName);
16841690
}
@@ -1716,9 +1722,6 @@ std::error_code DataAggregator::parseMemEvents() {
17161722
if (std::error_code EC = Sample.getError())
17171723
return EC;
17181724

1719-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1720-
BF->setHasProfileAvailable();
1721-
17221725
MemSamples.emplace_back(std::move(Sample.get()));
17231726
}
17241727

bolt/test/X86/debug-fission-single-convert.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
# RUN: -nostartfiles \
1515
# RUN: -Wl,--script=%p/Inputs/debug-fission-script.txt \
1616
# RUN: %t.o -o %t.exe
17+
# RUN: mkdir -p %t.dwarf-output
1718
# RUN: llvm-bolt %t.exe \
1819
# RUN: --reorder-blocks=reverse \
1920
# RUN: --update-debug-sections \
20-
# RUN: --dwarf-output-path=%T \
21+
# RUN: --dwarf-output-path=%t.dwarf-output \
2122
# RUN: --always-convert-to-ranges=true \
2223
# RUN: -o %t.bolt.1.exe 2>&1 | FileCheck %s
2324
# RUN: llvm-dwarfdump --show-form --verbose --debug-ranges %t.bolt.1.exe &> %tAddrIndexTest
24-
# RUN: not llvm-dwarfdump --show-form --verbose --debug-info %T/debug-fission-simple-convert.dwo0.dwo >> %tAddrIndexTest
25+
# RUN: not llvm-dwarfdump --show-form --verbose --debug-info %t.dwarf-output/debug-fission-simple-convert.dwo0.dwo >> %tAddrIndexTest
2526
# RUN: cat %tAddrIndexTest | FileCheck %s --check-prefix=CHECK-DWO-DWO
2627
# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt.1.exe | FileCheck %s --check-prefix=CHECK-ADDR-SEC
2728

bolt/test/X86/debug-fission-single.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
# RUN: -nostartfiles \
1515
# RUN: -Wl,--script=%p/Inputs/debug-fission-script.txt \
1616
# RUN: %t.o -o %t.exe
17+
# RUN: mkdir -p %t.dwarf-output
1718
# RUN: llvm-bolt %t.exe \
1819
# RUN: --reorder-blocks=reverse \
1920
# RUN: --update-debug-sections \
20-
# RUN: --dwarf-output-path=%T \
21+
# RUN: --dwarf-output-path=%t.dwarf-output \
2122
# RUN: -o %t.bolt.1.exe 2>&1 | FileCheck %s
2223
# RUN: llvm-dwarfdump --show-form --verbose --debug-ranges %t.bolt.1.exe &> %tAddrIndexTest
23-
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %T/debug-fission-simple.dwo0.dwo >> %tAddrIndexTest
24+
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.dwarf-output/debug-fission-simple.dwo0.dwo >> %tAddrIndexTest
2425
# RUN: cat %tAddrIndexTest | FileCheck %s --check-prefix=CHECK-DWO-DWO
2526
# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt.1.exe | FileCheck %s --check-prefix=CHECK-ADDR-SEC
2627

bolt/test/X86/inlined-function-mixed.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Make sure inlining from a unit with debug info into unit without
22
## debug info does not cause a crash.
33

4-
RUN: %clangxx %cxxflags %S/Inputs/inlined.cpp -c -o %T/inlined.o
5-
RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %T/inlinee.o -g
6-
RUN: %clangxx %cxxflags %T/inlined.o %T/inlinee.o -o %t
4+
RUN: %clangxx %cxxflags %S/Inputs/inlined.cpp -c -o %t.inlined.o
5+
RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %t.inlinee.o -g
6+
RUN: %clangxx %cxxflags %t.inlined.o %t.inlinee.o -o %t
77

88
RUN: llvm-bolt %t -o %t.bolt --update-debug-sections --reorder-blocks=reverse \
99
RUN: --inline-small-functions --force-inline=main | FileCheck %s

clang-tools-extra/clang-tidy/llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ add_clang_library(clangTidyLLVMModule STATIC
1717
clangTidy
1818
clangTidyReadabilityModule
1919
clangTidyUtils
20-
clangTransformer
2120

2221
DEPENDS
2322
omp_gen
@@ -31,4 +30,5 @@ clang_target_link_libraries(clangTidyLLVMModule
3130
clangBasic
3231
clangLex
3332
clangTooling
33+
clangTransformer
3434
)

clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
121121
hasAnyBase(hasType(cxxRecordDecl(has(fieldDecl()))));
122122
Finder->addMatcher(
123123
initListExpr(
124-
hasType(cxxRecordDecl(
125-
RestrictToPODTypes ? isPOD() : isAggregate(),
126-
unless(anyOf(HasBaseWithFields, hasName("::std::array"))))
127-
.bind("type")),
124+
hasType(hasUnqualifiedDesugaredType(recordType(hasDeclaration(
125+
cxxRecordDecl(
126+
RestrictToPODTypes ? isPOD() : isAggregate(),
127+
unless(anyOf(HasBaseWithFields, hasName("::std::array"))))
128+
.bind("type"))))),
128129
IgnoreSingleElementAggregates ? hasMoreThanOneElement() : anything(),
129130
unless(isFullyDesignated()))
130131
.bind("init"),
@@ -155,7 +156,7 @@ void UseDesignatedInitializersCheck::check(
155156
DiagnosticBuilder Diag =
156157
diag(InitList->getLBraceLoc(),
157158
"use designated initializer list to initialize %0");
158-
Diag << Type << InitList->getSourceRange();
159+
Diag << InitList->getType() << InitList->getSourceRange();
159160
for (const Stmt *InitExpr : *SyntacticInitList) {
160161
const auto Designator = Designators[InitExpr->getBeginLoc()];
161162
if (Designator && !Designator->empty())

clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
9292
const LangOptions &LO = getLangOpts();
9393

9494
// Match CXXRecordDecl only to store the range of the last non-implicit full
95-
// declaration, to later check whether it's within the typdef itself.
95+
// declaration, to later check whether it's within the typedef itself.
9696
const auto *MatchedTagDecl = Result.Nodes.getNodeAs<TagDecl>(TagDeclName);
9797
if (MatchedTagDecl) {
9898
// It is not sufficient to just track the last TagDecl that we've seen,
@@ -152,7 +152,7 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
152152
StringRef ExtraReference = "";
153153
if (MainTypeEndLoc.isValid() && TypeRange.fullyContains(MainTypeEndLoc)) {
154154
// Each type introduced in a typedef can specify being a reference or
155-
// pointer type seperately, so we need to sigure out if the new using-decl
155+
// pointer type separately, so we need to figure out if the new using-decl
156156
// needs to be to a reference or pointer as well.
157157
const SourceLocation Tok = utils::lexer::findPreviousAnyTokenKind(
158158
MatchedDecl->getLocation(), SM, LO, tok::TokenKind::star,

clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ set(LLVM_LINK_COMPONENTS
1414
add_clang_library(clangDaemonTweaks OBJECT
1515
AddUsing.cpp
1616
AnnotateHighlightings.cpp
17-
DumpAST.cpp
1817
DefineInline.cpp
1918
DefineOutline.cpp
19+
DumpAST.cpp
2020
ExpandDeducedType.cpp
2121
ExpandMacro.cpp
2222
ExtractFunction.cpp
2323
ExtractVariable.cpp
2424
MemberwiseConstructor.cpp
2525
ObjCLocalizeStringLiteral.cpp
2626
ObjCMemberwiseInitializer.cpp
27+
OverridePureVirtuals.cpp
2728
PopulateSwitch.cpp
2829
RawStringLiteral.cpp
2930
RemoveUsingNamespace.cpp

0 commit comments

Comments
 (0)