[PATCH] D89684: [AIX] Add mvecnvol and mnovecnvol options to enable the AIX extended and default vector ABIs.

Digger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 10 08:12:55 PST 2020


DiggerLin added inline comments.


================
Comment at: clang/docs/ClangCommandLineReference.rst:2870
+
+.. option:: -mvecnvol, -mnovecnvol
+
----------------
I think it should be 

```.. option:: -mvecnvol, -mnovecnvol
  Only supported On AIX. Specify usage of volatile and nonvolatile vector registers, the extended vector ABI on AIX. Defaults to '-mnovecnvol' when Altivec is enabled.
```



================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4591
+
+    if (A->getOption().matches(options::OPT_mnovecnvol) && haveMaltivec)
+      D.Diag(diag::err_aix_default_altivec_abi);
----------------
Xiangling_L wrote:
> Since we are defaulting to default altivec ABI, so I think the logic here should be if (HasAltivec && !Args.getLastArg(options::OPT_mvecnvol)), then we emit `D.Diag(diag::err_aix_default_altivec_abi)` error?
I think we do not need a new variable here. we can write as 
if (A->getOption().matches(options::OPT_mnovecnvol)  && Args.getLastArg(OPT_maltivec) 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89684/new/

https://reviews.llvm.org/D89684



More information about the cfe-commits mailing list