[BOLT][NFC] Track fragment relationships using EquivalenceClasses
Three-way splitting can create references between split fragments (warm to cold or vice versa) that are not handled by `isChildOf/isParentOf/isChildOrParentOf`. Generalize fragment relationships to allow checking if two functions belong to one group, potentially in presence of ICF which can join multiple groups. Test Plan: NFC for existing tests Reviewers: maksfb, ayermolo, rafaelauler, dcci Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/99979
This commit is contained in:
@@ -207,7 +207,7 @@ Error BinaryFunction::parseLSDA(ArrayRef<uint8_t> LSDASectionData,
|
||||
"BOLT-ERROR: cannot find landing pad fragment");
|
||||
BC.addInterproceduralReference(this, Fragment->getAddress());
|
||||
BC.processInterproceduralReferences();
|
||||
assert(isParentOrChildOf(*Fragment) &&
|
||||
assert(BC.areRelatedFragments(this, Fragment) &&
|
||||
"BOLT-ERROR: cannot have landing pads in different functions");
|
||||
setHasIndirectTargetToSplitFragment(true);
|
||||
BC.addFragmentsToSkip(this);
|
||||
|
||||
Reference in New Issue
Block a user