]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/graphite-htab.h
Update copyright years in gcc/
[thirdparty/gcc.git] / gcc / graphite-htab.h
CommitLineData
4a8fb1a1 1/* Translation of CLAST (CLooG AST) to Gimple.
23a5b65a 2 Copyright (C) 2012-2014 Free Software Foundation, Inc.
4a8fb1a1
LC
3 Contributed by Sebastian Pop <sebastian.pop@amd.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_GRAPHITE_HTAB_H
22#define GCC_GRAPHITE_HTAB_H
23
24#include "hash-table.h"
25#include "graphite-clast-to-gimple.h"
26
27/* Hashtable helpers. */
28
29struct bb_pbb_hasher : typed_free_remove <bb_pbb_def>
30{
31 typedef bb_pbb_def value_type;
32 typedef bb_pbb_def compare_type;
33 static inline hashval_t hash (const value_type *);
34 static inline bool equal (const value_type *, const compare_type *);
35};
36
37/* Hash function for data base element BB_PBB. */
38
39inline hashval_t
40bb_pbb_hasher::hash (const value_type *bb_pbb)
41{
42 return (hashval_t)(bb_pbb->bb->index);
43}
44
45/* Compare data base element PB1 and PB2. */
46
47inline bool
48bb_pbb_hasher::equal (const value_type *bp1, const compare_type *bp2)
49{
50 return (bp1->bb->index == bp2->bb->index);
51}
52
53typedef hash_table <bb_pbb_hasher> bb_pbb_htab_type;
54
55extern bool gloog (scop_p, bb_pbb_htab_type);
56poly_bb_p find_pbb_via_hash (bb_pbb_htab_type, basic_block);
57bool loop_is_parallel_p (loop_p, bb_pbb_htab_type, int);
58scop_p get_loop_body_pbbs (loop_p, bb_pbb_htab_type, vec<poly_bb_p> *);
59
60#endif