[all-commits] [llvm/llvm-project] 32a1ae: [BOLT][AArch64] Implement PLTCall optimization

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Tue Jun 4 02:24:41 PDT 2024


  Branch: refs/heads/users/paschalis-mpeis/bolt-plt-call-opt
  Home:   https://github.com/llvm/llvm-project
  Commit: 32a1ae3a5348e54c965b2e121de873628b331281
      https://github.com/llvm/llvm-project/commit/32a1ae3a5348e54c965b2e121de873628b331281
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/lib/Passes/PLTCall.cpp
    M bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp
    A bolt/test/AArch64/plt-call.test
    A bolt/test/Inputs/plt-tailcall.c

  Log Message:
  -----------
  [BOLT][AArch64] Implement PLTCall optimization

`convertCallToIndirectCall` applies the PLTCall optimization and returns
an (updated if needed) iterator to the converted call instruction.
Since AArch64 requires to inject additional instructions to implement this
pass, the relevant BasicBlock and an iterator was passed to the
`convertCallToIndirectCall`.

`NumCallsOptimized` is updated only on successful application of the pass.

Tests:
- Inputs/plt-tailcall.c: an example of a tail call optimized PLT call.
- AArch64/plt-call.test: it is the actual A64 test, that runs the PLTCall
  optimization on the above input file and verifies the application of
  the pass to the calls: 'printf' and 'puts'.


  Commit: 00c641f3d2b09487c022f9ee3a040b0230a71abf
      https://github.com/llvm/llvm-project/commit/00c641f3d2b09487c022f9ee3a040b0230a71abf
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/lib/Passes/PLTCall.cpp
    M bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp
    M bolt/test/AArch64/plt-call.test
    A bolt/test/X86/plt-call.test

  Log Message:
  -----------
  Refactored convertCallToIndirectCall to createIndirectPltCall

createIndirectPltCall now returns a list of instructions. All
BinaryBasicBlock-related logic is now on PLTCall pass.

Added the same test for x86, to ensure nothing breaks on that backend.


  Commit: c5cfed018d1fa82c6ed12fbfc3162cc7306f7966
      https://github.com/llvm/llvm-project/commit/c5cfed018d1fa82c6ed12fbfc3162cc7306f7966
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M bolt/lib/Passes/PLTCall.cpp

  Log Message:
  -----------
  Addressing reviewers


Compare: https://github.com/llvm/llvm-project/compare/44fa7e1b1b84...c5cfed018d1f

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list