Depends on D143657
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/AST/Type.h | ||
---|---|---|
7209 ↗ | (On Diff #496185) | This function is RVV specific so it's name is misleading. It's also identical to the isRVVFloat32Type function |
clang/include/clang/Basic/TargetInfo.h | ||
668 ↗ | (On Diff #496185) | Having a different virtual method for each type doesn't scale well. Could we have a single function that take the bitwidth and a bool for int or FP? It's also very misleading based on the current names to return false for targets like X86 that do support float32 and float64. Overall it might be cleaner to call S.Context.getTargetInfo().hasFeature( from RISCV-V specific code in Sema instead of trying to define a generic interface. |
clang/include/clang/Basic/TargetInfo.h | ||
---|---|---|
668 ↗ | (On Diff #496185) |
This is the base class of TargetInfo, we may add code under x86 to override it. |
clang/lib/Sema/Sema.cpp | ||
---|---|---|
2041–2046 |
If so, we will have something like: if (Ty->isRVVInt64Type() && !Context.getTargetInfo().hasFeature("zve64x")) { Diag(Loc, diag::err_riscv_type_requires_extension, FD) << Ty << "zve64x"; } I don't have a preference here, if this matches your expectation, I will update the revision this way. |
clang/lib/Sema/Sema.cpp | ||
---|---|---|
2041–2046 | I'm ok with what you did the Zvfh patch. |
If so, we will have something like:
I don't have a preference here, if this matches your expectation, I will update the revision this way.