[all-commits] [llvm/llvm-project] 372cb3: [Codegen] Emit both AssumeAlignedAttr and AllocAli...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Jan 21 10:19:23 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 372cb38f4510212f4bd21488b71620775d8d4fc2
      https://github.com/llvm/llvm-project/commit/372cb38f4510212f4bd21488b71620775d8d4fc2
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-01-21 (Tue, 21 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    A clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c

  Log Message:
  -----------
  [Codegen] Emit both AssumeAlignedAttr and AllocAlignAttr assumptions if they exist

Summary:
We shouldn't be just giving up if we find one of them
(like we currently do with `AssumeAlignedAttr`),
we should emit them all.

As the tests show, even if we materialized good knowledge
from `__attribute__((assume_aligned(32)`, it doesn't mean
`__attribute__((alloc_align([...])))` info won't be useful.
It might be, but that isn't given.

Reviewers: erichkeane, jdoerfert, aaron.ballman

Reviewed By: erichkeane

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72979


  Commit: 6b2f820221c78c05527d6edb756b4f1f44665968
      https://github.com/llvm/llvm-project/commit/6b2f820221c78c05527d6edb756b4f1f44665968
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-01-21 (Tue, 21 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp

  Log Message:
  -----------
  [NFC][Codegen] Use MaybeAlign + APInt::getLimitedValue() when creating Alignment attr

Summary: Just an NFC code cleanup i stumbled upon when stumbling through clang alignment attribute handling.

Reviewers: erichkeane, gchatelet, courbet, jdoerfert

Reviewed By: gchatelet

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72993


Compare: https://github.com/llvm/llvm-project/compare/cf263807a6c0...6b2f820221c7


More information about the All-commits mailing list