]> granicus.if.org Git - llvm/commit
Add CalledValuePropagation pass
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 25 Oct 2017 13:40:08 +0000 (13:40 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 25 Oct 2017 13:40:08 +0000 (13:40 +0000)
commit7d6a3b6798102bae358f91baf9e6b44ab796332b
treeb971d9576b486daf900c48d792eb1f3c8d82b150
parent1a04abaeee1d2af1197e395e975d8c2b7a1bdeab
Add CalledValuePropagation pass

This patch adds a new pass for attaching !callees metadata to indirect call
sites. The pass propagates values to call sites by performing an IPSCCP-like
analysis using the generic sparse propagation solver. For indirect call sites
having a small set of possible callees, the attached metadata indicates what
those callees are. The metadata can be used to facilitate optimizations like
intersecting the function attributes of the possible callees, refining the call
graph, performing indirect call promotion, etc.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316576 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/llvm-c/Transforms/IPO.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/IPO.h
include/llvm/Transforms/IPO/CalledValuePropagation.h [new file with mode: 0644]
lib/Passes/PassBuilder.cpp
lib/Passes/PassRegistry.def
lib/Transforms/IPO/CMakeLists.txt
lib/Transforms/IPO/CalledValuePropagation.cpp [new file with mode: 0644]
lib/Transforms/IPO/IPO.cpp
lib/Transforms/IPO/PassManagerBuilder.cpp
test/Other/new-pm-defaults.ll
test/Other/new-pm-lto-defaults.ll
test/Other/new-pm-thinlto-defaults.ll
test/Transforms/CalledValuePropagation/simple-arguments.ll [new file with mode: 0644]
test/Transforms/CalledValuePropagation/simple-memory.ll [new file with mode: 0644]
test/Transforms/CalledValuePropagation/simple-select.ll [new file with mode: 0644]