[PATCH] D143665: [Clang][RISCV] Guard vector int64, float32, float64 with semantic analysis

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 9 17:39:40 PST 2023


eopXD added inline comments.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:668
+  /// Determine whether vector int64 type is supported on this target.
+  virtual bool hasVectorInt64Support() const { return false; }
+
----------------
craig.topper wrote:
> 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.
> It's also very misleading based on the current names to return false for targets like X86 that do support float32 and float64.

This is the base class of TargetInfo, we may add code under x86 to override it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143665/new/

https://reviews.llvm.org/D143665



More information about the cfe-commits mailing list