[all-commits] [llvm/llvm-project] bb0b23: [InstCombineCalls] Optimize call of bitcast even w...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Mon Mar 28 18:58:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb0b23174e4ab963df427393fbf21bddede499bf
      https://github.com/llvm/llvm-project/commit/bb0b23174e4ab963df427393fbf21bddede499bf
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M llvm/include/llvm/IR/Attributes.h
    M llvm/lib/IR/Attributes.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/call-cast-attrs.ll

  Log Message:
  -----------
  [InstCombineCalls] Optimize call of bitcast even w/ parameter attributes

Before we gave up if a call through bitcast had parameter attributes.
Interestingly, we allowed attributes for the return value already. We
now handle both the same way, namely, we drop the ones that are
incompatible with the new type and keep the rest. This cannot cause
"more UB" than initially present.

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


  Commit: 7df2eba7fac2281498092dedea67d85d4f7ecfd5
      https://github.com/llvm/llvm-project/commit/7df2eba7fac2281498092dedea67d85d4f7ecfd5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M llvm/include/llvm/IR/Assumptions.h
    M llvm/lib/IR/Assumptions.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    A llvm/test/Transforms/Attributor/reachability.ll
    M openmp/libomptarget/DeviceRTL/include/Types.h

  Log Message:
  -----------
  [Attributor][OpenMP] Add assumption for non-call assembly instructions

Inline assembly is scary but we need to support it for the OpenMP GPU
device runtime. The new assumption expresses the fact that it may not
have call semantics, that is, it will not call another function but
simply perform an operation or side-effect. This is important for
reachability in the presence of inline assembly.

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


Compare: https://github.com/llvm/llvm-project/compare/662b9fa02ca2...7df2eba7fac2


More information about the All-commits mailing list