#include "ctrump/common/dll.h"


Go to the source code of this file.
Data Structures | |
| struct | ctrump_intmap_bucket |
| intmapの中で値を保持しておくノード More... | |
| struct | ctrump_intmap |
| 整数テーブル More... | |
| struct | ctrump_intmap_iterator |
| テーブルイテレータ テーブルをトラバースする場合は、以下の手順に従う More... | |
Defines | |
| #define | ctrump_intmap_resize(d, s) ctrump_intmap_resize_pool(d,s,NULL); |
| リサイズ | |
| #define | MUL15(x) ((((unsigned int)(x))*3U)/2U) |
Functions | |
| CTRUMP_EXTDEF void | ctrump_intmap_init (struct ctrump_intmap *map, int size) |
| 初期化 | |
| CTRUMP_EXTDEF void | ctrump_intmap_init_pool (struct ctrump_intmap *map, int size, struct ctrump_mempool *pool) |
| 初期化 | |
| CTRUMP_EXTDEF void | ctrump_intmap_free (struct ctrump_intmap *map) |
| テーブル解放 | |
| CTRUMP_EXTDEF void | ctrump_intmap_resize_pool (struct ctrump_intmap *dest, const struct ctrump_intmap *src, struct ctrump_mempool *pool) |
dest上に新たに適切なサイズのテーブルを作り、srcの内容をコピーする
| |
| CTRUMP_EXTDEF struct ctrump_intmap_bucket * | ctrump_intmap_lookup_add (struct ctrump_intmap *map, int *is_found, unsigned int key) |
| 検索の実行 値の検索見つからなかった場合は、is_foundを0に設定し、 新たに作ったbucketを返す | |
| CTRUMP_EXTDEF void * | ctrump_intmap_lookup (struct ctrump_intmap *map, int *found, unsigned int key) |
| 検索の実行 値が見つからなかった場合は found を0に設定する | |
| CTRUMP_EXTDEF struct ctrump_intmap_bucket * | ctrump_intmap_lookup_bucket (struct ctrump_intmap *map, int *found, unsigned int key) |
| 検索の実行 値が見つからなかった場合はfoundを0に設定し、NULLを返す | |
| CTRUMP_EXTDEF void | ctrump_intmap_iterator_begin (struct ctrump_intmap_iterator *i, struct ctrump_intmap *map) |
| イテレータの初期化 | |
| CTRUMP_EXTDEF int | ctrump_intmap_iterator_next (struct ctrump_intmap_bucket **ret, struct ctrump_intmap_iterator *i, struct ctrump_intmap *map) |
| イテレータを進める | |
| CTRUMP_EXTDEF int | ctrump_intmap_get_num_elem (struct ctrump_intmap *map) |
| mapのサイズを取得 | |
整数値をキーにして値を検索するテーブル
Definition in file intmap.h.
| #define ctrump_intmap_resize | ( | d, | |||
| s | ) | ctrump_intmap_resize_pool(d,s,NULL); |
| CTRUMP_EXTDEF void ctrump_intmap_free | ( | struct ctrump_intmap * | map | ) |
テーブル解放
Definition at line 289 of file intmap.c.
References ctrump_intmap::buckets, ctrump_intmap_bucket::chain, and ctrump_intmap::size.
Referenced by build_bfs_order().
| CTRUMP_EXTDEF int ctrump_intmap_get_num_elem | ( | struct ctrump_intmap * | map | ) |
mapのサイズを取得
Definition at line 189 of file intmap.c.
References ctrump_intmap::buckets, ctrump_intmap_bucket::chain, and ctrump_intmap::size.
| CTRUMP_EXTDEF void ctrump_intmap_init | ( | struct ctrump_intmap * | map, | |
| int | size | |||
| ) |
初期化
| map | 初期化するテーブル | |
| size | テーブルサイズ |
Definition at line 44 of file intmap.c.
References ctrump_intmap::buckets, ctrump_intmap::pool, and ctrump_intmap::size.
Referenced by build_bfs_order(), and ctrump_intmap_resize_pool().
| CTRUMP_EXTDEF void ctrump_intmap_init_pool | ( | struct ctrump_intmap * | map, | |
| int | size, | |||
| struct ctrump_mempool * | pool | |||
| ) |
初期化
| map | 初期化するテーブル | |
| size | テーブルサイズ | |
| pool | メモリアロケートに使うプール |
Definition at line 59 of file intmap.c.
References ctrump_intmap::buckets, ctrump_mempool_alloc, ctrump_intmap::pool, and ctrump_intmap::size.
Referenced by build_cfg(), ctrump_intmap_resize_pool(), and get_distance_vector().
| CTRUMP_EXTDEF void ctrump_intmap_iterator_begin | ( | struct ctrump_intmap_iterator * | i, | |
| struct ctrump_intmap * | map | |||
| ) |
イテレータの初期化
| i | 初期化するイテレータ | |
| map | イテレートする対象 |
Definition at line 162 of file intmap.c.
References iter_next().
Referenced by build_cfg(), and get_distance_vector().
| CTRUMP_EXTDEF int ctrump_intmap_iterator_next | ( | struct ctrump_intmap_bucket ** | ret, | |
| struct ctrump_intmap_iterator * | i, | |||
| struct ctrump_intmap * | map | |||
| ) |
イテレータを進める
| ret | [out] 取得したbucket | |
| i | 進めるイテレータ | |
| map | イテレートする対象 |
Definition at line 169 of file intmap.c.
References ctrump_intmap_iterator::buckets_index, ctrump_intmap_bucket::chain, iter_next(), ctrump_intmap_iterator::next, and ctrump_intmap::size.
Referenced by build_cfg(), and get_distance_vector().
| CTRUMP_EXTDEF void* ctrump_intmap_lookup | ( | struct ctrump_intmap * | map, | |
| int * | found, | |||
| unsigned int | key | |||
| ) |
検索の実行 値が見つからなかった場合は found を0に設定する
| map | 検索対象 | |
| found | [out] 見つかれば0以外 | |
| key | 検索に使う数値 |
Definition at line 120 of file intmap.c.
References ctrump_intmap_lookup_impl(), and ctrump_intmap_bucket::val.
Referenced by analyze_subscript_coef(), check_var_bmp_p(), extract_load_store_assign(), extract_load_store_expr_rval(), find_iv(), get_var_id(), recog_array_index(), recog_reduction_domtree(), and single_expr_subscripts_to_loop_subscript().
| CTRUMP_EXTDEF struct ctrump_intmap_bucket* ctrump_intmap_lookup_add | ( | struct ctrump_intmap * | map, | |
| int * | is_found, | |||
| unsigned int | key | |||
| ) | [read] |
検索の実行 値の検索見つからなかった場合は、is_foundを0に設定し、 新たに作ったbucketを返す
| map | 検索対象 | |
| is_found | [out] 見つかれば0以外 | |
| key | 検索に使う数値 |
Definition at line 112 of file intmap.c.
References ctrump_intmap_lookup_impl().
Referenced by assign_var_info_expr(), build_bfs_order(), and test_index().
| CTRUMP_EXTDEF struct ctrump_intmap_bucket* ctrump_intmap_lookup_bucket | ( | struct ctrump_intmap * | map, | |
| int * | found, | |||
| unsigned int | key | |||
| ) | [read] |
検索の実行 値が見つからなかった場合はfoundを0に設定し、NULLを返す
| map | 検索対象 | |
| found | [out] 見つかれば0以外 | |
| key | 検索に使う数値 |
Definition at line 134 of file intmap.c.
References ctrump_intmap_lookup_impl().
Referenced by test_index().
| CTRUMP_EXTDEF void ctrump_intmap_resize_pool | ( | struct ctrump_intmap * | dest, | |
| const struct ctrump_intmap * | src, | |||
| struct ctrump_mempool * | pool | |||
| ) |
dest上に新たに適切なサイズのテーブルを作り、srcの内容をコピーする
| dest | 新しくつくるテーブル | |
| src | もとのテーブル | |
| pool | メモリプール |
Definition at line 228 of file intmap.c.
References ctrump_intmap::buckets, ctrump_intmap_bucket::chain, ctrump_intmap_init(), ctrump_intmap_init_pool(), ctrump_mempool_alloc, ctrump_intmap_bucket::key, NELEM, ctrump_intmap::size, sizes, and ctrump_intmap_bucket::val.
Referenced by build_bfs_order(), and build_cfg().
1.5.6