[PATCH] D64008: [RISCV] Avoid save-restore target feature warning

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 2 06:58:16 PST 2021


jrtc27 added a comment.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, sameer.abuasal, s.egerton, MaskRay.

For historical documentation purposes:

I don't think this ever actually fully worked. Whilst it stops passing the feature explicitly here, and thus means no target feature is passed when you don't specify either driver option, -m(no-)save-restore is still in m_riscv_Features_Group and so the later call to handleTargetFeaturesGroup still automatically adds [+-]save-restore if you specify one of the options on the command line, meaning -mno-save-restore still warned in Clang 9 and 10 despite having this patch. Clang 11 stopped warning as the feature was finally implemented by then.

https://godbolt.org/z/Gqv3GG6n4


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64008



More information about the cfe-commits mailing list