[all-commits] [llvm/llvm-project] a9b03d: [Attributor] Remove function pointer restriction f...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Mar 7 01:03:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9b03d9e2e3888ad08f9f0294c6e6bec43d7c884
      https://github.com/llvm/llvm-project/commit/a9b03d9e2e3888ad08f9f0294c6e6bec43d7c884
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M llvm/lib/IR/Value.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor] Remove function pointer restriction for AAAlign

This check is not compatible with opaque pointers. We can avoid
it by adjusting the getPointerAlignment() implementation to avoid
creating unnecessary ptrtoint expressions for bitcasted pointers.
The code already uses OnlyIfReduced to not create an expression
if it does not simplify, and this makes sure that folding a
bitcast and ptrtoint into a ptrtoint doesn't count as a
simplification.

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




More information about the All-commits mailing list