Skip to content

Commit ceb304f

Browse files
committed
Rename Propeller to PostLink.
1 parent 4f9aee7 commit ceb304f

File tree

11 files changed

+56
-56
lines changed

11 files changed

+56
-56
lines changed

llvm/include/llvm/Object/ELFTypes.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ struct BBAddrMap {
834834
bool OmitBBEntries : 1;
835835
bool CallsiteEndOffsets : 1;
836836
bool BBHash : 1;
837-
bool PropellerCfg : 1;
837+
bool PostLinkCfg : 1;
838838

839839
bool hasPGOAnalysis() const { return FuncEntryCount || BBFreq || BrProb; }
840840

@@ -849,7 +849,7 @@ struct BBAddrMap {
849849
(static_cast<uint8_t>(OmitBBEntries) << 4) |
850850
(static_cast<uint8_t>(CallsiteEndOffsets) << 5) |
851851
(static_cast<uint8_t>(BBHash) << 6) |
852-
(static_cast<uint8_t>(PropellerCfg) << 7);
852+
(static_cast<uint8_t>(PostLinkCfg) << 7);
853853
}
854854

855855
// Decodes from minimum bit width representation and validates no
@@ -870,11 +870,11 @@ struct BBAddrMap {
870870
bool operator==(const Features &Other) const {
871871
return std::tie(FuncEntryCount, BBFreq, BrProb, MultiBBRange,
872872
OmitBBEntries, CallsiteEndOffsets, BBHash,
873-
PropellerCfg) ==
873+
PostLinkCfg) ==
874874
std::tie(Other.FuncEntryCount, Other.BBFreq, Other.BrProb,
875875
Other.MultiBBRange, Other.OmitBBEntries,
876876
Other.CallsiteEndOffsets, Other.BBHash,
877-
Other.PropellerCfg);
877+
Other.PostLinkCfg);
878878
}
879879
};
880880

@@ -1017,25 +1017,25 @@ struct PGOAnalysisMap {
10171017
uint32_t ID;
10181018
/// Branch Probability of the edge to this successor taken from MBPI.
10191019
BranchProbability Prob;
1020-
/// Raw edge count from Propeller.
1021-
uint32_t PropellerFreq;
1020+
/// Raw edge count from the post link profile.
1021+
uint64_t PostLinkFreq;
10221022

10231023
bool operator==(const SuccessorEntry &Other) const {
1024-
return std::tie(ID, Prob, PropellerFreq) ==
1025-
std::tie(Other.ID, Other.Prob, Other.PropellerFreq);
1024+
return std::tie(ID, Prob, PostLinkFreq) ==
1025+
std::tie(Other.ID, Other.Prob, Other.PostLinkFreq);
10261026
}
10271027
};
10281028

10291029
/// Block frequency taken from MBFI
10301030
BlockFrequency BlockFreq;
1031-
/// Raw block count taken from Propeller.
1032-
uint32_t PropellerBlockFreq = 0;
1031+
/// Raw block count taken from the post linke profile
1032+
uint64_t PostLinkBlockFreq = 0;
10331033
/// List of successors of the current block
10341034
llvm::SmallVector<SuccessorEntry, 2> Successors;
10351035

10361036
bool operator==(const PGOBBEntry &Other) const {
1037-
return std::tie(BlockFreq, PropellerBlockFreq, Successors) ==
1038-
std::tie(Other.BlockFreq, PropellerBlockFreq, Other.Successors);
1037+
return std::tie(BlockFreq, PostLinkBlockFreq, Successors) ==
1038+
std::tie(Other.BlockFreq, PostLinkBlockFreq, Other.Successors);
10391039
}
10401040
};
10411041

llvm/include/llvm/ObjectYAML/ELFYAML.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ struct PGOAnalysisMapEntry {
203203
struct SuccessorEntry {
204204
uint32_t ID;
205205
llvm::yaml::Hex32 BrProb;
206-
std::optional<uint32_t> PropellerBrFreq;
206+
std::optional<uint32_t> PostLinkBrFreq;
207207
};
208208
std::optional<uint64_t> BBFreq;
209-
std::optional<uint32_t> PropellerBBFreq;
209+
std::optional<uint32_t> PostLinkBBFreq;
210210
std::optional<std::vector<SuccessorEntry>> Successors;
211211
};
212212
std::optional<uint64_t> FuncEntryCount;

llvm/lib/Object/ELF.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ decodeBBAddrMapImpl(const ELFFile<ELFT> &EF,
858858
"basic block hash feature is enabled: version = " +
859859
Twine(static_cast<int>(Version)) +
860860
" feature = " + Twine(static_cast<int>(Feature)));
861-
if (FeatEnable.PropellerCfg && Version < 5)
861+
if (FeatEnable.PostLinkCfg && Version < 5)
862862
return createError("version should be >= 5 for SHT_LLVM_BB_ADDR_MAP when "
863863
"basic block hash feature is enabled: version = " +
864864
Twine(static_cast<int>(Version)) +
@@ -951,8 +951,8 @@ decodeBBAddrMapImpl(const ELFFile<ELFT> &EF,
951951
uint64_t BBF = FeatEnable.BBFreq
952952
? readULEB128As<uint64_t>(Data, Cur, ULEBSizeErr)
953953
: 0;
954-
uint32_t PropellerBBFreq =
955-
FeatEnable.PropellerCfg
954+
uint32_t PostLinkBBFreq =
955+
FeatEnable.PostLinkCfg
956956
? readULEB128As<uint32_t>(Data, Cur, ULEBSizeErr)
957957
: 0;
958958

@@ -964,20 +964,20 @@ decodeBBAddrMapImpl(const ELFFile<ELFT> &EF,
964964
for (uint64_t I = 0; I < SuccCount; ++I) {
965965
uint32_t BBID = readULEB128As<uint32_t>(Data, Cur, ULEBSizeErr);
966966
uint32_t BrProb = readULEB128As<uint32_t>(Data, Cur, ULEBSizeErr);
967-
uint32_t PropellerFreq =
968-
FeatEnable.PropellerCfg
967+
uint32_t PostLinkFreq =
968+
FeatEnable.PostLinkCfg
969969
? readULEB128As<uint32_t>(Data, Cur, ULEBSizeErr)
970970
: 0;
971971

972972
if (PGOAnalyses)
973973
Successors.push_back(
974-
{BBID, BranchProbability::getRaw(BrProb), PropellerFreq});
974+
{BBID, BranchProbability::getRaw(BrProb), PostLinkFreq});
975975
}
976976
}
977977

978978
if (PGOAnalyses)
979979
PGOBBEntries.push_back(
980-
{BlockFrequency(BBF), PropellerBBFreq, std::move(Successors)});
980+
{BlockFrequency(BBF), PostLinkBBFreq, std::move(Successors)});
981981
}
982982

983983
if (PGOAnalyses)

llvm/lib/ObjectYAML/ELFEmitter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,15 +1556,15 @@ void ELFState<ELFT>::writeSectionContent(
15561556
for (const auto &PGOBBE : PGOBBEntries) {
15571557
if (PGOBBE.BBFreq)
15581558
SHeader.sh_size += CBA.writeULEB128(*PGOBBE.BBFreq);
1559-
if (FeatureOrErr->PropellerCfg || PGOBBE.PropellerBBFreq.has_value())
1560-
SHeader.sh_size += CBA.writeULEB128(PGOBBE.PropellerBBFreq.value_or(0));
1559+
if (FeatureOrErr->PostLinkCfg || PGOBBE.PostLinkBBFreq.has_value())
1560+
SHeader.sh_size += CBA.writeULEB128(PGOBBE.PostLinkBBFreq.value_or(0));
15611561
if (PGOBBE.Successors) {
15621562
SHeader.sh_size += CBA.writeULEB128(PGOBBE.Successors->size());
1563-
for (const auto &[ID, BrProb, PropellerBrFreq] : *PGOBBE.Successors) {
1563+
for (const auto &[ID, BrProb, PostLinkBrFreq] : *PGOBBE.Successors) {
15641564
SHeader.sh_size += CBA.writeULEB128(ID);
15651565
SHeader.sh_size += CBA.writeULEB128(BrProb);
1566-
if (FeatureOrErr->PropellerCfg || PropellerBrFreq.has_value())
1567-
SHeader.sh_size += CBA.writeULEB128(PropellerBrFreq.value_or(0));
1566+
if (FeatureOrErr->PostLinkCfg || PostLinkBrFreq.has_value())
1567+
SHeader.sh_size += CBA.writeULEB128(PostLinkBrFreq.value_or(0));
15681568
}
15691569
}
15701570
}

llvm/lib/ObjectYAML/ELFYAML.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ void MappingTraits<ELFYAML::PGOAnalysisMapEntry::PGOBBEntry>::mapping(
19201920
IO &IO, ELFYAML::PGOAnalysisMapEntry::PGOBBEntry &E) {
19211921
assert(IO.getContext() && "The IO context is not initialized");
19221922
IO.mapOptional("BBFreq", E.BBFreq);
1923-
IO.mapOptional("PropellerBBFreq", E.PropellerBBFreq);
1923+
IO.mapOptional("PostLinkBBFreq", E.PostLinkBBFreq);
19241924
IO.mapOptional("Successors", E.Successors);
19251925
}
19261926

@@ -1930,7 +1930,7 @@ void MappingTraits<ELFYAML::PGOAnalysisMapEntry::PGOBBEntry::SuccessorEntry>::
19301930
assert(IO.getContext() && "The IO context is not initialized");
19311931
IO.mapRequired("ID", E.ID);
19321932
IO.mapRequired("BrProb", E.BrProb);
1933-
IO.mapOptional("PropellerBrFreq", E.PropellerBrFreq);
1933+
IO.mapOptional("PostLinkBrFreq", E.PostLinkBrFreq);
19341934
}
19351935

19361936
void MappingTraits<ELFYAML::GnuHashHeader>::mapping(IO &IO,

llvm/test/tools/llvm-readobj/ELF/bb-addr-map-pgo-analysis-map.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@
5959
# CHECK-NEXT: {
6060
# RAW-NEXT: Frequency: 100
6161
# PRETTY-NEXT: Frequency: 1.0
62-
# CHECK-NEXT: Propeller Frequency: 10
62+
# CHECK-NEXT: PostLink Frequency: 10
6363
# CHECK-NEXT: Successors [
6464
# CHECK-NEXT: {
6565
# CHECK-NEXT: ID: 2
6666
# RAW-NEXT: Probability: 0x80000000
6767
# PRETTY-NEXT: Probability: 0x80000000 / 0x80000000 = 100.00%
68-
# CHECK-NEXT: Propeller Probability: 7
68+
# CHECK-NEXT: PostLink Probability: 7
6969
# CHECK-NEXT: }
7070
# CHECK-NEXT: ]
7171
# CHECK-NEXT: }
7272
# CHECK-NEXT: {
7373
# RAW-NEXT: Frequency: 100
7474
# PRETTY-NEXT: Frequency: 1.0
75-
# CHECK-NEXT: Propeller Frequency: 0
75+
# CHECK-NEXT: PostLink Frequency: 0
7676
# CHECK-NEXT: Successors [
7777
# CHECK-NEXT: ]
7878
# CHECK-NEXT: }
@@ -201,11 +201,11 @@ Sections:
201201
- FuncEntryCount: 100
202202
PGOBBEntries:
203203
- BBFreq: 100
204-
PropellerBBFreq: 10
204+
PostLinkBBFreq: 10
205205
Successors:
206206
- ID: 2
207207
BrProb: 0x80000000
208-
PropellerBrFreq: 7
208+
PostLinkBrFreq: 7
209209
- BBFreq: 100
210210
Successors: []
211211
- FuncEntryCount: 8888

llvm/test/tools/obj2yaml/ELF/bb-addr-map-pgo-analysis-map.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@
4444
# VALID-NEXT: - FuncEntryCount: 100
4545
# VALID-NEXT: PGOBBEntries:
4646
# VALID-NEXT: - BBFreq: 100
47-
# VALID-NEXT: PropellerBBFreq: 10
47+
# VALID-NEXT: PostLinkBBFreq: 10
4848
# VALID-NEXT: Successors:
4949
# VALID-NEXT: - ID: 2
5050
# VALID-NEXT: BrProb: 0x80000000
51-
# VALID-NEXT: PropellerBrFreq: 7
51+
# VALID-NEXT: PostLinkBrFreq: 7
5252
# VALID-NEXT: - ID: 4
5353
# VALID-NEXT: BrProb: 0x80000000
54-
# VALID-NEXT: PropellerBrFreq: 0
54+
# VALID-NEXT: PostLinkBrFreq: 0
5555
# VALID-NEXT: - BBFreq: 50
56-
# VALID-NEXT: PropellerBBFreq: 0
56+
# VALID-NEXT: PostLinkBBFreq: 0
5757
# VALID-NEXT: Successors:
5858
# VALID-NEXT: - ID: 4
5959
# VALID-NEXT: BrProb: 0xFFFFFFFF
60-
# VALID-NEXT: PropellerBrFreq: 0
60+
# VALID-NEXT: PostLinkBrFreq: 0
6161
# VALID-NEXT: - BBFreq: 100
62-
# VALID-NEXT: PropellerBBFreq: 3
62+
# VALID-NEXT: PostLinkBBFreq: 3
6363
# VALID-NEXT: Successors: []
6464
# VALID-NEXT: PGOBBEntries:
6565
# VALID-NEXT: - BBFreq: 20
@@ -104,19 +104,19 @@ Sections:
104104
- FuncEntryCount: 100
105105
PGOBBEntries:
106106
- BBFreq: 100
107-
PropellerBBFreq: 10
107+
PostLinkBBFreq: 10
108108
Successors:
109109
- ID: 2
110110
BrProb: 0x80000000
111-
PropellerBrFreq: 7
111+
PostLinkBrFreq: 7
112112
- ID: 4
113113
BrProb: 0x80000000
114114
- BBFreq: 50
115115
Successors:
116116
- ID: 4
117117
BrProb: 0xFFFFFFFF
118118
- BBFreq: 100
119-
PropellerBBFreq: 3
119+
PostLinkBBFreq: 3
120120
Successors: []
121121
- PGOBBEntries:
122122
- BBFreq: 20

llvm/test/tools/yaml2obj/ELF/bb-addr-map-pgo-analysis-map.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Sections:
4444
- FuncEntryCount: 1000
4545
PGOBBEntries:
4646
- BBFreq: 1000
47-
PropellerBBFreq: 100
47+
PostLinkBBFreq: 100
4848
Successors:
4949
- ID: 12
5050
BrProb: 0xeeeeeeee
51-
PropellerBrFreq: 40
51+
PostLinkBrFreq: 40
5252
- ID: 13
5353
BrProb: 0x11111111
5454

llvm/tools/llvm-readobj/ELFDumper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8188,8 +8188,8 @@ void LLVMELFDumper<ELFT>::printBBAddrMaps(bool PrettyPGOAnalysis) {
81888188
} else {
81898189
W.printNumber("Frequency", PBBE.BlockFreq.getFrequency());
81908190
}
8191-
if (PAM.FeatEnable.PropellerCfg)
8192-
W.printNumber("Propeller Frequency", PBBE.PropellerBlockFreq);
8191+
if (PAM.FeatEnable.PostLinkCfg)
8192+
W.printNumber("PostLink Frequency", PBBE.PostLinkBlockFreq);
81938193
}
81948194

81958195
if (PAM.FeatEnable.BrProb) {
@@ -8202,8 +8202,8 @@ void LLVMELFDumper<ELFT>::printBBAddrMaps(bool PrettyPGOAnalysis) {
82028202
} else {
82038203
W.printHex("Probability", Succ.Prob.getNumerator());
82048204
}
8205-
if (PAM.FeatEnable.PropellerCfg)
8206-
W.printNumber("Propeller Probability", Succ.PropellerFreq);
8205+
if (PAM.FeatEnable.PostLinkCfg)
8206+
W.printNumber("PostLink Probability", Succ.PostLinkFreq);
82078207
}
82088208
}
82098209
}

llvm/tools/obj2yaml/elf2yaml.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,8 @@ ELFDumper<ELFT>::dumpBBAddrMapSection(const Elf_Shdr *Shdr) {
972972
auto &PGOBBEntry = PGOBBEntries.emplace_back();
973973
if (FeatureOrErr->BBFreq) {
974974
PGOBBEntry.BBFreq = Data.getULEB128(Cur);
975-
if (FeatureOrErr->PropellerCfg)
976-
PGOBBEntry.PropellerBBFreq = Data.getULEB128(Cur);
975+
if (FeatureOrErr->PostLinkCfg)
976+
PGOBBEntry.PostLinkBBFreq = Data.getULEB128(Cur);
977977
if (!Cur)
978978
break;
979979
}
@@ -984,10 +984,10 @@ ELFDumper<ELFT>::dumpBBAddrMapSection(const Elf_Shdr *Shdr) {
984984
for (uint64_t SuccIdx = 0; Cur && SuccIdx < SuccCount; ++SuccIdx) {
985985
uint32_t ID = Data.getULEB128(Cur);
986986
uint32_t BrProb = Data.getULEB128(Cur);
987-
std::optional<uint32_t> PropellerBrFreq;
988-
if (FeatureOrErr->PropellerCfg)
989-
PropellerBrFreq = Data.getULEB128(Cur);
990-
SuccEntries.push_back({ID, BrProb, PropellerBrFreq});
987+
std::optional<uint32_t> PostLinkBrFreq;
988+
if (FeatureOrErr->PostLinkCfg)
989+
PostLinkBrFreq = Data.getULEB128(Cur);
990+
SuccEntries.push_back({ID, BrProb, PostLinkBrFreq});
991991
}
992992
}
993993
}

0 commit comments

Comments
 (0)