[clang] [clang][RISCV] Enable RVV with function attribute __attribute__((target("arch=+v"))) (PR #83674)
Brandon Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 07:41:17 PDT 2024
================
@@ -8927,8 +8927,13 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
}
}
- if (T->isRVVSizelessBuiltinType())
- checkRVVTypeSupport(T, NewVD->getLocation(), cast<Decl>(CurContext));
+ if (T->isRVVSizelessBuiltinType() && isa<FunctionDecl>(CurContext)) {
+ const FunctionDecl *FD = cast<FunctionDecl>(CurContext);
+ llvm::StringMap<bool> CallerFeatureMap;
+ Context.getFunctionFeatureMap(CallerFeatureMap, FD);
----------------
4vtomat wrote:
Yes, it does.
With 100k RVV type declarations,
This pr's compile time is approximately 8 times slower than original one.(0.56 seconds vs 0.07 seconds on the server)
https://github.com/llvm/llvm-project/pull/83674
More information about the cfe-commits
mailing list