Skip to content

Commit

Permalink
[SparsePropagation] Enable interprocedural analysis
Browse files Browse the repository at this point in the history
This patch adds the ability to perform IPSCCP-like interprocedural analysis to
the generic sparse propagation solver. The patch gives clients the ability to
define their own custom LatticeKey types that the generic solver maps to custom
LatticeVal types. The custom lattice keys can be used, for example, to
distinguish among mappings for regular values, values returned from functions,
and values stored in global variables. Clients are responsible for defining how
to convert between LatticeKeys and LLVM Values by providing a specialization of
the LatticeKeyInfo template.

The added unit tests demonstrate how the generic solver can be used to perform
a simplified version of interprocedural constant propagation.

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

llvm-svn: 315919
  • Loading branch information
mssimpso committed Oct 16, 2017
1 parent e1b7b95 commit 28799a2
Show file tree
Hide file tree
Showing 3 changed files with 702 additions and 131 deletions.

0 comments on commit 28799a2

Please sign in to comment.