[PATCH] D77984: Make IRBuilder automatically set alignment on load/store/alloca.
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 09:07:02 PDT 2020
jdoerfert added a comment.
I think this is fine. Two comments to consider below.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:1600
+ return CreateAlignedLoad(Ty, Ptr, DL.getABITypeAlign(Ty), isVolatile, Name);
}
----------------
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.
================
Comment at: llvm/include/llvm/IR/IRBuilder.h:1622
+ return CreateAlignedStore(Val, Ptr, StoreAlign, isVolatile);
}
----------------
Same as for the load.
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