[all-commits] [llvm/llvm-project] adfc57: [OpenMP][CodeExtractor]Add align metadata to load ...
Dominik Adamski via All-commits
all-commits at lists.llvm.org
Thu Apr 10 00:45:51 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: adfc577895811b5df3935be3b26aec52929afebd
https://github.com/llvm/llvm-project/commit/adfc577895811b5df3935be3b26aec52929afebd
Author: Dominik Adamski <dominik.adamski at amd.com>
Date: 2025-04-10 (Thu, 10 Apr 2025)
Changed paths:
M llvm/lib/Transforms/Utils/CodeExtractor.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
A mlir/test/Target/LLVMIR/omptarget-memcpy-align-metadata.mlir
Log Message:
-----------
[OpenMP][CodeExtractor]Add align metadata to load instructions (#131131)
Moving code to another function can lead to missed optimization
opportunities, because function passes operate on smaller chunks of
code, and they cannot figure out all details.
One example of missed optimization opportunities after code extraction
is information about pointer alignment. The instruction combine pass
adds information about pointer alignment to LLVM intrinsic memcpy calls
if it can deduce it from the code or if align metadata is added. If this
information is not present, then further optimization passes can
generate inefficient code.
If we add align metadata to extracted pointers, then the instruction
combine pass can add the align attribute to the LLVM intrinsic memcpy
call and unblock further optimization.
Scope of changes:
1. Analyze MLIR map operations. Add information about the alignment of
objects that are passed by reference to OpenMP GPU kernels.
2. Propagate alignment information to the outlined by `CodeExtractor`
helper functions.
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