diff options
author | Alexis Perry-Holby <AlexisPerry@users.noreply.github.com> | 2024-07-16 09:48:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-16 16:48:24 +0100 |
commit | f1d3fe7aae7867b5de96b84d6d26b5c9f02f209a (patch) | |
tree | 169ba28f1ef73acdfa79ccdcb1106ad470897d37 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 266a784cce959d475d3d79a877f0c5f39194a4c4 (diff) | |
download | llvm-f1d3fe7aae7867b5de96b84d6d26b5c9f02f209a.zip llvm-f1d3fe7aae7867b5de96b84d6d26b5c9f02f209a.tar.gz llvm-f1d3fe7aae7867b5de96b84d6d26b5c9f02f209a.tar.bz2 |
Add basic -mtune support (#98517)
Initial implementation for the -mtune flag in Flang.
This PR is a clean version of PR #96688, which is a re-land of PR #95043
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 37b5070..8c892d9 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -431,6 +431,10 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { args.getLastArg(clang::driver::options::OPT_target_cpu)) opts.cpu = a->getValue(); + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_tune_cpu)) + opts.cpuToTuneFor = a->getValue(); + for (const llvm::opt::Arg *currentArg : args.filtered(clang::driver::options::OPT_target_feature)) opts.featuresAsWritten.emplace_back(currentArg->getValue()); |