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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 19 09:54:13 PST 2020


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 parent revision: D73005: [Codegen] If reasonable, materialize clang's `AssumeAlignedAttr` as llvm's Alignment Attribute on call-site function return value.

Much like with the previous patch (D73005 <https://reviews.llvm.org/D73005>) with `AssumeAlignedAttr`
handling, results in mildly more readable IR,
and will improve test coverage in upcoming patch.

Note that in `AllocAlignAttr`'s case, there is no requirement
for that alignment parameter to end up being an I-C-E.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73006

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
  clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73006.238999.patch
Type: text/x-patch
Size: 7221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200119/262ac0ba/attachment.bin>


More information about the cfe-commits mailing list