[all-commits] [llvm/llvm-project] cb8faa: [CallGraph] Add support for callback call sites

Sergey Dmitriev via All-commits all-commits at lists.llvm.org
Wed Jul 1 13:44:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cb8faaacb52c1c0f0b97379ac0e07a612c04c5ff
      https://github.com/llvm/llvm-project/commit/cb8faaacb52c1c0f0b97379ac0e07a612c04c5ff
  Author: Sergey Dmitriev <serguei.n.dmitriev at intel.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/CallGraph.h
    M llvm/include/llvm/IR/AbstractCallSite.h
    M llvm/lib/Analysis/CallGraph.cpp
    M llvm/lib/Analysis/CallGraphSCCPass.cpp
    M llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp
    M llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    A llvm/test/Analysis/CallGraph/callback-calls.ll
    M llvm/test/Analysis/CallGraph/non-leaf-intrinsics.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
    M llvm/test/Transforms/Attributor/callbacks.ll

  Log Message:
  -----------
  [CallGraph] Add support for callback call sites

Summary:
This patch changes call graph analysis to recognize callback call sites
and add an artificial 'reference' call record from the broker function
caller to the callback function in the call graph. A presence of such
reference enforces bottom-up traversal order for callback functions in
CG SCC pass manager because callback function logically becomes a callee
of the broker function caller.

Reviewers: jdoerfert, hfinkel, sstefan1, baziotis

Reviewed By: jdoerfert

Subscribers: hiraditya, kuter, sstefan1, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list