Polaris: EvolutionGraph.cc File Reference

EvolutionGraph.cc File Reference

Go to the source code of this file.

Functions

const char * node_name (const Symbol *s)
Expressionnode_value (const Symbol *s)
String loop_name (Statement *loop)
static void get_imu (const Symbol &mu, ProgramUnit &pgm, Symbol *&imu, bool &is_defined)
 Find the incoming value for given mu symbol.
static void _add_eg (ProgramUnit *pgm, Statement *loop, EvolutionGraph *eg)
static void _remove_eg (ProgramUnit *pgm, Statement *loop)
static void _remove_egs (ProgramUnit *pgm)
void remove_egs (ProgramUnit &pgm)
 Will not return the range over the whole loop, but for just an iteration.
EvolutionGraph_get_eg (ProgramUnit *pgm, Statement *loop)
static void print_evolutions (map< const Symbol *, map< const Symbol *, Evolution< Expression > > > &evs, const char *type, ostream &o)
static void print_input_values (map< const Symbol *, Evolution< Expression > > &ivs, const char *type, ostream &o)
Expression_eg_forward_substitute (EvolutionGraph *eg, ProgramUnit &pgm, DoStmt *loop, Expression *expr)
static void remove_source (EvolutionGraph::EvolutionMap &em, Symbol *source)
Evolution< Expressionget_translated_evolution (Translator &trans, ProgramUnit &caller, ProgramUnit &callee, Statement &callsite, Evolution< Expression > &original)
static bool has_known_iteration_space (DoStmt &dostmt)
static RangeExpr_range (const Evolution< Expression > &ev)
static Expression_embed_symbolic_range (Expression *range, ProgramUnit &pgm, RangeAccessor *ra, set< Symbol * > &dummies)
static Expression_filter_arrays (Expression *expr, ProgramUnit &pgm, Statement *loop, set< Symbol * > &dummies, RangeAccessor *ra)
 Embeds the tightest known range for array references.
static Expression_filter_arrays (Expression *expr, ProgramUnit &pgm, Statement *loop)
static void _cleanup_map (map< Symbol *, Expression * > &m)
static bool included (Evolution< Expression > &ev1, Evolution< Expression > &ev2, bool complementary, ProgramUnit &pgm, RangeAccessor *ra)
 Returns true if ev1 is included in ev2*complementary.
static bool disjoint (Evolution< Expression > &ev1, Evolution< Expression > &ev2, bool complementary, ProgramUnit &pgm, RangeAccessor *ra)
 Returns true if ev1 may be disjoint from ev2*complementary.
static void print_trace (pair< list< Symbol * >, Evolution< Expression > > &trace)
static bool _incompatible_ranges (const pair< RangeExpr *, bool > &range1, const pair< RangeExpr *, bool > &range2, RangeAccessor &ra)
 Return true only if sure.
void _print_range (const char *sname, const pair< RangeExpr *, bool > &r)

Variables

static SymbolZERO = 0
 BEGIN local constants and simple defs.
static map< ProgramUnit *,
map< Statement *, EvolutionGraph * > > 
_egs
 BEGIN EG repository management.


Function Documentation

const char* node_name const Symbol s  )  [inline]
 

Definition at line 21 of file EvolutionGraph.cc.

References Symbol::name_ref().

Referenced by EvolutionGraph::_compute_cyclic_evolutions(), print_evolutions(), EvolutionGraph::print_graph(), and print_input_values().

Expression* node_value const Symbol s  )  [inline]
 

Definition at line 29 of file EvolutionGraph.cc.

References constant(), and id().

String loop_name Statement loop  )  [inline]
 

Definition at line 37 of file EvolutionGraph.cc.

References DoStmt::get_loop_name(), String::len(), and loop().

Referenced by EvolutionGraph::_compute_cyclic_evolutions(), EvolutionGraph::_p_abort(), and main().

static void get_imu const Symbol mu,
ProgramUnit pgm,
Symbol *&  imu,
bool &  is_defined
[static]
 

Find the incoming value for given mu symbol.

... Formals and commons may be defined for subprograms other ... than the main one. ... silvius: We assume here that the 'remove_data_statements' filter ... was run previously.

Definition at line 52 of file EvolutionGraph.cc.

References Expression::arg_list(), ASSIGNMENT_STMT, find_main_pgm(), gsa_base(), is_defined(), mu(), Expression::parameters_guarded(), program(), Statement::rhs(), Statement::stmt_class(), DefLoc::stmt_guarded(), and DefLoc::stmt_valid().

Referenced by EvolutionGraph::_compute_cyclic_evolutions(), EvolutionGraph::_local_range(), EvolutionGraph::_possible_ranges(), EvolutionGraph::_verify_preconditions(), and EvolutionGraph::perfect_trace_from_mu().

static void _add_eg ProgramUnit pgm,
Statement loop,
EvolutionGraph eg
[static]
 

Definition at line 93 of file EvolutionGraph.cc.

References _egs, and loop().

static void _remove_eg ProgramUnit pgm,
Statement loop
[static]
 

Definition at line 101 of file EvolutionGraph.cc.

References _egs, and loop().

static void _remove_egs ProgramUnit pgm  )  [static]
 

... Remove all.

Definition at line 114 of file EvolutionGraph.cc.

References _egs, and Graph< Node, Edge >::clear().

Referenced by remove_egs().

void remove_egs ProgramUnit pgm  ) 
 

Will not return the range over the whole loop, but for just an iteration.

Will only return a range if input values are the only way to generate 'e'.

Definition at line 141 of file EvolutionGraph.cc.

References _remove_egs().

EvolutionGraph* _get_eg ProgramUnit pgm,
Statement loop
 

Definition at line 145 of file EvolutionGraph.cc.

References _egs, and loop().

static void print_evolutions map< const Symbol *, map< const Symbol *, Evolution< Expression > > > &  evs,
const char *  type,
ostream &  o
[static]
 

Definition at line 427 of file EvolutionGraph.cc.

References node_name().

static void print_input_values map< const Symbol *, Evolution< Expression > > &  ivs,
const char *  type,
ostream &  o
[static]
 

Definition at line 443 of file EvolutionGraph.cc.

References node_name().

Expression* _eg_forward_substitute EvolutionGraph eg,
ProgramUnit pgm,
DoStmt loop,
Expression expr
 

Definition at line 454 of file EvolutionGraph.cc.

References Iterator< T >::current(), referred_symbols(), simplify(), substitute_var(), and Iterator< T >::valid().

Referenced by EvolutionGraph::_add_approximations().

static void remove_source EvolutionGraph::EvolutionMap em,
Symbol source
[static]
 

... Erased them all.

Definition at line 471 of file EvolutionGraph.cc.

Evolution<Expression> get_translated_evolution Translator trans,
ProgramUnit caller,
ProgramUnit callee,
Statement callsite,
Evolution< Expression > &  original
[inline]
 

Definition at line 1143 of file EvolutionGraph.cc.

References can_translate(), Symbol::clone(), evolution(), infinity(), and translate_and_reshape().

Referenced by EvolutionGraph::_add_evolutions().

static bool has_known_iteration_space DoStmt dostmt  )  [static]
 

... Really a WHILE statement, the iteration space is unknown.

... Found no flag assignment before the loop.

Definition at line 1536 of file EvolutionGraph.cc.

References ASSIGNMENT_STMT, ID_OP, INFINITY_OP, LABEL_STMT, Statement::lhs(), Symbol::name_ref(), Expression::op(), Statement::prev_ref(), Listable::prev_ref(), Statement::stmt_class(), and Expression::symbol().

Referenced by EvolutionGraph::_compute_cyclic_evolutions().

static RangeExpr* _range const Evolution< Expression > &  ev  )  [static]
 

Definition at line 2004 of file EvolutionGraph.cc.

References infinity(), and RangeExpr::RangeExpr().

Referenced by EvolutionGraph::_possible_ranges(), and EvolutionGraph::trace_from_input().

static Expression* _embed_symbolic_range Expression range,
ProgramUnit pgm,
RangeAccessor ra,
set< Symbol * > &  dummies
[static]
 

Definition at line 2376 of file EvolutionGraph.cc.

References id(), INTEGER_TYPE, make_type(), NOT_FORMAL, and NOT_SAVED.

Referenced by _filter_arrays().

static Expression* _filter_arrays Expression expr,
ProgramUnit pgm,
Statement loop,
set< Symbol * > &  dummies,
RangeAccessor ra
[static]
 

Embeds the tightest known range for array references.

cerr<<"\nReturn 1";

cerr<<"\nReturn 2";

cerr<<"\nReturn 3: "<<*toret;

cerr<<"\nReturn 4";

cerr<<"\nReturn 5";

Definition at line 2391 of file EvolutionGraph.cc.

References _embed_symbolic_range(), ARRAY_REF_OP, Mutator< T >::assign(), Symbol::common_ref(), e, eg_range_array_1_to_i(), Symbol::formal(), gsa_base(), infinity(), loop(), Expression::op(), Statement::outer_ref(), Mutator< T >::pull(), RANGE_OP, RangeExpr::RangeExpr(), and Iterator< T >::valid().

Referenced by _filter_arrays(), EvolutionGraph::_global_range(), and EvolutionGraph::_global_range_per_iteration().

static Expression* _filter_arrays Expression expr,
ProgramUnit pgm,
Statement loop
[static]
 

cerr<<"\nEnter filter_arrays: "<<*expr;

cerr<<"\n\tLevel 1 before subst:"<<*toret; cerr<<"\nra = "<<*ra;

... Probably some undefined operation such as ( -Inf + Inf ).

cerr<<"\nExit filter_arrays: "<<*toret;

Definition at line 2438 of file EvolutionGraph.cc.

References _filter_arrays(), Symtab::del(), RangeComparator::eliminate_vars(), RangeAccessor::get_range_ref(), infinity(), INFINITY_OP, RefSet< T >::ins(), RangeExpr::lb(), loop(), Statement::next_ref(), OMEGA_OP, Expression::op(), quick_pgm_entry(), RANGE_OP, RangeExpr::RangeExpr(), RangeComparator::symtab(), and RangeExpr::ub().

static void _cleanup_map map< Symbol *, Expression * > &  m  )  [static]
 

Cleanup.

Definition at line 2796 of file EvolutionGraph.cc.

Referenced by EvolutionGraph::min_distance().

static bool included Evolution< Expression > &  ev1,
Evolution< Expression > &  ev2,
bool  complementary,
ProgramUnit pgm,
RangeAccessor ra
[static]
 

Returns true if ev1 is included in ev2*complementary.

cerr<<"\nenter included with "<<ev1<<", "<<ev2<<", and "<<complementary;

cerr<<"\n\treturn true 1";

... Complementary range.

cerr<<"\n\treturn true 2";

cerr<<"\n\treturn true 3";

cerr<<"\n\treturn false";

Definition at line 2954 of file EvolutionGraph.cc.

References add(), constant(), evolution(), included(), infinity(), simplify(), and sub().

static bool disjoint Evolution< Expression > &  ev1,
Evolution< Expression > &  ev2,
bool  complementary,
ProgramUnit pgm,
RangeAccessor ra
[static]
 

Returns true if ev1 may be disjoint from ev2*complementary.

Definition at line 2987 of file EvolutionGraph.cc.

References included().

Referenced by EvolutionGraph::traces_from_mu().

static void print_trace pair< list< Symbol * >, Evolution< Expression > > &  trace  )  [static]
 

Definition at line 2995 of file EvolutionGraph.cc.

static bool _incompatible_ranges const pair< RangeExpr *, bool > &  range1,
const pair< RangeExpr *, bool > &  range2,
RangeAccessor ra
[static]
 

Return true only if sure.

Return false when either compatible or unsure.

... [.......] ... [.......]

... .......] [............... ... [.......]

... [.......] ... .......] [...............

Definition at line 3249 of file EvolutionGraph.cc.

References p_greater_equal(), p_less_equal(), and p_less_than().

Referenced by EvolutionGraph::backtrack(), and EvolutionGraph::trace_from_input().

void _print_range const char *  sname,
const pair< RangeExpr *, bool > &  r
 

Definition at line 177 of file guarded_values.cc.


Variable Documentation

Symbol* ZERO = 0 [static]
 

BEGIN local constants and simple defs.

Definition at line 19 of file EvolutionGraph.cc.

Referenced by EvolutionGraph::_add_evolutions(), and EvolutionGraph::_compact_zero_paths().

map<ProgramUnit*, map<Statement*, EvolutionGraph*> > _egs [static]
 

BEGIN EG repository management.

Definition at line 91 of file EvolutionGraph.cc.

Referenced by _add_eg(), _get_eg(), _remove_eg(), and _remove_egs().

 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:20 2005