This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Split createRelocation in X86 and share the second part
ClosedPublic

Authored by Kepontry on Aug 6 2023, 4:22 AM.

Details

Summary

This commit splits the createRelocation function for the X86 architecture into two parts, retaining the first half and moving the second half to a new function called extractFixupExpr. The purpose of this change is to make extractFixupExpr a shared function between AArch64 and X86 architectures, increasing code reusability and maintainability.

Child revision: https://reviews.llvm.org/D156018

Diff Detail

Event Timeline

Kepontry created this revision.Aug 6 2023, 4:22 AM
Kepontry requested review of this revision.Aug 6 2023, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2023, 4:22 AM
rafauler added inline comments.Aug 7 2023, 5:26 PM
bolt/lib/Target/X86/X86MCPlusBuilder.cpp
2461–2463
Kepontry updated this revision to Diff 548505.Aug 9 2023, 1:01 AM
Kepontry marked an inline comment as done.Aug 9 2023, 1:08 AM
Amir accepted this revision.Aug 9 2023, 7:27 AM

Please add "[BOLT][NFC]" to the title.

This revision is now accepted and ready to land.Aug 9 2023, 7:27 AM
Kepontry retitled this revision from [BOLT] Split createRelocation in X86 and share the second part to [BOLT][NFC] Split createRelocation in X86 and share the second part.Aug 9 2023, 7:40 AM