[all-commits] [llvm/llvm-project] ca051a: InstCombineCalls: infer return alignment from allo...

Augie Fackler via All-commits all-commits at lists.llvm.org
Thu Apr 7 09:38:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ca051a46fbba869d3ac2c76509623a13ede70f5e
      https://github.com/llvm/llvm-project/commit/ca051a46fbba869d3ac2c76509623a13ede70f5e
  Author: Augie Fackler <augie at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    A llvm/test/Transforms/InstCombine/InferAlignAttribute.ll

  Log Message:
  -----------
  InstCombineCalls: infer return alignment from allocalign attributes

This exposes a couple of lingering bugs, which will be fixed in
the next two commits.

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


  Commit: 5f09498a11c0bfef97dc78ebe2b0de4f4f73c5de
      https://github.com/llvm/llvm-project/commit/5f09498a11c0bfef97dc78ebe2b0de4f4f73c5de
  Author: Augie Fackler <augie at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/test/Transforms/InstCombine/InferAlignAttribute.ll

  Log Message:
  -----------
  MemoryBuiltins: also check function definition for allocalign

This got changed to use hasAttrSomewhere() during review, and I didn't
notice until today when I was writing some tests for another part of
this system that using hasAttrSomewhere only checked the callsite for
allocalign, rather than both the callsite and the definition. This fixes
that by introducing a helper method.

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


  Commit: f120be6c86dfc7a3b0978ae8765076acec1ea0b3
      https://github.com/llvm/llvm-project/commit/f120be6c86dfc7a3b0978ae8765076acec1ea0b3
  Author: Augie Fackler <augie at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/InferAlignAttribute.ll

  Log Message:
  -----------
  InstCombineCalls: when adding an align attribute, never reduce it

Sometimes we can infer an align from an allocalign but the function
already promised it'd be more-aligned than the allocalign and there's an
existing align that we shouldn't reduce. Make sure we handle that
correctly.

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


  Commit: b916414096ad6a95d0da44d188f42e48dc469e0e
      https://github.com/llvm/llvm-project/commit/b916414096ad6a95d0da44d188f42e48dc469e0e
  Author: Augie Fackler <augie at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
    M llvm/test/Transforms/InferFunctionAttrs/annotate.ll

  Log Message:
  -----------
  BuildLibCalls: also set allocsize() attributes

This is part of being able to get rid of two more columns in
MemoryBuiltins.cpp's large table. We'll have two more changes before
we can finish the job.

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


  Commit: d6a7da5ae3a2b2bef395a60af10623aa958d97e6
      https://github.com/llvm/llvm-project/commit/d6a7da5ae3a2b2bef395a60af10623aa958d97e6
  Author: Augie Fackler <augie at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/lib/Analysis/MemoryBuiltins.cpp

  Log Message:
  -----------
  MemoryBuiltins: only claim an allocator family on builtin functions

This lines up with other parts of the codebase that only use special
knowledge about allocator functions if they're builtins.

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


Compare: https://github.com/llvm/llvm-project/compare/2edd903c0533...d6a7da5ae3a2


More information about the All-commits mailing list