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

Manos Anagnostakis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 7 04:35:45 PDT 2023


manosanag created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a reviewer: sscalpone.
Herald added a project: All.
manosanag requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, MaskRay.
Herald added projects: clang, LLVM.

This patch enables fine-grained tuning control for ldp and stp.

It provides two new and concrete command-line options -aarch64-ldp-policy
and -aarch64-stp-policy to give the ability to control load and store
policies seperately with both clang and flang-new frontends including
when using -flto.

The accepted values for both options are:

- default: Use the ldp/stp policy currently used by the compiler (always).
- always: Emit ldp/stp regardless of alignment.
- never: Do not emit ldp/stp.
- aligned: In order to emit ldp/stp, first check if the load/store will be aligned to 2 * element_size.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159480

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/lib/Driver/ToolChains/Flang.cpp
  clang/test/Driver/aarch64-ldp-policy.c
  clang/test/Driver/aarch64-stp-policy.c
  clang/test/Driver/flang/aarch64-ldp-policy.f90
  clang/test/Driver/flang/aarch64-stp-policy.f90
  llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
  llvm/test/CodeGen/AArch64/ldp-aligned.ll
  llvm/test/CodeGen/AArch64/ldp-always.ll
  llvm/test/CodeGen/AArch64/ldp-never.ll
  llvm/test/CodeGen/AArch64/stp-aligned.ll
  llvm/test/CodeGen/AArch64/stp-always.ll
  llvm/test/CodeGen/AArch64/stp-never.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159480.556128.patch
Type: text/x-patch
Size: 36315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230907/145ac56b/attachment-0001.bin>


More information about the cfe-commits mailing list