OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ir_reader.h
Go to the documentation of this file.
1 /*
2 
3  Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of version 2 of the GNU General Public License as
7  published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it would be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13  Further, this software is distributed without any warranty that it is
14  free of the rightful claim of any third person regarding infringement
15  or the like. Any license provided herein, whether implied or
16  otherwise, applies only to this software file. Patent licenses, if
17  any, provided herein do not apply to combinations of this program with
18  other software, or any other product whatsoever.
19 
20  You should have received a copy of the GNU General Public License along
21  with this program; if not, write the Free Software Foundation, Inc., 59
22  Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 
24  Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
25  Mountain View, CA 94043, or:
26 
27  http://www.sgi.com
28 
29  For further information regarding this notice, see:
30 
31  http://oss.sgi.com/projects/GenInfo/NoticeExplan
32 
33 */
34 
35 
36 #ifndef ir_reader_INCLUDED
37 #define ir_reader_INCLUDED
38 /* ====================================================================
39  * ====================================================================
40  *
41  *
42  * Revision history:
43  * 31-AUG-94 - Original Version
44  *
45  * Description:
46  *
47  * ====================================================================
48  * ====================================================================
49  */
50 
51 
52 #ifdef _KEEP_RCS_ID
53 #endif /* _KEEP_RCS_ID */
54 
55 extern void IR_reader_init(void);
56 extern void IR_reader_finish(void);
57 extern FILE *IR_open(const char *filename);
58 extern void IR_close(void);
59 extern BOOL IR_open_output(const char *filename);
60 extern void IR_close_output(void);
61 extern WN * IR_get_func(void);
62 extern void IR_put_func(WN * wn, FILE *f);
63 extern void IR_Dwarf_Gen_File_Table (BOOL dump_filenames);
64 extern void IR_Srcpos_Filename (SRCPOS srcpos, /* in */
65  const char **fname, /* out */
66  const char **dirname); /* out */
67 
68 /* for debugging */
69 struct ALIAS_MANAGER; /* forward declaration */
70 
71 extern void Check_for_IR_Dump(INT phase, WN *pu, const char *phase_name);
72 
73 extern void dump_wn(WN *wn);
74 extern void dump_tree(WN *wn);
75 extern void dump_region_tree(WN *wn);
76 extern void dump_wn_no_st(WN *wn);
77 extern void fdump_wn_no_st(FILE *fp,WN *wn);
78 extern void dump_tree_no_st(WN *wn);
79 extern void fdump_tree_with_alias(FILE *fp, const WN *wn, WN_MAP map, const struct ALIAS_MANAGER *);
80 extern void fdump_tree_with_freq(FILE *fp, const WN *wn, WN_MAP map);
81 /* dump an WN node to a file other than stdout */
82 extern void fdump_wn(FILE *f, WN *wn);
83 /* dump a tree to a file other than stdout */
84 extern void fdump_tree(FILE *f, WN *wn);
85 /* dump a tree to a file other than stdout, and do not print STs */
86 extern void fdump_tree_no_st(FILE *f, WN *wn);
87 /* dump a tree to a file, with region info */
88 extern void fdump_region_tree(FILE *f, WN *wn);
89 #ifdef BACK_END
90 extern void fdump_dep_tree( FILE *f, WN *wn, struct ALIAS_MANAGER *alias);
91 #endif
92 /* dump a tree that contains regions of OPs */
93 extern "C" { void CG_Dump_Region(FILE *f, WN *); }
94 
95 /* whether to dump the map info; defaults to FALSE */
96 extern BOOL IR_dump_map_info;
97 /* whether to dump the region OPs info; defaults to FALSE */
98 extern BOOL IR_dump_region;
99 /* whether to dump the line numbers; defaults to FALSE */
101 
102 /* whether to dump in prefix order or postfix order */
103 extern BOOL IR_set_dump_order( BOOL dump_prefix);
104 
105 /* enable dumping frequency */
106 extern void enable_tree_freq_display(void);
107 /* disable dumping frequency */
108 extern void disable_tree_freq_display(void);
109 
110 /* WN_TREE related dump functions */
111 extern void WN_TREE_put_func(WN * , FILE *);
112 extern void WN_TREE_dump_tree(WN *wn);
113 /* dump a tree to a file other than stdout */
114 extern void WN_TREE_fdump_tree(FILE *f, WN *wn);
115 
116 #endif /* ir_reader_INCLUDED */
117