[all-commits] [llvm/llvm-project] 9c08e7: [Attributor] Introduce AAIndirectCallInfo

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Fri Aug 18 16:45:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c08e76f3e5f2f3e8cb1e3c9fd45827395c712cc
      https://github.com/llvm/llvm-project/commit/9c08e76f3e5f2f3e8cb1e3c9fd45827395c712cc
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/Attributor/callgraph.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M openmp/libomptarget/test/jit/type_punning.c

  Log Message:
  -----------
  [Attributor] Introduce AAIndirectCallInfo

AAIndirectCallInfo will collect information and specialize indirect call
sites. It is similar to our IndirectCallPromotion but runs as part of
the Attributor (so with assumed callee information). It also expands
more calls and let's the rest of the pipeline figure out what is UB, for
now. We use existing call promotion logic to improve the result,
otherwise we rely on the (implicit) function pointer cast.

This effectively "fixes" #60327 as it will undo the type punning early
enough for the inliner to work with the (now specialized, thus direct)
call.

Fixes: https://github.com/llvm/llvm-project/issues/60327




More information about the All-commits mailing list