[flang] [clang] [flang]Add support for -moutline-atomics and -mno-outline-atomics (PR #78755)
Kiran Chandramohan via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 31 07:17:05 PST 2024
================
@@ -402,6 +402,21 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) {
for (const llvm::opt::Arg *currentArg :
args.filtered(clang::driver::options::OPT_target_feature))
opts.featuresAsWritten.emplace_back(currentArg->getValue());
+
+ llvm::Triple targetTriple{llvm::Triple(opts.triple)};
+ if (const llvm::opt::Arg *A =
+ args.getLastArg(clang::driver::options::OPT_moutline_atomics,
+ clang::driver::options::OPT_mno_outline_atomics)) {
+ // Option -moutline-atomics supported for AArch64 target only.
+ if (targetTriple.isAArch64()) {
+ if (A->getOption().matches(
+ clang::driver::options::OPT_moutline_atomics)) {
+ opts.featuresAsWritten.push_back("+outline-atomics");
+ } else {
+ opts.featuresAsWritten.push_back("-outline-atomics");
+ }
+ }
+ }
----------------
kiranchandramohan wrote:
Is this required? I did not see a corresponding change in Clang frontend driver.
https://github.com/llvm/llvm-project/pull/78755
More information about the cfe-commits
mailing list