================ @@ -14156,6 +14157,84 @@ CodeGenFunction::EmitAArch64CpuSupports(ArrayRef<StringRef> FeaturesStrs) { return Result; } +llvm::SmallVector<llvm::Value *> +CodeGenFunction::EmitRISCVExtSupports(ArrayRef<StringRef> FeaturesStrs) { + auto BaseExtReqs = llvm::RISCV::getBaseExtensionKey(FeaturesStrs); + auto IMACompatibleExtReqs = + llvm::RISCV::getIMACompatibleExtensionKey(FeaturesStrs); + + // check whether all FeatureStrs are available for hwprobe. + llvm::SmallVector<StringRef> UnsupportByHwprobe; + llvm::StringSet<> ImpliedExtBySupportExt; + for (unsigned Idx = 0; Idx < FeaturesStrs.size(); Idx++) { + if (BaseExtReqs[Idx] == 0 && IMACompatibleExtReqs[Idx] == 0) + UnsupportByHwprobe.push_back(FeaturesStrs[Idx]); + else + ImpliedExtBySupportExt.insert(FeaturesStrs[Idx].str()); + } + + // Repeatly find ImpliedExts until no longer found new. ---------------- topperc wrote:
found -> find https://github.com/llvm/llvm-project/pull/85786 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits