This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move RISCV::RVVBitsPerBlock to be a static member of RISCVISAInfo class.
AbandonedPublic

Authored by craig.topper on May 1 2023, 11:57 AM.

Details

Summary

This constant is used by clang and llvm so needs to be shared.

It can't be in RISCVTargetParser.h where it is today because that
file depends on a tablegen output.

I don't want to create a new header file so I figured RISCVISAInfo.h
could be a new home for it.

lld imports RISCVISAInfo.h and lld has a class named llvm::RISCV.
So we can't expose the llvm::RISCV namespace to lld.

Thus this patch to put it inside the RISCVISAInfo class.

Note that in order to support VLEN=32 with vscale we will need to make
RVVBitsPerBlock a dynamic value based on Zve32* vs Zve64*/V being
enabled. So at that point it would probably need to be queried from
RISCVISAInfo anyway.

Diff Detail

Event Timeline

craig.topper created this revision.May 1 2023, 11:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 11:57 AM
craig.topper requested review of this revision.May 1 2023, 11:57 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 1 2023, 11:57 AM
craig.topper edited the summary of this revision. (Show Details)May 1 2023, 12:00 PM
craig.topper abandoned this revision.May 1 2023, 1:01 PM

fa42e7b made this unnecessary.