This is an archive of the discontinued LLVM Phabricator instance.

[NFC][RISCV] Enable TuneNoDefaultUnroll feature to control targets which use default unroll preference
ClosedPublic

Authored by zixuan-wu on May 16 2022, 8:57 PM.

Details

Summary

In RISCVTargetTransformInfo, enumerating the processor family is not a good way to predict. Because it needs to enumerate many subtarget family and is hard to update if add new subtarget. Instead, create a feature to distinguish whether targets want to use default unroll preference or not.

Keep TuneSiFive7 because it's flag to indicate subtarget family, which may used in other place.

Diff Detail

Event Timeline

zixuan-wu created this revision.May 16 2022, 8:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 8:57 PM
zixuan-wu requested review of this revision.May 16 2022, 8:57 PM
zixuan-wu retitled this revision from [NFC][RISCV] Enable FeatureNoDefaultUnroll feature to control targets use default unroll preference to [NFC][RISCV] Enable FeatureNoDefaultUnroll feature to control targets which use default unroll preference.May 16 2022, 8:57 PM
craig.topper added inline comments.May 16 2022, 11:26 PM
llvm/lib/Target/RISCV/RISCV.td
337

Can you put this near the TuneSiFive7 flag and name it TuneNoDefaultUnroll.

zixuan-wu edited the summary of this revision. (Show Details)

Address comments to change feature name.

craig.topper added inline comments.May 17 2022, 10:55 AM
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
356

"explicit targets" no longer makes sense here since you removed the flag and inverted the comment.

356

Oops I mean. "explicit targets" no longer makes sense here since you added the flag and inverted the comment.

This revision is now accepted and ready to land.May 17 2022, 1:49 PM
zixuan-wu retitled this revision from [NFC][RISCV] Enable FeatureNoDefaultUnroll feature to control targets which use default unroll preference to [NFC][RISCV] Enable TuneNoDefaultUnroll feature to control targets which use default unroll preference.May 17 2022, 7:06 PM
zixuan-wu updated this revision to Diff 430279.May 18 2022, 1:57 AM
zixuan-wu marked an inline comment as done.
This revision was landed with ongoing or failed builds.May 18 2022, 9:22 PM
This revision was automatically updated to reflect the committed changes.