Polly 20.0.0git
Classes | Functions
isl_scheduler_scc.c File Reference
#include <stdio.h>
#include <isl/ctx.h>
#include <isl/schedule_node.h>
#include <isl/union_set.h>
#include "isl_hash_private.h"
#include "isl_scheduler_scc.h"
#include "isl_sort.h"

Go to the source code of this file.

Classes

struct  isl_scc_graph
 
struct  isl_edge_src
 
struct  isl_extract_dst_data
 
struct  isl_foreach_reachable_data
 
struct  isl_copy_edge_data
 
struct  isl_merge_src_dst_data
 

Functions

static isl_stat print_edge (void **entry, void *user)
 
void isl_scc_graph_dump (struct isl_scc_graph *scc_graph)
 
struct isl_scc_graphisl_scc_graph_free (struct isl_scc_graph *scc_graph)
 
static void * isl_scc_graph_encode_local_index (struct isl_scc_graph *scc_graph, int pos)
 
static int isl_scc_graph_local_index (struct isl_scc_graph *scc_graph, int *data)
 
static isl_bool is_scc_node (const void *entry, const void *val)
 
struct isl_hash_table_entryisl_scc_graph_find_edge (struct isl_scc_graph *scc_graph, struct isl_hash_table **edge_table, int src, int dst, int reserve)
 
static isl_bool isl_scc_graph_remove_edge (struct isl_scc_graph *scc_graph, int src, int dst)
 
static isl_stat extract_dst (void **entry, void *user)
 
static int cmp_int (const void *a, const void *b, void *data)
 
static int * next_nodes (struct isl_scc_graph *scc_graph, int i)
 
static isl_stat foreach_reachable (struct isl_foreach_reachable_data *data, int pos)
 
static isl_stat recurse_foreach_reachable (void **entry, void *user)
 
static isl_bool elim_or_next (int pos, void *user)
 
static struct isl_scc_graphisl_scc_graph_reduce (struct isl_scc_graph *scc_graph)
 
static isl_stat isl_scc_graph_add_edge (struct isl_scc_graph *scc_graph, struct isl_hash_table **edge_table, int src, int dst)
 
static isl_stat add_reverse (void **entry, void *user)
 
static struct isl_scc_graphisl_scc_graph_add_reverse_edges (struct isl_scc_graph *scc_graph)
 
static isl_stat add_scc_edge (void **entry, void *user)
 
static struct isl_scc_graphisl_scc_graph_alloc (isl_ctx *ctx, int n, struct isl_sched_graph *graph, struct isl_clustering *c)
 
struct isl_scc_graphisl_scc_graph_from_sched_graph (isl_ctx *ctx, struct isl_sched_graph *graph, struct isl_clustering *c)
 
static isl_stat copy_edge (void **entry, void *user)
 
static struct isl_scc_graphisl_scc_graph_sub (struct isl_scc_graph *scc_graph, int *pos, int n)
 
static __isl_give isl_union_setisl_scc_graph_extract_local_scc (struct isl_scc_graph *scc_graph, int pos)
 
static __isl_give isl_union_set_listadd_scc_seq (struct isl_scc_graph *scc_graph, int(*el)(int i, void *user), void *user, int n, __isl_take isl_union_set_list *list)
 
static int offset (int i, void *user)
 
static __isl_give isl_union_set_listisl_scc_graph_add_scc_seq (struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_union_set_list *list)
 
static int at (int i, void *user)
 
static __isl_give isl_union_set_listisl_scc_graph_add_scc_indirect_seq (struct isl_scc_graph *scc_graph, int *seq, int n, __isl_take isl_union_set_list *list)
 
static __isl_give isl_union_set_listextract_split_scc (struct isl_scc_graph *scc_graph, int pos)
 
static __isl_give isl_schedule_nodeisl_scc_graph_finish_band (struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node, int pos)
 
static __isl_give isl_schedule_nodeisl_scc_graph_chain (struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node)
 
static __isl_give isl_schedule_noderecurse (struct isl_scc_graph *scc_graph, int *pos, int n, __isl_take isl_schedule_node *node)
 
static void isl_scc_graph_init_component (struct isl_scc_graph *scc_graph)
 
static int assign (int *component, int a, int b)
 
static void isl_scc_graph_merge_src_dst (struct isl_scc_graph *scc_graph, int a, int b)
 
static isl_stat merge_src_dst (void **entry, void *user)
 
static isl_stat isl_scc_graph_merge_components (struct isl_scc_graph *scc_graph, int first, int n)
 
static int isl_scc_graph_sort_components (struct isl_scc_graph *scc_graph, int first, int n)
 
static __isl_give isl_union_set_listextract_components (struct isl_scc_graph *scc_graph, int first, int n_component)
 
static __isl_give isl_schedule_nodedetect_components (struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_schedule_node *node)
 
static __isl_give isl_schedule_nodedetect_components_at (struct isl_scc_graph *scc_graph, int first, int n, __isl_take isl_schedule_node *node, int child)
 
static int best_split (struct isl_scc_graph *scc_graph)
 
__isl_give isl_schedule_nodeisl_scc_graph_decompose (struct isl_scc_graph *scc_graph, __isl_take isl_schedule_node *node)
 

Function Documentation

◆ add_reverse()

static isl_stat add_reverse ( void **  entry,
void *  user 
)
static

◆ add_scc_edge()

static isl_stat add_scc_edge ( void **  entry,
void *  user 
)
static

◆ add_scc_seq()

static __isl_give isl_union_set_list * add_scc_seq ( struct isl_scc_graph scc_graph,
int(*)(int i, void *user el,
void *  user,
int  n,
__isl_take isl_union_set_list list 
)
static

◆ assign()

static int assign ( int *  component,
int  a,
int  b 
)
static

Definition at line 873 of file isl_scheduler_scc.c.

References a(), b(), isl_scc_graph::component, and t.

Referenced by isl_scc_graph_merge_src_dst().

◆ at()

static int at ( int  i,
void *  user 
)
static

Definition at line 742 of file isl_scheduler_scc.c.

References user.

Referenced by isl_scc_graph_add_scc_indirect_seq(), and sort_divs().

◆ best_split()

static int best_split ( struct isl_scc_graph scc_graph)
static

◆ cmp_int()

static int cmp_int ( const void *  a,
const void *  b,
void *  data 
)
static

Definition at line 270 of file isl_scheduler_scc.c.

References a(), and b().

Referenced by next_nodes().

◆ copy_edge()

static isl_stat copy_edge ( void **  entry,
void *  user 
)
static

◆ detect_components()

static __isl_give isl_schedule_node * detect_components ( struct isl_scc_graph scc_graph,
int  first,
int  n,
__isl_take isl_schedule_node node 
)
static

◆ detect_components_at()

static __isl_give isl_schedule_node * detect_components_at ( struct isl_scc_graph scc_graph,
int  first,
int  n,
__isl_take isl_schedule_node node,
int  child 
)
static

◆ elim_or_next()

static isl_bool elim_or_next ( int  pos,
void *  user 
)
static

◆ extract_components()

static __isl_give isl_union_set_list * extract_components ( struct isl_scc_graph scc_graph,
int  first,
int  n_component 
)
static

◆ extract_dst()

static isl_stat extract_dst ( void **  entry,
void *  user 
)
static

◆ extract_split_scc()

static __isl_give isl_union_set_list * extract_split_scc ( struct isl_scc_graph scc_graph,
int  pos 
)
static

◆ foreach_reachable()

static isl_stat foreach_reachable ( struct isl_foreach_reachable_data data,
int  pos 
)
static

◆ is_scc_node()

static isl_bool is_scc_node ( const void *  entry,
const void *  val 
)
static

Definition at line 188 of file isl_scheduler_scc.c.

References val.

Referenced by isl_scc_graph_find_edge().

◆ isl_scc_graph_add_edge()

static isl_stat isl_scc_graph_add_edge ( struct isl_scc_graph scc_graph,
struct isl_hash_table **  edge_table,
int  src,
int  dst 
)
static

◆ isl_scc_graph_add_reverse_edges()

static struct isl_scc_graph * isl_scc_graph_add_reverse_edges ( struct isl_scc_graph scc_graph)
static

◆ isl_scc_graph_add_scc_indirect_seq()

static __isl_give isl_union_set_list * isl_scc_graph_add_scc_indirect_seq ( struct isl_scc_graph scc_graph,
int *  seq,
int  n,
__isl_take isl_union_set_list list 
)
static

Definition at line 752 of file isl_scheduler_scc.c.

References add_scc_seq(), at(), n, and isl_copy_edge_data::scc_graph.

Referenced by extract_components().

◆ isl_scc_graph_add_scc_seq()

static __isl_give isl_union_set_list * isl_scc_graph_add_scc_seq ( struct isl_scc_graph scc_graph,
int  first,
int  n,
__isl_take isl_union_set_list list 
)
static

Definition at line 732 of file isl_scheduler_scc.c.

References add_scc_seq(), n, offset, and isl_copy_edge_data::scc_graph.

Referenced by extract_split_scc().

◆ isl_scc_graph_alloc()

static struct isl_scc_graph * isl_scc_graph_alloc ( isl_ctx ctx,
int  n,
struct isl_sched_graph graph,
struct isl_clustering c 
)
static

◆ isl_scc_graph_chain()

static __isl_give isl_schedule_node * isl_scc_graph_chain ( struct isl_scc_graph scc_graph,
__isl_take isl_schedule_node node 
)
static

◆ isl_scc_graph_decompose()

__isl_give isl_schedule_node * isl_scc_graph_decompose ( struct isl_scc_graph scc_graph,
__isl_take isl_schedule_node node 
)

◆ isl_scc_graph_dump()

void isl_scc_graph_dump ( struct isl_scc_graph scc_graph)

◆ isl_scc_graph_encode_local_index()

static void * isl_scc_graph_encode_local_index ( struct isl_scc_graph scc_graph,
int  pos 
)
static

Definition at line 171 of file isl_scheduler_scc.c.

References isl_scc_graph::graph_scc, and pos().

Referenced by isl_scc_graph_find_edge().

◆ isl_scc_graph_extract_local_scc()

static __isl_give isl_union_set * isl_scc_graph_extract_local_scc ( struct isl_scc_graph scc_graph,
int  pos 
)
static

◆ isl_scc_graph_find_edge()

struct isl_hash_table_entry * isl_scc_graph_find_edge ( struct isl_scc_graph scc_graph,
struct isl_hash_table **  edge_table,
int  src,
int  dst,
int  reserve 
)

◆ isl_scc_graph_finish_band()

static __isl_give isl_schedule_node * isl_scc_graph_finish_band ( struct isl_scc_graph scc_graph,
__isl_take isl_schedule_node node,
int  pos 
)
static

◆ isl_scc_graph_free()

struct isl_scc_graph * isl_scc_graph_free ( struct isl_scc_graph scc_graph)

◆ isl_scc_graph_from_sched_graph()

struct isl_scc_graph * isl_scc_graph_from_sched_graph ( isl_ctx ctx,
struct isl_sched_graph graph,
struct isl_clustering c 
)

◆ isl_scc_graph_init_component()

static void isl_scc_graph_init_component ( struct isl_scc_graph scc_graph)
static

Definition at line 862 of file isl_scheduler_scc.c.

References isl_scc_graph::component, and isl_scc_graph::n.

Referenced by isl_scc_graph_decompose().

◆ isl_scc_graph_local_index()

static int isl_scc_graph_local_index ( struct isl_scc_graph scc_graph,
int *  data 
)
static

◆ isl_scc_graph_merge_components()

static isl_stat isl_scc_graph_merge_components ( struct isl_scc_graph scc_graph,
int  first,
int  n 
)
static

◆ isl_scc_graph_merge_src_dst()

static void isl_scc_graph_merge_src_dst ( struct isl_scc_graph scc_graph,
int  a,
int  b 
)
static

Definition at line 898 of file isl_scheduler_scc.c.

References a(), assign(), b(), and isl_scc_graph::component.

Referenced by merge_src_dst().

◆ isl_scc_graph_reduce()

static struct isl_scc_graph * isl_scc_graph_reduce ( struct isl_scc_graph scc_graph)
static

◆ isl_scc_graph_remove_edge()

static isl_bool isl_scc_graph_remove_edge ( struct isl_scc_graph scc_graph,
int  src,
int  dst 
)
static

◆ isl_scc_graph_sort_components()

static int isl_scc_graph_sort_components ( struct isl_scc_graph scc_graph,
int  first,
int  n 
)
static

◆ isl_scc_graph_sub()

static struct isl_scc_graph * isl_scc_graph_sub ( struct isl_scc_graph scc_graph,
int *  pos,
int  n 
)
static

◆ merge_src_dst()

static isl_stat merge_src_dst ( void **  entry,
void *  user 
)
static

◆ next_nodes()

static int * next_nodes ( struct isl_scc_graph scc_graph,
int  i 
)
static

◆ offset()

static int offset ( int  i,
void *  user 
)
static

Definition at line 722 of file isl_scheduler_scc.c.

References user.

◆ print_edge()

static isl_stat print_edge ( void **  entry,
void *  user 
)
static

Definition at line 92 of file isl_scheduler_scc.c.

References isl_stat_ok, and user.

Referenced by isl_scc_graph_dump().

◆ recurse()

static __isl_give isl_schedule_node * recurse ( struct isl_scc_graph scc_graph,
int *  pos,
int  n,
__isl_take isl_schedule_node node 
)
static

◆ recurse_foreach_reachable()

static isl_stat recurse_foreach_reachable ( void **  entry,
void *  user 
)
static