Page MenuHomePhabricator

[Clang][RISCV] Implement vlseg builtins.
Needs ReviewPublic

Authored by HsiangKai on Mar 30 2021, 6:59 AM.

Details

Summary

Implement vlseg builtins.

Diff Detail

Event Timeline

HsiangKai created this revision.Mar 30 2021, 6:59 AM
HsiangKai requested review of this revision.Mar 30 2021, 6:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2021, 6:59 AM

This is just a suggestion, feel free to ignore: a sequence of Ts was easy to parse for the prototype but may be want to consider something like T3v rather than TTTv. I think it would simplify the TString tblgen class and those std::string(N, 'T').

clang/utils/TableGen/RISCVVEmitter.cpp
594

Was this meant to be static here?

714

We say Tv is invalid, looks like we should check this here and PrintFatalError?

khchen added a subscriber: khchen.Apr 8 2021, 9:16 AM
khchen added inline comments.
clang/utils/TableGen/RISCVVEmitter.cpp
594

Maybe we can create a new complex type transformer (Tuple:Value), so (Tuple:3) means TTTv. It can avoid to use static here. You could ref https://github.com/llvm/llvm-project/blob/main/clang/utils/TableGen/RISCVVEmitter.cpp#L638

HsiangKai updated this revision to Diff 336345.Apr 9 2021, 1:46 AM

Address comments.

HsiangKai marked 3 inline comments as done.Apr 9 2021, 1:49 AM