Hi.

In my previous patches for the tree-ssa-structalias, I split out the solver
into its own file.  In this series I split out constraint building.

For clarity, I've put all the changes of bodies of functions into the first
patch of this series.  The second patch then purely moves stuff around and
gives external linkage to some functions/variables.

The interface between the main code (tree-ssa-structalias.cc) and the
constraint builder works like this: The main code inits the builder
(init_constraint_builder()) and tells it to build the constraints
({ipa_,intra_}build_constraints()).  The builder gives the constraints to the
main code.  The mapping between trees/gimple and varinfo_t structures
(vi_for_tree and call_stmt_vars hash_maps) is managed by the builder.  The main
code also needs to query this mapping so functions that do that are also part
of the interface (lookup_vi_for_tree, lookup_call_use_vi,
lookup_call_clobber_vi, get_fi_for_callee).  When the main code is finished, it
deallocates the builder stuff (delete_constraint_builder()).

Bootstrapped and regtested on x86_64-linux.  Ok to commit?


Filip Kastl (2):
  tree-ssa-structalias: Put constraint building into separate functions
  tree-ssa-structalias: Put constraint building into its own file

 gcc/Makefile.in                   |    1 +
 gcc/gimple-ssa-pta-constraints.cc | 4184 ++++++++++++++++++++++++++
 gcc/gimple-ssa-pta-constraints.h  |   38 +
 gcc/tree-ssa-structalias.cc       | 4548 ++---------------------------
 gcc/tree-ssa-structalias.h        |   15 +
 5 files changed, 4473 insertions(+), 4313 deletions(-)
 create mode 100644 gcc/gimple-ssa-pta-constraints.cc
 create mode 100644 gcc/gimple-ssa-pta-constraints.h

-- 
2.51.0

Reply via email to