[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
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.

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
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; //

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-23 Thread Erich Keane via Phabricator via cfe-commits
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?

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-21 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-21 Thread Johannes Doerfert via Phabricator via cfe-commits
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]]

[PATCH] D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value

2020-01-19 Thread Roman Lebedev via Phabricator via cfe-commits
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