This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Avoid unnecessary AArch64 DSB in __clear_cache in some situations.
ClosedPublic

Authored by kristof.beyls on Jun 16 2021, 5:22 AM.

Details

Summary

The dsb after instruction cache invalidation only needs to be executed
if any instruction cache invalidation did happen.
Without this change, if the CTR_EL0.DIC bit indicates that instruction
cache invalidation is not needed, __clear_cache would execute two dsb
instructions in a row; with the second one being unnecessary.

Diff Detail

Event Timeline

kristof.beyls created this revision.Jun 16 2021, 5:22 AM
kristof.beyls requested review of this revision.Jun 16 2021, 5:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2021, 5:22 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Jun 16 2021, 5:25 AM