[all-commits] [llvm/llvm-project] f83ab2: [ARM] Improve generation of thumb stack accesses

john-brawn-arm via All-commits all-commits at lists.llvm.org
Mon Aug 7 09:54:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f83ab2b3beb0303e0775ea187d9575faa4a048eb
      https://github.com/llvm/llvm-project/commit/f83ab2b3beb0303e0775ea187d9575faa4a048eb
  Author: John Brawn <john.brawn at arm.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M llvm/lib/Target/ARM/ThumbRegisterInfo.cpp
    A llvm/test/CodeGen/ARM/execute-only-split-offset.ll
    M llvm/test/CodeGen/ARM/large-stack.ll
    M llvm/test/CodeGen/Thumb/emergency-spill-slot.ll
    M llvm/test/CodeGen/Thumb/stack-access.ll
    M llvm/test/CodeGen/Thumb/stack_guard_remat.ll

  Log Message:
  -----------
  [ARM] Improve generation of thumb stack accesses

Currently when a stack access is out of range of an sp-relative ldr or
str then we jump straight to generating the offset with a literal pool
load or mov32 pseudo-instruction. This patch improves that in two
ways:
 * If the offset is within range of sp-relative add plus an ldr then
   use that.
 * When we use the mov32 pseudo-instruction, if putting part of the
   offset into the ldr will simplify the expansion of the mov32 then
   do so.

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




More information about the All-commits mailing list