[all-commits] [llvm/llvm-project] 84e2fd: [PowerPC] Add a pass to merge all of the constant ...

stefanp-ibm via All-commits all-commits at lists.llvm.org
Thu Sep 7 08:15:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84e2fd7ee4a9bf76834151a802245bd0b6de8fd0
      https://github.com/llvm/llvm-project/commit/84e2fd7ee4a9bf76834151a802245bd0b6de8fd0
  Author: Stefan Pintilie <stefanp at ca.ibm.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/CMakeLists.txt
    M llvm/lib/Target/PowerPC/PPC.h
    A llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
    M llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
    M llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll
    A llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
    A llvm/test/CodeGen/PowerPC/mergeable-string-pool-pass-only.mir
    A llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll

  Log Message:
  -----------
  [PowerPC] Add a pass to merge all of the constant global arrays into one pool.

On PowerPC the number of TOC entries must be kept low for large
applications. In order to reduce the number of constant global arrays
we can pool them into one structure and then access them as the base
address of that structure plus some offset. The constant global arrays
may be arrays of `i8` which are constant strings but they may also be
arrays of `i32, i64, etc...`.

Reviewed By: lei, amyk

Differential Revision: https://reviews.llvm.org/D155730




More information about the All-commits mailing list