OpenACC acc_on_device.
[official-gcc.git] / gcc / graphite-htab.h
blobb1fd81e301308641e718d82d75b5d60bc88a0a16
1 /* Translation of CLAST (CLooG AST) to Gimple.
2 Copyright (C) 2012-2014 Free Software Foundation, Inc.
3 Contributed by Sebastian Pop <sebastian.pop@amd.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_GRAPHITE_HTAB_H
22 #define GCC_GRAPHITE_HTAB_H
24 #include "hash-map.h"
26 /* Hashtable helpers. */
28 struct bb_pbb_hasher : default_hashmap_traits
30 static inline hashval_t hash (const basic_block);
31 static inline bool equal_keys (const basic_block, const basic_block);
34 /* Hash function. */
36 inline hashval_t
37 bb_pbb_hasher::hash (const basic_block bb)
39 return (hashval_t)(bb->index);
42 /* Compare data base element PB1 and PB2. */
44 inline bool
45 bb_pbb_hasher::equal_keys (const basic_block a, const basic_block b)
47 return (a->index == b->index);
50 typedef hash_map<basic_block, poly_bb_p, bb_pbb_hasher> bb_pbb_htab_type;
52 poly_bb_p find_pbb_via_hash (bb_pbb_htab_type *, basic_block);
53 bool loop_is_parallel_p (loop_p, bb_pbb_htab_type *, int);
54 scop_p get_loop_body_pbbs (loop_p, bb_pbb_htab_type *, vec<poly_bb_p> *);
56 #endif