OSDN Git Service

[CallGraph] Ignore callback uses
authorGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Wed, 8 Jul 2020 05:43:24 +0000 (22:43 -0700)
committerGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Thu, 9 Jul 2020 20:13:46 +0000 (13:13 -0700)
commit205dc0922d5f7305226f7457fcbcb4224c92530c
tree7404d8ab0bf82277fcbce72aa50048419c6e006e
parent03640ee0fa73c6eaf8cb12050203027239136789
[CallGraph] Ignore callback uses

Summary:
Ignore callback uses when adding a callback function
in the CallGraph. Callback functions are typically
created when outlining, e.g. for OpenMP, so they have
internal scope and linkage. They should not be added
to the ExternalCallingNode since they are only callable
by the specified caller function at creation time.

A CGSCC pass, such as OpenMPOpt, may need to update
the CallGraph by adding a new outlined callback function.
Without ignoring callback uses, adding breaks CGSCC
pass restrictions and results to a broken CallGraph.

Reviewers: jdoerfert

Subscribers: hiraditya, sstefan1, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83370
llvm/include/llvm/IR/Function.h
llvm/lib/Analysis/CallGraph.cpp
llvm/lib/IR/Function.cpp
llvm/test/Analysis/CallGraph/ignore-callback-uses.ll [new file with mode: 0644]