This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] clang support for Armv8.8/9.3 HBC
ClosedPublic

Authored by tyb0807 on Jan 10 2022, 7:05 AM.

Details

Summary

This introduces clang command line support for new Armv8.8-A and
Armv9.3-A Hinted Conditional Branches feature, previously introduced
into LLVM in https://reviews.llvm.org/D116156.

Patch by Tomas Matheson.

Diff Detail

Event Timeline

tyb0807 created this revision.Jan 10 2022, 7:05 AM
tyb0807 requested review of this revision.Jan 10 2022, 7:05 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 10 2022, 7:05 AM
tyb0807 updated this revision to Diff 398623.Jan 10 2022, 7:08 AM
tyb0807 edited the summary of this revision. (Show Details)

Remove Change-Id

tyb0807 updated this revision to Diff 398624.Jan 10 2022, 7:12 AM
tyb0807 edited the summary of this revision. (Show Details)

Add more context to the patch summary

tyb0807 updated this revision to Diff 398638.Jan 10 2022, 7:32 AM

Support for MOPS extension should be committed in a separate patch

tyb0807 updated this revision to Diff 398697.Jan 10 2022, 10:47 AM
This comment was removed by tyb0807.
tyb0807 updated this revision to Diff 398698.Jan 10 2022, 10:49 AM
tyb0807 edited the summary of this revision. (Show Details)

Update patch author in commit message.

clang/lib/Basic/Targets/AArch64.cpp
666–675

this whole block is suspect to me. Why is HBC special with regards to all other architectural extensions?

672

Sorry, why do we need another trip through Features for this?

llvm/include/llvm/Support/AArch64TargetParser.def
148

there seems to be extra whitespace between the final 2 params, but it doesn't align anything. Either remove the excess padding, or align it to a previous column.

Matt added a subscriber: Matt.Jan 10 2022, 12:23 PM
tyb0807 updated this revision to Diff 399341.Jan 12 2022, 8:25 AM
tyb0807 marked an inline comment as done.

Removed checks that set HBC flag based on the target architecture and unset it
if command line explicitly disables it. This is because HBC feature does not
require any new intrinsic in the IR, so the frontend does not need to know about
whether HBC flag is set or unset in the command line.

nickdesaulniers accepted this revision.Jan 12 2022, 11:17 AM
This revision is now accepted and ready to land.Jan 12 2022, 11:17 AM
tyb0807 marked 2 inline comments as done.Jan 12 2022, 11:22 AM
tyb0807 added inline comments.
clang/lib/Basic/Targets/AArch64.cpp
666–675

Indeed, HBC does not require the frontend to generate any special intrinsic in the IR, so the frontend does not need to know about whether HBC is enabled or disabled in the command line. This can thus be completely handled by the target parser.

This revision was landed with ongoing or failed builds.Jan 12 2022, 2:07 PM
Closed by commit rG2db4cf5962de: clang support for Armv8.8/9.3 HBC (authored by tmatheson, committed by tyb0807). · Explain Why
This revision was automatically updated to reflect the committed changes.
tyb0807 marked an inline comment as done.