This is an archive of the discontinued LLVM Phabricator instance.

[WIP][RISCV] Make all floating-point instructions SEW-aware
Changes PlannedPublic

Authored by wangpc on Jun 15 2023, 1:17 AM.

Details

Summary

For different macroarchtectures, the cost of half, single and double
precision floating-point instructions are different.

So here we make all floating-point arithmetic instructions SEW-aware.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 1:17 AM
pcwang-thead requested review of this revision.Jun 15 2023, 1:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 1:17 AM
wangpc commandeered this revision.Jun 15 2023, 9:06 AM
wangpc added a reviewer: pcwang-thead.
wangpc removed a reviewer: pcwang-thead.

(@wangpc asked me to disable the account @pcwang-thead which is now unused.

Note: an account can be associated with multiple email addresses and the username can be changed (all occurrences in comments will be updated).
So in this situation @pcwang-thead could have been renamed. However, since now @wangpc has associated with the new preferred email address, the email address cannot be added back to @pcwang-thead...
)

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
1897

What do you think about making sew a mandatory argument instead of using sew=0 as "don't account for sew". The scheduler models can always assign the same properties for different sew if the microarchitecture performance does not depend on sew.

I don't think we use sew=0 anywhere else and it may be simpler to keep it that way.

michaelmaitland accepted this revision.Jun 29 2023, 12:53 PM

I take it back, I think we do use this approach of "optional sew" argument.

This revision is now accepted and ready to land.Jun 29 2023, 12:53 PM
wangpc planned changes to this revision.Jun 29 2023, 8:05 PM

I take it back, I think we do use this approach of "optional sew" argument.

Thanks. There are still some issues in RISCVInstrInfo.cpp to fix, I will finish it later.