[all-commits] [llvm/llvm-project] bd87a2: [CGP] Add generic TargetLowering::shouldAlignPoint...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Thu Feb 9 02:14:20 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd87a2449da0c82e63cebdf9c131c54a5472e3a7
https://github.com/llvm/llvm-project/commit/bd87a2449da0c82e63cebdf9c131c54a5472e3a7
Author: Alex Richardson <alexrichardson at google.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/lib/CodeGen/CodeGenPrepare.cpp
M llvm/lib/CodeGen/TargetLoweringBase.cpp
M llvm/lib/Target/ARM/ARMISelLowering.cpp
M llvm/lib/Target/ARM/ARMISelLowering.h
M llvm/test/CodeGen/RISCV/memcpy-inline.ll
M llvm/test/CodeGen/WebAssembly/bulk-memory.ll
M llvm/test/CodeGen/WebAssembly/bulk-memory64.ll
M llvm/test/CodeGen/X86/GlobalISel/x86_64-irtranslator-struct-return.ll
A llvm/test/Transforms/CodeGenPrepare/RISCV/adjust-memintrin-alignment.ll
Log Message:
-----------
[CGP] Add generic TargetLowering::shouldAlignPointerArgs() implementation
This function was added for ARM targets, but aligning global/stack pointer
arguments passed to memcpy/memmove/memset can improve code size and
performance for all targets that don't have fast unaligned accesses.
This adds a generic implementation that adjusts the alignment to pointer
size if unaligned accesses are slow.
Review D134168 suggests that this significantly improves performance on
synthetic benchmarks such as Dhrystone on RV32 as it avoids memcpy() calls.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D134282
More information about the All-commits
mailing list