This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add tune features of preferred function/loop align
ClosedPublic

Authored by wangpc on Aug 13 2023, 9:22 PM.

Details

Summary

D144048 has added preferred function and loop alignment to
RISCVSubtarget, but now we need to set them manually for
different processors.

Tune features that set preferred function/loop align to
[2, 64] bytes (align 1 is not here since the min align is 2)
are added. These features can be used in processor
definitions.

Diff Detail

Event Timeline

wangpc created this revision.Aug 13 2023, 9:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2023, 9:22 PM
wangpc requested review of this revision.Aug 13 2023, 9:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2023, 9:22 PM

256 seems high. The largest I see on AArch64 is 64?

wangpc updated this revision to Diff 549790.Aug 13 2023, 10:30 PM

Change max align to 64.

wangpc edited the summary of this revision. (Show Details)Aug 13 2023, 10:31 PM
wangpc edited the summary of this revision. (Show Details)
asb accepted this revision.Aug 14 2023, 7:20 AM

LGTM. Personally I'd just list out 2, 4, 8, 16, 32, 64 in a list in TableGen rather than introducing the defvar - but I'm happy to defer to your preference on that.

This revision is now accepted and ready to land.Aug 14 2023, 7:20 AM
wangpc updated this revision to Diff 550186.Aug 14 2023, 9:01 PM

list out all alignments.

wangpc edited the summary of this revision. (Show Details)Aug 14 2023, 9:03 PM
This revision was landed with ongoing or failed builds.Aug 14 2023, 9:05 PM
This revision was automatically updated to reflect the committed changes.