[PATCH] D77984: Make IRBuilder automatically set alignment on load/store/alloca.
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 10:12:26 PDT 2020
efriedma marked an inline comment as done.
efriedma added inline comments.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:1600
+ return CreateAlignedLoad(Ty, Ptr, DL.getABITypeAlign(Ty), isVolatile, Name);
}
----------------
jdoerfert wrote:
> Can't we just pawn of the alignment stuff to `CreateAlignedLoad`? We cal lit with 0 here and we determine an alignment there anyway?
> Nit: `BB->getModule()` should work.
>
I was thinking we might want to switch CreateAlignedLoad to take an Align instead of a MaybeAlign: I'm not sure there's any good reason to use a MaybeAlign once we clean up the getters on load/store/alloca. But I guess we can do that later, if it turns out to actually be feasible; I'll change it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77984/new/
https://reviews.llvm.org/D77984
More information about the cfe-commits
mailing list