aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2025-07-03 13:44:38 -0700
committerGitHub <noreply@github.com>2025-07-03 13:44:38 -0700
commit2aa0f0a3bd541278b04efcc717e7aa94ef4c1308 (patch)
treebad6cb83b2366c8e0ae9e46cd18f4187a460c5f6 /clang/lib/Frontend/CompilerInvocation.cpp
parent3c13257f32f5669510860f5f40851e28270f36b3 (diff)
downloadllvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.zip
llvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.tar.gz
llvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.tar.bz2
[AArch64] Add option -msve-streaming-vector-bits= . (#144611)
This is similar to -msve-vector-bits, but for streaming mode: it constrains the legal values of "vscale", allowing optimizations based on that constraint. This also fixes conversions between SVE vectors and fixed-width vectors in streaming functions with -msve-vector-bits and -msve-streaming-vector-bits. This rejects any use of arm_sve_vector_bits types in streaming functions; if it becomes relevant, we could add arm_sve_streaming_vector_bits types in the future. This doesn't touch the __ARM_FEATURE_SVE_BITS define.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 0a9e364..9b3200b 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -4620,6 +4620,11 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0)
Diags.Report(diag::err_cc1_unbounded_vscale_min);
}
+ if (Arg *A = Args.getLastArg(options::OPT_mvscale_streaming_min_EQ)) {
+ unsigned VScaleMin;
+ if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0)
+ Diags.Report(diag::err_cc1_unbounded_vscale_min);
+ }
if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) {
std::ifstream SeedFile(A->getValue(0));