OpenADFortTk (including Open64 and OpenAnalysis references)
 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 
48 private:
59 
60 public:
63  _formal_index (-1),
64  _global_index (-1),
65  _value_index (-1),
66  _expr_index (-1),
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; }
84  { return _has_incomplete_array_info; }
85  void Set_St_Idx(ST_IDX v) { _st_idx = v; }
88  void Set_Value_Index(INT v) { _value_index = v; }
89  void Set_Expr_Index(INT v) { _expr_index = v; }
92  void Set_Value_Count(INT v) { _value_count = v; }
93  void Set_Expr_Count(INT v) { _expr_count = v; }
96 
97  void Print(FILE* fp, INT procedure_index = -1);
98 };
99 
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
117 public:
121  INT Position() const {return _position;};
122  INT Machine_Type() const {return _machine_type;};
126  void Clear_State() {_state = 0;};
127  void Set_Position(INT v) {_position = v;};
132  // IPA_LNO_FORMAL_MUST_KILL
136  // IPA_LNO_FORMAL_MAY_KILL
140  // IPA_LNO_FORMAL_EXP_USE
144  // IPA_LNO_FORMAL_USE
145  BOOL Is_Use() const {return _state & IPA_LNO_FORMAL_USE;};
148  // IPA_LNO_FORMAL_MUST_REDUC
152  // IPA_LNO_FORMAL_MAY_REDUC
156  // IPA_LNO_FORMAL_SCALAR
158  BOOL Is_Array() const {return _state & IPA_LNO_FORMAL_ARRAY;};
166  void Print(FILE* fp, INT formal_index = -1);
167 };
168 
170 private:
176 
177 public:
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; }
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; }
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