Skip to content

Commit 97c4f36

Browse files
authored
[BOLT] Fix comments for interprocedural branches. NFC (#170745)
1 parent 94984d5 commit 97c4f36

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ class BinaryContext {
11131113
return FragmentClasses.isEquivalent(LHS, RHS);
11141114
}
11151115

1116-
/// Add interprocedural reference for \p Function to \p Address
1116+
/// Add interprocedural branch reference from \p Function to \p Address.
11171117
void addInterproceduralReference(BinaryFunction *Function, uint64_t Address) {
11181118
InterproceduralReferences.push_back({Function, Address});
11191119
}
@@ -1128,7 +1128,8 @@ class BinaryContext {
11281128
/// argument is false.
11291129
bool handleAArch64Veneer(uint64_t Address, bool MatchOnly = false);
11301130

1131-
/// Resolve inter-procedural dependencies from
1131+
/// Resolve inter-procedural branch dependencies discovered during
1132+
/// disassembly.
11321133
void processInterproceduralReferences();
11331134

11341135
/// Skip functions with all parent and child fragments transitively.

bolt/lib/Core/BinaryContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,8 +1438,6 @@ void BinaryContext::processInterproceduralReferences() {
14381438
continue;
14391439
}
14401440

1441-
// Check if address falls in function padding space - this could be
1442-
// unmarked data in code. In this case adjust the padding space size.
14431441
ErrorOr<BinarySection &> Section = getSectionForAddress(Address);
14441442
assert(Section && "cannot get section for referenced address");
14451443

@@ -1451,7 +1449,7 @@ void BinaryContext::processInterproceduralReferences() {
14511449
if (SectionName == ".plt" || SectionName == ".plt.got")
14521450
continue;
14531451

1454-
// Check if it is aarch64 veneer written at Address
1452+
// Check if it is aarch64 veneer written at Address.
14551453
if (isAArch64() && handleAArch64Veneer(Address))
14561454
continue;
14571455

@@ -1463,6 +1461,8 @@ void BinaryContext::processInterproceduralReferences() {
14631461
exit(1);
14641462
}
14651463

1464+
// Check if the address falls into the function padding space - this could
1465+
// be an unmarked data in code. In this case, adjust the padding space size.
14661466
TargetFunction = getBinaryFunctionContainingAddress(Address,
14671467
/*CheckPastEnd=*/false,
14681468
/*UseMaxSize=*/true);

0 commit comments

Comments
 (0)