[llvm-dev] Optimizing pass-by-value structs for le64 target

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 4 01:50:47 PDT 2019


Hi Eric,

On Thu, 4 Jul 2019 at 00:10, Eric Hein via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> We're writing our own LLVM backend for a new architecture, we started with the generic little-endian 64-bit target (le64) and made customizations from there. What needs to be done to re-enable this optimization for our target?

This particular detail is down to ABI handling in
lib/CodeGen/TargetInfo.cpp. There each target has code to decide how a
given C or C++ type gets mapped to LLVM IR at function call
boundaries. The main purpose is of course to follow an externally
specified ABI, but as you've discovered there's certain leeway for
performance gains if multiple options are equally valid.

Cheers.

Tim.


More information about the llvm-dev mailing list