OpenADFortTk (including Open64 and OpenAnalysis references)
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
ipa_lno_summary.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 cxx_ipa_lno_summary_INCLUDED
37
#define cxx_ipa_lno_summary_INCLUDED
38
39
#ifndef mtypes_INCLUDED
40
#include "
mtypes.h
"
41
#endif
42
43
#ifndef symtab_idx_INCLUDED
44
#include "
symtab_idx.h
"
45
#endif
46
47
class
IPA_LNO_SUMMARY_PROCEDURE
{
48
private
:
49
ST_IDX
_st_idx
;
50
mINT32
_formal_index
;
51
mINT32
_global_index
;
52
mINT32
_value_index
;
53
mINT32
_expr_index
: 31;
54
mUINT32
_has_incomplete_array_info
: 1;
55
mUINT16
_formal_count
;
56
mUINT16
_global_count
;
57
mUINT16
_value_count
;
58
mUINT16
_expr_count
;
59
60
public
:
61
IPA_LNO_SUMMARY_PROCEDURE
() :
62
_st_idx
(
ST_IDX_ZERO
),
63
_formal_index
(-1),
64
_global_index
(-1),
65
_value_index
(-1),
66
_expr_index
(-1),
67
_has_incomplete_array_info
(
FALSE
),
68
_formal_count
(0),
69
_global_count
(0),
70
_value_count
(0),
71
_expr_count
(0)
72
{}
73
74
ST_IDX
St_Idx
()
const
{
return
_st_idx
; }
75
INT
Formal_Index
()
const
{
return
_formal_index
; }
76
INT
Global_Index
()
const
{
return
_global_index
; }
77
INT
Value_Index
()
const
{
return
_value_index
; }
78
INT
Expr_Index
()
const
{
return
_expr_index
; }
79
INT
Formal_Count
()
const
{
return
_formal_count
; }
80
INT
Global_Count
()
const
{
return
_global_count
; }
81
INT
Value_Count
()
const
{
return
_value_count
; }
82
INT
Expr_Count
()
const
{
return
_expr_count
; }
83
BOOL
Has_Incomplete_Array_Info
()
const
84
{
return
_has_incomplete_array_info
; }
85
void
Set_St_Idx
(
ST_IDX
v) {
_st_idx
= v; }
86
void
Set_Formal_Index
(
INT
v) {
_formal_index
= v; }
87
void
Set_Global_Index
(
INT
v) {
_global_index
= v; }
88
void
Set_Value_Index
(
INT
v) {
_value_index
= v; }
89
void
Set_Expr_Index
(
INT
v) {
_expr_index
= v; }
90
void
Set_Formal_Count
(
INT
v) {
_formal_count
= v; }
91
void
Set_Global_Count
(
INT
v) {
_global_count
= v; }
92
void
Set_Value_Count
(
INT
v) {
_value_count
= v; }
93
void
Set_Expr_Count
(
INT
v) {
_expr_count
= v; }
94
void
Reset_Has_Incomplete_Array_Info
() {
_has_incomplete_array_info
=
FALSE
; }
95
void
Set_Has_Incomplete_Array_Info
() {
_has_incomplete_array_info
=
TRUE
; }
96
97
void
Print
(FILE* fp,
INT
procedure_index = -1);
98
};
99
100
class
IPA_LNO_SUMMARY_FORMAL
{
101
private
:
102
#define IPA_LNO_FORMAL_MUST_KILL 0x00000001
103
#define IPA_LNO_FORMAL_MAY_KILL 0x00000002
104
#define IPA_LNO_FORMAL_EXP_USE 0x00000004
105
#define IPA_LNO_FORMAL_USE 0x00000008
106
#define IPA_LNO_FORMAL_MUST_REDUC 0x00000010
107
#define IPA_LNO_FORMAL_MAY_REDUC 0x00000020
108
#define IPA_LNO_FORMAL_SCALAR 0x00000040
109
#define IPA_LNO_FORMAL_ARRAY 0x00000080
110
#define IPA_LNO_FORMAL_UNKNOWN 0x00000100
111
mUINT32
_state
;
112
mINT32
_position
;
113
mINT32
_machine_type
;
114
mINT32
_mod_array_section_index
;
115
mINT32
_ref_array_section_index
;
116
mINT32
_decl_array_section_index
;
117
public
:
118
IPA_LNO_SUMMARY_FORMAL
() {
_state
= 0;
_machine_type
=
MTYPE_UNKNOWN
;
119
_position
= -1;
_mod_array_section_index
= -1;
120
_ref_array_section_index
= -1;};
121
INT
Position
()
const
{
return
_position
;};
122
INT
Machine_Type
()
const
{
return
_machine_type
;};
123
INT
Mod_Array_Section_Index
()
const
{
return
_mod_array_section_index
;};
124
INT
Ref_Array_Section_Index
()
const
{
return
_ref_array_section_index
;};
125
INT
Decl_Array_Section_Index
()
const
{
return
_decl_array_section_index
;};
126
void
Clear_State
() {
_state
= 0;};
127
void
Set_Position
(
INT
v) {
_position
= v;};
128
void
Set_Machine_Type
(
TYPE_ID
v) {
_machine_type
= v;};
129
void
Set_Mod_Array_Section_Index
(
INT
v) {
_mod_array_section_index
= v;};
130
void
Set_Ref_Array_Section_Index
(
INT
v) {
_ref_array_section_index
= v;};
131
void
Set_Decl_Array_Section_Index
(
INT
v) {
_decl_array_section_index
= v;};
132
// IPA_LNO_FORMAL_MUST_KILL
133
BOOL
Is_Must_Kill
()
const
{
return
_state
&
IPA_LNO_FORMAL_MUST_KILL
;};
134
void
Set_Must_Kill
() {
_state
|=
IPA_LNO_FORMAL_MUST_KILL
;};
135
void
Reset_Must_Kill
() {
_state
&= ~
IPA_LNO_FORMAL_MUST_KILL
;};
136
// IPA_LNO_FORMAL_MAY_KILL
137
BOOL
Is_May_Kill
()
const
{
return
_state
&
IPA_LNO_FORMAL_MAY_KILL
;};
138
void
Set_May_Kill
() {
_state
|=
IPA_LNO_FORMAL_MAY_KILL
;};
139
void
Reset_May_Kill
() {
_state
&= ~
IPA_LNO_FORMAL_MAY_KILL
;};
140
// IPA_LNO_FORMAL_EXP_USE
141
BOOL
Is_Exp_Use
()
const
{
return
_state
&
IPA_LNO_FORMAL_EXP_USE
;};
142
void
Set_Exp_Use
() {
_state
|=
IPA_LNO_FORMAL_EXP_USE
;};
143
void
Reset_Exp_Use
() {
_state
&= ~
IPA_LNO_FORMAL_EXP_USE
;};
144
// IPA_LNO_FORMAL_USE
145
BOOL
Is_Use
()
const
{
return
_state
&
IPA_LNO_FORMAL_USE
;};
146
void
Set_Use
() {
_state
|=
IPA_LNO_FORMAL_USE
;};
147
void
Reset_Use
() {
_state
&= ~
IPA_LNO_FORMAL_USE
;};
148
// IPA_LNO_FORMAL_MUST_REDUC
149
BOOL
Is_Must_Reduction
()
const
{
return
_state
&
IPA_LNO_FORMAL_MUST_REDUC
;};
150
void
Set_Must_Reduction
() {
_state
|=
IPA_LNO_FORMAL_MUST_REDUC
;};
151
void
Reset_Must_Reduction
() {
_state
&= ~
IPA_LNO_FORMAL_MUST_REDUC
;};
152
// IPA_LNO_FORMAL_MAY_REDUC
153
BOOL
Is_May_Reduction
()
const
{
return
_state
&
IPA_LNO_FORMAL_MAY_REDUC
;};
154
void
Set_May_Reduction
() {
_state
|=
IPA_LNO_FORMAL_MAY_REDUC
;};
155
void
Reset_May_Reduction
() {
_state
&= ~
IPA_LNO_FORMAL_MAY_REDUC
;};
156
// IPA_LNO_FORMAL_SCALAR
157
BOOL
Is_Scalar
()
const
{
return
_state
&
IPA_LNO_FORMAL_SCALAR
;};
158
BOOL
Is_Array
()
const
{
return
_state
&
IPA_LNO_FORMAL_ARRAY
;};
159
BOOL
Is_Unknown
()
const
{
return
_state
&
IPA_LNO_FORMAL_UNKNOWN
;};
160
void
Set_Scalar
() {
_state
|=
IPA_LNO_FORMAL_SCALAR
;};
161
void
Set_Array
() {
_state
|=
IPA_LNO_FORMAL_ARRAY
;};
162
void
Set_Unknown
() {
_state
|=
IPA_LNO_FORMAL_UNKNOWN
;};
163
void
Reset_Scalar
() {
_state
&= ~
IPA_LNO_FORMAL_SCALAR
;};
164
void
Reset_Array
() {
_state
&= ~
IPA_LNO_FORMAL_ARRAY
;};
165
void
Reset_Unknown
() {
_state
&= ~
IPA_LNO_FORMAL_UNKNOWN
;};
166
void
Print
(FILE* fp,
INT
formal_index = -1);
167
};
168
169
class
IPA_LNO_SUMMARY_GLOBAL
{
170
private
:
171
ST_IDX
_st_idx
;
172
mINT32
_mod_array_section_index
: 31;
173
mUINT32
_may_kill
: 1;
174
mINT32
_ref_array_section_index
: 31;
175
mUINT32
_use
: 1;
176
177
public
:
178
IPA_LNO_SUMMARY_GLOBAL
(
ST_IDX
st_idx,
179
INT32
array_mod,
180
INT32
array_ref,
181
BOOL
scalar_mod,
182
BOOL
scalar_ref) :
183
_st_idx
(st_idx),
184
_mod_array_section_index
(array_mod),
185
_may_kill
(scalar_mod),
186
_ref_array_section_index
(array_ref),
187
_use
(scalar_ref)
188
{}
189
190
ST_IDX
St_Idx
()
const
{
return
_st_idx
; }
191
INT
Mod_Array_Section_Index
()
const
{
return
_mod_array_section_index
; }
192
INT
Ref_Array_Section_Index
()
const
{
return
_ref_array_section_index
; }
193
BOOL
Is_May_Kill
()
const
{
return
_may_kill
; }
194
BOOL
Is_Use
()
const
{
return
_use
; }
195
196
void
Set_St_Idx
(
INT
v) {
_st_idx
= v; }
197
void
Set_Mod_Array_Section_Index
(
INT
v) {
_mod_array_section_index
= v; }
198
void
Set_Ref_Array_Section_Index
(
INT
v) {
_ref_array_section_index
= v; }
199
void
Set_May_Kill
() {
_may_kill
=
TRUE
; }
200
void
Set_Use
() {
_use
=
TRUE
; }
201
202
BOOL
Is_Scalar
()
const
{
return
TY_kind
(
ST_type
(
_st_idx
)) !=
KIND_ARRAY
; }
203
204
void
Print
(FILE* fp,
INT
common_index = -1);
205
};
206
207
#endif // cxx_ipa_lno_summary_INCLUDED
Open64
osprey1.0
be
com
ipa_lno_summary.h
Generated on Fri Mar 14 2014 04:22:55 for OpenADFortTk (including Open64 and OpenAnalysis references) by
1.8.4