This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add support for the vscale_range attribute.
ClosedPublic

Authored by craig.topper on Dec 12 2022, 12:02 PM.

Details

Summary

This is based on @frasercrmck's D107290. At least some of the clang
portion of D107290 has already been committed.

This uses vscale_range for min/max vector width unless the command
line overrides are used.

As a follow up, I plan to add a max or exact VLEN option to clang
to control the vscale_range. This will eliminate many of the reasons
for users to use the overrides through the -mllvm interface.

Diff Detail

Event Timeline

craig.topper created this revision.Dec 12 2022, 12:02 PM
craig.topper requested review of this revision.Dec 12 2022, 12:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 12:02 PM

Can I request that you separate this into an NFC where you move the command line processing and consistency checks to the new location, and then a separate change which adds the vscale_range merging? I think that would make the change easier to review and understand.

craig.topper edited the summary of this revision. (Show Details)Jan 5 2023, 11:46 AM
reames accepted this revision.Jan 5 2023, 5:08 PM

LGTM

This revision is now accepted and ready to land.Jan 5 2023, 5:08 PM
This revision was automatically updated to reflect the committed changes.
Matt added a subscriber: Matt.Feb 6 2023, 9:12 AM