[all-commits] [llvm/llvm-project] 360df8: [StackFrameLayoutAnalysis] Use target-specific hoo...
Hari Limaye via All-commits
all-commits at lists.llvm.org
Mon Jul 29 23:34:34 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 360df814b029fc6647672bd3a38ab7a888d073eb
https://github.com/llvm/llvm-project/commit/360df814b029fc6647672bd3a38ab7a888d073eb
Author: Hari Limaye <hari.limaye at arm.com>
Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths:
M llvm/include/llvm/CodeGen/TargetFrameLowering.h
M llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
M llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
M llvm/lib/Target/AArch64/AArch64FrameLowering.h
M llvm/test/CodeGen/AArch64/sve-stack-frame-layout.ll
Log Message:
-----------
[StackFrameLayoutAnalysis] Use target-specific hook for SP offsets (#100386)
StackFrameLayoutAnalysis currently calculates SP-relative offsets in a
target-independent way via MachineFrameInfo offsets. This is incorrect
for some Targets, e.g. AArch64, when there are scalable vector stack
slots.
This patch adds a virtual function to TargetFrameLowering to provide
offsets from SP, with a default implementation matching what is
currently used in StackFrameLayoutAnalysis, and refactors
StackFrameLayoutAnalysis to use this function. Only non-zero scalable
offsets are output by the analysis pass.
An implementation of this function is added for AArch64 targets, which
aims to provide correct SP offsets in most cases.
(cherry picked from commit dc1c00f6b13f724154f9883990f8b21fb8dcccef)
Commit: b3a73a1559317019b9c5eb01f19af78bffd48dbe
https://github.com/llvm/llvm-project/commit/b3a73a1559317019b9c5eb01f19af78bffd48dbe
Author: Hari Limaye <hari.limaye at arm.com>
Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths:
M llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
M llvm/test/CodeGen/AArch64/sve-stack-frame-layout.ll
M llvm/test/CodeGen/X86/stack-frame-layout-remarks.ll
Log Message:
-----------
[StackFrameLayoutAnalysis] Support more SlotTypes (#100562)
Add new SlotTypes to StackFrameLayoutAnalysis to disambiguate Fixed and
Variable-Sized stack slots from Variable slots. As Offsets are
unreliable for VLA-area objects, sort these to the end of the list -
using the Frame Index to ensure a deterministic order when Offsets are
equal.
(cherry picked from commit e31794f99d72dd764c4bc5c5583a0a4c89df22c3)
Compare: https://github.com/llvm/llvm-project/compare/a8b7c809ee20...b3a73a155931
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