[PATCH] D158529: [InferAlignment] Implement InferAlignmentPass
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 12:17:46 PDT 2023
nikic added a reviewer: efriedma.
nikic added a subscriber: efriedma.
nikic added a comment.
@efriedma I'd like to have some feedback on whether the direction here makes sense. The premise is that in the middle-end, we don't care all that much about alignment, and the optimizations that do care about it will try to increase alignment in order to succeed (via getOrEnforceKnownAlignment). As such, instead of inferring alignment ~8 times in the optimization pipeline, do it once towards the end of the pipeline. Do you see any inherent problem with that approach?
================
Comment at: llvm/lib/Transforms/Scalar/InferAlignment.cpp:27
+ const DataLayout &DL, Instruction *I,
+ llvm::function_ref<Align(Value *PtrOp, Align OldAlign, Align PrefAlign)>
+ Fn) {
----------------
Drop `llvm::` prefix.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158529/new/
https://reviews.llvm.org/D158529
More information about the llvm-commits
mailing list