Polly 20.0.0git
Classes | Macros | Enumerations | Functions | Variables
isl_ast_graft.c File Reference
#include <isl/id.h>
#include <isl/space.h>
#include <isl/stream.h>
#include <isl_ast_private.h>
#include <isl_ast_build_expr.h>
#include <isl_ast_build_private.h>
#include <isl_ast_graft_private.h>
#include "isl_set_to_ast_graft_list.h"
#include <isl_list_templ.c>
#include <isl_list_read_templ.c>
#include <print_templ.c>
#include "extract_key.c"

Go to the source code of this file.

Classes

struct  isl_insert_if_data
 
struct  isl_if_node
 
struct  isl_split_on_guard_data
 

Macros

#define EL_BASE   ast_graft
 
#define BASE   ast_graft
 
#define KEY   enum isl_graft_key
 
#define KEY_ERROR   isl_graft_key_error
 
#define KEY_END   isl_graft_key_end
 
#define KEY_STR   key_str
 
#define KEY_EXTRACT   extract_key
 
#define KEY_GET   get_key
 

Enumerations

enum  isl_graft_key {
  isl_graft_key_error = -1 , isl_graft_key_guard , isl_graft_key_enforced , isl_graft_key_node ,
  isl_graft_key_end
}
 

Functions

static __isl_give isl_ast_graftisl_ast_graft_copy (__isl_keep isl_ast_graft *graft)
 
static __isl_give isl_ast_graftisl_stream_read_ast_graft (__isl_keep isl_stream *s)
 
isl_ctxisl_ast_graft_get_ctx (__isl_keep isl_ast_graft *graft)
 
__isl_give isl_ast_nodeisl_ast_graft_get_node (__isl_keep isl_ast_graft *graft)
 
static isl_ast_graftgraft_alloc (__isl_take isl_ast_node *node, __isl_take isl_set *guard, __isl_take isl_basic_set *enforced)
 
__isl_give isl_ast_graftisl_ast_graft_alloc (__isl_take isl_ast_node *node, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graftisl_ast_graft_alloc_domain (__isl_take isl_map *executed, __isl_keep isl_ast_build *build)
 
static isl_bool equal_independent_guards (__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
static __isl_give isl_sethoist_guard (__isl_take isl_set *guard, __isl_keep isl_ast_build *build)
 
__isl_give isl_setisl_ast_graft_list_extract_hoistable_guard (__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
static isl_stat insert_if (__isl_take isl_basic_set *bset, void *user)
 
static __isl_give isl_ast_nodeast_node_insert_if (__isl_take isl_ast_node *node, __isl_take isl_set *guard, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graftinsert_if_node (__isl_take isl_ast_graft *graft, __isl_take isl_set *guard, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graftinsert_pending_guard_node (__isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graftisl_ast_graft_set_enforced (__isl_take isl_ast_graft *graft, __isl_take isl_basic_set *enforced)
 
static __isl_give isl_basic_setupdate_enforced (__isl_take isl_basic_set *enforced, __isl_keep isl_ast_graft *graft, int depth)
 
static void extend_body (__isl_keep isl_ast_node **body, __isl_take isl_ast_node *node)
 
static __isl_give isl_ast_graft_list * graft_extend_body (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_node **body, __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graft_list * extend_then (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_node *last_if, __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graft_list * extend_else (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_node *last_if, __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build)
 
static int clear_if_nodes (struct isl_if_node *if_node, int first, int n)
 
static __isl_give isl_ast_graft_list * insert_pending_guard_nodes (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_insert_pending_guard_nodes (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_node_list * extract_node_list (__isl_keep isl_ast_graft_list *list)
 
__isl_give isl_basic_setisl_ast_graft_list_extract_shared_enforced (__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graftstore_guard (__isl_take isl_ast_graft *graft, __isl_take isl_set *guard, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graft_list * gist_guards (__isl_take isl_ast_graft_list *list, __isl_keep isl_set *context)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_gist_guards (__isl_take isl_ast_graft_list *list, __isl_take isl_set *context)
 
__isl_give isl_ast_graftisl_ast_graft_alloc_from_children (__isl_take isl_ast_graft_list *list, __isl_take isl_set *guard, __isl_take isl_basic_set *enforced, __isl_keep isl_ast_build *build, __isl_keep isl_ast_build *sub_build)
 
static __isl_give isl_ast_graftast_graft_list_fuse (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_fuse (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
static __isl_give isl_ast_graftisl_ast_graft_fuse (__isl_take isl_ast_graft *graft1, __isl_take isl_ast_graft *graft2, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graftisl_ast_graft_insert_for (__isl_take isl_ast_graft *graft, __isl_take isl_ast_node *node)
 
__isl_give isl_ast_graftisl_ast_graft_insert_mark (__isl_take isl_ast_graft *graft, __isl_take isl_id *mark)
 
__isl_give isl_ast_nodeisl_ast_node_from_graft_list (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
__isl_null isl_ast_graftisl_ast_graft_free (__isl_take isl_ast_graft *graft)
 
__isl_give isl_ast_graftisl_ast_graft_enforce (__isl_take isl_ast_graft *graft, __isl_take isl_basic_set *enforced)
 
__isl_give isl_basic_setisl_ast_graft_get_enforced (__isl_keep isl_ast_graft *graft)
 
__isl_give isl_setisl_ast_graft_get_guard (__isl_keep isl_ast_graft *graft)
 
__isl_give isl_ast_graftisl_ast_graft_add_guard (__isl_take isl_ast_graft *graft, __isl_take isl_set *guard, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graftisl_ast_graft_unembed (__isl_take isl_ast_graft *graft, int product)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_unembed (__isl_take isl_ast_graft_list *list, int product)
 
__isl_give isl_ast_graftisl_ast_graft_preimage_multi_aff (__isl_take isl_ast_graft *graft, __isl_take isl_multi_aff *ma)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_preimage_multi_aff (__isl_take isl_ast_graft_list *list, __isl_take isl_multi_aff *ma)
 
static int cmp_graft (__isl_keep isl_ast_graft *a, __isl_keep isl_ast_graft *b, void *user)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_sort_guard (__isl_take isl_ast_graft_list *list)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_merge (__isl_take isl_ast_graft_list *list1, __isl_take isl_ast_graft_list *list2, __isl_keep isl_ast_build *build)
 
static isl_stat add_to_guard_list (__isl_take isl_ast_graft *graft, void *user)
 
static __isl_give isl_set_to_ast_graft_list * split_on_guard (__isl_keep isl_ast_graft_list *list, int *any_match)
 
static isl_stat add_same_guard (__isl_take isl_set *guard, __isl_take isl_ast_graft_list *guard_list, void *user)
 
static __isl_give isl_ast_graft_list * reconstruct (__isl_take isl_ast_graft_list *list, __isl_keep isl_set_to_ast_graft_list *guard2list, __isl_keep isl_ast_build *build)
 
__isl_give isl_ast_graft_list * isl_ast_graft_list_group_on_guard (__isl_take isl_ast_graft_list *list, __isl_keep isl_ast_build *build)
 
__isl_give isl_printerisl_printer_print_ast_graft (__isl_take isl_printer *p, __isl_keep isl_ast_graft *graft)
 
static isl_stat read_key (__isl_keep isl_stream *s, enum isl_graft_key key)
 

Variables

static char * key_str []
 

Macro Definition Documentation

◆ BASE

#define BASE   ast_graft

Definition at line 36 of file isl_ast_graft.c.

◆ EL_BASE

#define EL_BASE   ast_graft

Definition at line 30 of file isl_ast_graft.c.

◆ KEY

#define KEY   enum isl_graft_key

Definition at line 1510 of file isl_ast_graft.c.

◆ KEY_END

#define KEY_END   isl_graft_key_end

Definition at line 1514 of file isl_ast_graft.c.

◆ KEY_ERROR

#define KEY_ERROR   isl_graft_key_error

Definition at line 1512 of file isl_ast_graft.c.

◆ KEY_EXTRACT

#define KEY_EXTRACT   extract_key

Definition at line 1518 of file isl_ast_graft.c.

◆ KEY_GET

#define KEY_GET   get_key

Definition at line 1520 of file isl_ast_graft.c.

◆ KEY_STR

#define KEY_STR   key_str

Definition at line 1516 of file isl_ast_graft.c.

Enumeration Type Documentation

◆ isl_graft_key

Enumerator
isl_graft_key_error 
isl_graft_key_guard 
isl_graft_key_enforced 
isl_graft_key_node 
isl_graft_key_end 

Definition at line 1468 of file isl_ast_graft.c.

Function Documentation

◆ add_same_guard()

static isl_stat add_same_guard ( __isl_take isl_set guard,
__isl_take isl_ast_graft_list *  guard_list,
void *  user 
)
static

Definition at line 1406 of file isl_ast_graft.c.

References isl_set_free(), isl_stat_non_null(), and user.

Referenced by reconstruct().

◆ add_to_guard_list()

static isl_stat add_to_guard_list ( __isl_take isl_ast_graft graft,
void *  user 
)
static

◆ ast_graft_list_fuse()

static __isl_give isl_ast_graft * ast_graft_list_fuse ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)
static

◆ ast_node_insert_if()

static __isl_give isl_ast_node * ast_node_insert_if ( __isl_take isl_ast_node node,
__isl_take isl_set guard,
__isl_keep isl_ast_build build 
)
static

◆ clear_if_nodes()

static int clear_if_nodes ( struct isl_if_node if_node,
int  first,
int  n 
)
static

Definition at line 561 of file isl_ast_graft.c.

References isl_set_free(), and n.

Referenced by insert_pending_guard_nodes().

◆ cmp_graft()

static int cmp_graft ( __isl_keep isl_ast_graft a,
__isl_keep isl_ast_graft b,
void *  user 
)
static

Definition at line 1221 of file isl_ast_graft.c.

References a(), b(), and isl_set_plain_cmp().

Referenced by isl_ast_graft_list_sort_guard().

◆ equal_independent_guards()

static isl_bool equal_independent_guards ( __isl_keep isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)
static

◆ extend_body()

static void extend_body ( __isl_keep isl_ast_node **  body,
__isl_take isl_ast_node node 
)
static

◆ extend_else()

static __isl_give isl_ast_graft_list * extend_else ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_node last_if,
__isl_take isl_ast_graft graft,
__isl_keep isl_ast_build build 
)
static

◆ extend_then()

static __isl_give isl_ast_graft_list * extend_then ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_node last_if,
__isl_take isl_ast_graft graft,
__isl_keep isl_ast_build build 
)
static

◆ extract_node_list()

static __isl_give isl_ast_node_list * extract_node_list ( __isl_keep isl_ast_graft_list *  list)
static

◆ gist_guards()

static __isl_give isl_ast_graft_list * gist_guards ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_set context 
)
static

◆ graft_alloc()

static isl_ast_graft * graft_alloc ( __isl_take isl_ast_node node,
__isl_take isl_set guard,
__isl_take isl_basic_set enforced 
)
static

◆ graft_extend_body()

static __isl_give isl_ast_graft_list * graft_extend_body ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_node **  body,
__isl_take isl_ast_graft graft,
__isl_keep isl_ast_build build 
)
static

◆ hoist_guard()

static __isl_give isl_set * hoist_guard ( __isl_take isl_set guard,
__isl_keep isl_ast_build build 
)
static

◆ insert_if()

static isl_stat insert_if ( __isl_take isl_basic_set bset,
void *  user 
)
static

◆ insert_if_node()

static __isl_give isl_ast_graft * insert_if_node ( __isl_take isl_ast_graft graft,
__isl_take isl_set guard,
__isl_keep isl_ast_build build 
)
static

◆ insert_pending_guard_node()

static __isl_give isl_ast_graft * insert_pending_guard_node ( __isl_take isl_ast_graft graft,
__isl_keep isl_ast_build build 
)
static

Definition at line 402 of file isl_ast_graft.c.

References isl_insert_if_data::build, insert_if_node(), and isl_set_copy().

Referenced by insert_pending_guard_nodes().

◆ insert_pending_guard_nodes()

static __isl_give isl_ast_graft_list * insert_pending_guard_nodes ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)
static

◆ isl_ast_graft_add_guard()

__isl_give isl_ast_graft * isl_ast_graft_add_guard ( __isl_take isl_ast_graft graft,
__isl_take isl_set guard,
__isl_keep isl_ast_build build 
)

Definition at line 1102 of file isl_ast_graft.c.

References isl_if_node::guard, and store_guard().

Referenced by add_domain(), call_create_leaf(), and list_add_guard().

◆ isl_ast_graft_alloc()

__isl_give isl_ast_graft * isl_ast_graft_alloc ( __isl_take isl_ast_node node,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_alloc_domain()

__isl_give isl_ast_graft * isl_ast_graft_alloc_domain ( __isl_take isl_map executed,
__isl_keep isl_ast_build build 
)

Definition at line 106 of file isl_ast_graft.c.

References isl_ast_build_call_from_executed(), and isl_ast_graft_alloc().

Referenced by add_domain().

◆ isl_ast_graft_alloc_from_children()

__isl_give isl_ast_graft * isl_ast_graft_alloc_from_children ( __isl_take isl_ast_graft_list *  list,
__isl_take isl_set guard,
__isl_take isl_basic_set enforced,
__isl_keep isl_ast_build build,
__isl_keep isl_ast_build sub_build 
)

◆ isl_ast_graft_copy()

static __isl_give isl_ast_graft * isl_ast_graft_copy ( __isl_keep isl_ast_graft graft)
static

Definition at line 116 of file isl_ast_graft.c.

References isl_ast_graft::ref.

◆ isl_ast_graft_enforce()

__isl_give isl_ast_graft * isl_ast_graft_enforce ( __isl_take isl_ast_graft graft,
__isl_take isl_basic_set enforced 
)

◆ isl_ast_graft_free()

__isl_null isl_ast_graft * isl_ast_graft_free ( __isl_take isl_ast_graft graft)

◆ isl_ast_graft_fuse()

static __isl_give isl_ast_graft * isl_ast_graft_fuse ( __isl_take isl_ast_graft graft1,
__isl_take isl_ast_graft graft2,
__isl_keep isl_ast_build build 
)
static

Definition at line 979 of file isl_ast_graft.c.

References ast_graft_list_fuse(), and isl_ast_build_get_ctx().

Referenced by isl_ast_graft_list_merge().

◆ isl_ast_graft_get_ctx()

isl_ctx * isl_ast_graft_get_ctx ( __isl_keep isl_ast_graft graft)

Definition at line 39 of file isl_ast_graft.c.

References isl_basic_set_get_ctx().

Referenced by refine_generic_bounds().

◆ isl_ast_graft_get_enforced()

__isl_give isl_basic_set * isl_ast_graft_get_enforced ( __isl_keep isl_ast_graft graft)

◆ isl_ast_graft_get_guard()

__isl_give isl_set * isl_ast_graft_get_guard ( __isl_keep isl_ast_graft graft)

Definition at line 1095 of file isl_ast_graft.c.

References isl_set_copy().

◆ isl_ast_graft_get_node()

__isl_give isl_ast_node * isl_ast_graft_get_node ( __isl_keep isl_ast_graft graft)

Definition at line 46 of file isl_ast_graft.c.

References isl_ast_node_copy().

Referenced by extract_node_list().

◆ isl_ast_graft_insert_for()

__isl_give isl_ast_graft * isl_ast_graft_insert_for ( __isl_take isl_ast_graft graft,
__isl_take isl_ast_node node 
)

◆ isl_ast_graft_insert_mark()

__isl_give isl_ast_graft * isl_ast_graft_insert_mark ( __isl_take isl_ast_graft graft,
__isl_take isl_id mark 
)

◆ isl_ast_graft_list_extract_hoistable_guard()

__isl_give isl_set * isl_ast_graft_list_extract_hoistable_guard ( __isl_keep isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_extract_shared_enforced()

__isl_give isl_basic_set * isl_ast_graft_list_extract_shared_enforced ( __isl_keep isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_fuse()

__isl_give isl_ast_graft_list * isl_ast_graft_list_fuse ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_gist_guards()

__isl_give isl_ast_graft_list * isl_ast_graft_list_gist_guards ( __isl_take isl_ast_graft_list *  list,
__isl_take isl_set context 
)

Definition at line 876 of file isl_ast_graft.c.

References context, gist_guards(), and isl_set_free().

Referenced by build_ast_from_guard(), and create_node_scaled().

◆ isl_ast_graft_list_group_on_guard()

__isl_give isl_ast_graft_list * isl_ast_graft_list_group_on_guard ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_insert_pending_guard_nodes()

__isl_give isl_ast_graft_list * isl_ast_graft_list_insert_pending_guard_nodes ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_merge()

__isl_give isl_ast_graft_list * isl_ast_graft_list_merge ( __isl_take isl_ast_graft_list *  list1,
__isl_take isl_ast_graft_list *  list2,
__isl_keep isl_ast_build build 
)

◆ isl_ast_graft_list_preimage_multi_aff()

__isl_give isl_ast_graft_list * isl_ast_graft_list_preimage_multi_aff ( __isl_take isl_ast_graft_list *  list,
__isl_take isl_multi_aff ma 
)

Definition at line 1197 of file isl_ast_graft.c.

References isl_ast_graft_preimage_multi_aff(), ma, and n.

Referenced by generate_shift_component().

◆ isl_ast_graft_list_sort_guard()

__isl_give isl_ast_graft_list * isl_ast_graft_list_sort_guard ( __isl_take isl_ast_graft_list *  list)

Definition at line 1229 of file isl_ast_graft.c.

References cmp_graft().

Referenced by generate_parallel_domains().

◆ isl_ast_graft_list_unembed()

__isl_give isl_ast_graft_list * isl_ast_graft_list_unembed ( __isl_take isl_ast_graft_list *  list,
int  product 
)

Definition at line 1152 of file isl_ast_graft.c.

References isl_ast_graft_unembed(), and n.

Referenced by build_ast_from_band(), and generate_code_in_space().

◆ isl_ast_graft_preimage_multi_aff()

__isl_give isl_ast_graft * isl_ast_graft_preimage_multi_aff ( __isl_take isl_ast_graft graft,
__isl_take isl_multi_aff ma 
)

◆ isl_ast_graft_set_enforced()

__isl_give isl_ast_graft * isl_ast_graft_set_enforced ( __isl_take isl_ast_graft graft,
__isl_take isl_basic_set enforced 
)

Definition at line 413 of file isl_ast_graft.c.

References isl_ast_graft_free(), and isl_basic_set_free().

Referenced by graft_extend_body().

◆ isl_ast_graft_unembed()

__isl_give isl_ast_graft * isl_ast_graft_unembed ( __isl_take isl_ast_graft graft,
int  product 
)

◆ isl_ast_node_from_graft_list()

__isl_give isl_ast_node * isl_ast_node_from_graft_list ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_ast_build build 
)

◆ isl_printer_print_ast_graft()

__isl_give isl_printer * isl_printer_print_ast_graft ( __isl_take isl_printer p,
__isl_keep isl_ast_graft graft 
)

◆ isl_stream_read_ast_graft()

static __isl_give isl_ast_graft * isl_stream_read_ast_graft ( __isl_keep isl_stream s)
static

◆ read_key()

static isl_stat read_key ( __isl_keep isl_stream s,
enum isl_graft_key  key 
)
static

◆ reconstruct()

static __isl_give isl_ast_graft_list * reconstruct ( __isl_take isl_ast_graft_list *  list,
__isl_keep isl_set_to_ast_graft_list *  guard2list,
__isl_keep isl_ast_build build 
)
static

◆ split_on_guard()

static __isl_give isl_set_to_ast_graft_list * split_on_guard ( __isl_keep isl_ast_graft_list *  list,
int *  any_match 
)
static

◆ store_guard()

static __isl_give isl_ast_graft * store_guard ( __isl_take isl_ast_graft graft,
__isl_take isl_set guard,
__isl_keep isl_ast_build build 
)
static

◆ update_enforced()

static __isl_give isl_basic_set * update_enforced ( __isl_take isl_basic_set enforced,
__isl_keep isl_ast_graft graft,
int  depth 
)
static

Variable Documentation

◆ key_str

char* key_str[]
static
Initial value:
= {
[isl_graft_key_guard] = "guard",
[isl_graft_key_enforced] = "enforced",
[isl_graft_key_node] = "node",
}
@ isl_graft_key_guard
@ isl_graft_key_node
@ isl_graft_key_enforced

Definition at line 1478 of file isl_ast_graft.c.

Referenced by isl_printer_print_ast_graft().