This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Enable PLT analysis for aarch64
ClosedPublic

Authored by yota9 on Jan 24 2022, 4:25 PM.

Details

Summary

This patch enables PLT analysis for aarch64. It is used by the static
relocations in order to provide final symbol address of PLT entry for some
instructions like ADRP.

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

Diff Detail

Event Timeline

yota9 created this revision.Jan 24 2022, 4:25 PM
yota9 requested review of this revision.Jan 24 2022, 4:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 4:25 PM
yota9 updated this revision to Diff 402713.Jan 24 2022, 4:28 PM

Remove debug output + clang format

yota9 updated this revision to Diff 409039.Feb 15 2022, 1:31 PM

Code-refactor. Hello @maksfb! I will extremely need this patch in the nearest future, I hope we could submit it soon :) Thank you!

yota9 updated this revision to Diff 409059.Feb 15 2022, 2:28 PM

Fix x86 disassembly

Gentle ping to reviewers :)

yota9 updated this revision to Diff 409895.Feb 18 2022, 4:10 AM

minor comment fixes. And taking the opportunity gentle ping :)

rafauler added inline comments.Feb 22 2022, 7:22 PM
bolt/include/bolt/Core/MCPlusBuilder.h
1333
bolt/include/bolt/Rewrite/RewriteInstance.h
245
249
253
bolt/lib/Rewrite/RewriteInstance.cpp
1258

EntryOffset is not a loop-carried dependency, better to declare it inside the loop.

1258
1263
1264
bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
731
746
747

I guess you meant

nit: Title of the diff should also be changed to "[BOLT] Enable PLT analysis for aarch64"

yota9 updated this revision to Diff 412241.Mar 1 2022, 1:55 PM
yota9 marked 11 inline comments as done.

Address comments

Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 1:55 PM

Hello @rafaelauler ! Thank you for your comments! Sorry for the long reply, something insane is going on I just don't have enough time and power these days :(

bolt/lib/Rewrite/RewriteInstance.cpp
1258

Agree, thanks

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
747

Yes, strange that I've skipped this, thanks!

yota9 retitled this revision from [BOLT] Enable PLT analyzation for aarch64 to [BOLT] Enable PLT analysis for aarch64.Mar 1 2022, 1:58 PM
yota9 edited the summary of this revision. (Show Details)
rafauler accepted this revision.Mar 1 2022, 6:14 PM

Sure, Vladislav! Take all the time you need, I hope things improve soon. Stay safe!

Thanks for working on this, changes look good.

This revision is now accepted and ready to land.Mar 1 2022, 6:14 PM

Before committing this, could you please clang-format line 1378? The linter is complaining. Please update this diff with the final version.

yota9 added a comment.Mar 2 2022, 10:35 AM

@rafaelauler Sure, thanks! Also thank you for you kind words :)

This revision was landed with ongoing or failed builds.Mar 2 2022, 11:15 AM
This revision was automatically updated to reflect the committed changes.