This revision was automatically updated to reflect the committed changes.
Closed by commit rL337041: CodeGen: specify alignment + inbounds for automatic
variable initialization (authored by jfb, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.o
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/CodeGen/CGBuilder.h:260
+CharUnits::fromQuantity(Offset.getSExtValue(;
+ }
+
jfb wrote:
> efriedma
jfb marked an inline comment as done.
jfb added inline comments.
Comment at: lib/CodeGen/CGBuilder.h:260
+CharUnits::fromQuantity(Offset.getSExtValue(;
+ }
+
efriedma wrote:
> Not sure about the new helper. We already have Create
jfb updated this revision to Diff 155424.
jfb added a comment.
- Simplify CreateStore.
Repository:
rC Clang
https://reviews.llvm.org/D49209
Files:
lib/CodeGen/CGBuilder.h
lib/CodeGen/CGDecl.cpp
test/CodeGen/init.c
test/CodeGenOpenCL/partial_initializer.cl
Index: test/CodeGenOpenCL/p
efriedma added inline comments.
Comment at: lib/CodeGen/CGBuilder.h:260
+CharUnits::fromQuantity(Offset.getSExtValue(;
+ }
+
Not sure about the new helper. We already have CreateStructGEP and
CreateConstArrayGEP which do approxi
jfb updated this revision to Diff 155287.
jfb added a comment.
- Fix silly naming and lookup.
Repository:
rC Clang
https://reviews.llvm.org/D49209
Files:
lib/CodeGen/CGBuilder.h
lib/CodeGen/CGDecl.cpp
test/CodeGen/init.c
test/CodeGenOpenCL/partial_initializer.cl
Index: test/CodeGenO
jfb added a comment.
I updated the patch to use `Address`, and also use `inbounds`. This was a bit
tricky because of the GEPs. I also updated tests which run into this codegen.
Only the following tests actually hit this code, and not all check these stores:
Clang :: CodeGen/2004-03-09-LargeAr
jfb updated this revision to Diff 155285.
jfb marked an inline comment as done.
jfb added a comment.
- Use Address as suggested in review.
Repository:
rC Clang
https://reviews.llvm.org/D49209
Files:
lib/CodeGen/CGBuilder.h
lib/CodeGen/CGDecl.cpp
test/CodeGen/init.c
test/CodeGenOpenCL
efriedma added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:902
+Builder.CreateAlignedStore(
+Init, Loc, Loc->getPointerAlignment(CGM.getDataLayout()), isVolatile);
return;
llvm::Value::getPointerAlignment is not the right way to compute t
jfb created this revision.
Herald added subscribers: cfe-commits, dexonsmith.
Automatic variable initialization was generating default-aligned stores (which
are deprecated) instead of using the known alignment from the alloca.
Repository:
rC Clang
https://reviews.llvm.org/D49209
Files:
li
10 matches
Mail list logo