This revision was automatically updated to reflect the committed changes.
Closed by commit rGe819f7c9feb4: [Codegen] If reasonable, materialize
clangs `AssumeAlignedAttr` as llvms… (authored by lebedev.ri).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
lebedev.ri updated this revision to Diff 239958.
lebedev.ri added a comment.
Rebased, NFC.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73005/new/
https://reviews.llvm.org/D73005
Files:
clang/lib/CodeGen/CGCall.cpp
lebedev.ri updated this revision to Diff 239928.
lebedev.ri marked 4 inline comments as done.
lebedev.ri added a comment.
Init `Alignment` to `nullptr` by default.
While there, tune `maybeRaiseRetAlignmentAttribute()` to do nothing
if new alignment is not greater than the existing alignment.
lebedev.ri added a comment.
Thank you for the review!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73005/new/
https://reviews.llvm.org/D73005
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
lebedev.ri marked 5 inline comments as done.
lebedev.ri added a comment.
Thank you for taking a look!
Comment at: clang/lib/CodeGen/CGCall.cpp:3836
+
+ llvm::Value *Alignment;// May or may not be a constant.
+ llvm::ConstantInt *OffsetCI = nullptr; //
erichkeane added inline comments.
Comment at: clang/lib/CodeGen/CGCall.cpp:3836
+
+ llvm::Value *Alignment;// May or may not be a constant.
+ llvm::ConstantInt *OffsetCI = nullptr; // Constant, hopefully zero.
Does this need an initial value?
lebedev.ri marked 2 inline comments as done.
lebedev.ri added inline comments.
Comment at: clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c:12
// CHECK-NEXT:[[MASKCOND:%.*]] = icmp eq i64 [[MASKEDPTR]], 0
// CHECK-NEXT:call void @llvm.assume(i1
jdoerfert added inline comments.
Comment at: clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c:12
// CHECK-NEXT:[[MASKCOND:%.*]] = icmp eq i64 [[MASKEDPTR]], 0
// CHECK-NEXT:call void @llvm.assume(i1 [[MASKCOND]])
// CHECK-NEXT:ret i8* [[CALL]]
lebedev.ri created this revision.
lebedev.ri added reviewers: erichkeane, jdoerfert, hfinkel, aaron.ballman,
rsmith.
lebedev.ri added a project: clang.
lebedev.ri added a child revision: D73006: [Codegen] If reasonable, materialize
clang's `AllocAlignAttr` as llvm's Alignment Attribute on