[PATCH] D159480: [Clang][AArch64] Fine-grained ldp and stp policies.

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 10 03:21:58 PDT 2023


dmgreen added a comment.

We do not usually add front-end clang options for optimizations like this. Users are more likely to use them incorrectly, or just not know that they exist. The usual method would be to make a subtarget tuning feature that controls whether ldp are created, and enable it for -mcpu=ampere1.

Having an internal llvm option for it (-mllvm -aarch64-stp-policy=never) sounds fine, but should be considered an internal option. And adding a subtarget feature would make sense to have this be used from ampere1. If you get the option committed to GCC then it might be OK for clang too, but I would suggest splitting this into a patch for the backend part and another for the frontend option in either case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159480



More information about the cfe-commits mailing list