00001 /* 00002 * Copyright 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of version 2 of the GNU General Public License as 00006 * published by the Free Software Foundation. 00007 * 00008 * This program is distributed in the hope that it would be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00011 * 00012 * Further, this software is distributed without any warranty that it is 00013 * free of the rightful claim of any third person regarding infringement 00014 * or the like. Any license provided herein, whether implied or 00015 * otherwise, applies only to this software file. Patent licenses, if 00016 * any, provided herein do not apply to combinations of this program with 00017 * other software, or any other product whatsoever. 00018 * 00019 * You should have received a copy of the GNU General Public License along 00020 * with this program; if not, write the Free Software Foundation, Inc., 59 00021 * Temple Place - Suite 330, Boston MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef _GCCFE_WFE_OMP_DIRECIVES_H_ 00025 #define _GCCFE_WFE_OMP_DIRECIVES_H_ 00026 00027 struct ST_list { 00028 ST *st; 00029 ST_list *next; 00030 } ; 00031 00032 struct WN_list { 00033 WN *wn; 00034 WN_list *next; 00035 } ; 00036 00037 struct schedule_2_wn 00038 { 00039 enum schedule_kind_type schedule_2_kind; 00040 WN *chunk_size_wn; 00041 }; 00042 00043 struct Parallel_clause_wn_type 00044 { 00045 WN *if_clause; 00046 WN *num_threads_clause; 00047 ST_list *private_clause; 00048 ST_list *firstprivate_clause; 00049 ST_list *shared_clause; 00050 ST_list *copyin_clause; 00051 WN_list *reduction_clause; 00052 enum default_type default_clause; // needs to specify how to value 00053 } ; 00054 00055 00056 00057 extern void 00058 WFE_expand_start_parallel (struct Parallel_clause_wn_type * parallel_clause_wn); 00059 00060 extern void 00061 WFE_expand_end_parallel (); 00062 00063 struct For_clause_wn_type 00064 { 00065 ST_list *private_clause; 00066 ST_list *firstprivate_clause; 00067 ST_list *lastprivate_clause; 00068 WN_list *reduction_clause; 00069 bool ordered_clause; 00070 enum schedule_kind_type schedule_1_clause; 00071 struct schedule_2_wn schedule_2_clause; 00072 bool nowait_clause; 00073 }; 00074 00075 extern void 00076 WFE_expand_start_for (struct For_clause_wn_type * for_clause_wn); 00077 00078 extern void 00079 WFE_expand_end_for( ); 00080 00081 struct Sections_clause_wn_type 00082 { 00083 ST_list *private_clause; 00084 ST_list *firstprivate_clause; 00085 ST_list *lastprivate_clause; 00086 WN_list *reduction_clause; 00087 bool nowait_clause; 00088 }; 00089 00090 extern void 00091 WFE_expand_start_sections (struct Sections_clause_wn_type * sections_clause_wn); 00092 00093 extern void 00094 WFE_expand_end_sections( ); 00095 00096 extern void 00097 WFE_expand_start_section (); 00098 00099 extern void 00100 WFE_expand_end_section ( ); 00101 00102 #ifdef TARG_SL2 00103 extern void 00104 WFE_expand_start_sl2_sections (BOOL is_minor_thread); 00105 00106 extern void 00107 WFE_expand_end_sl2_sections( ); 00108 00109 extern void 00110 WFE_expand_start_sl2_section (BOOL is_minor_thread); 00111 00112 extern void 00113 WFE_expand_end_sl2_section (); 00114 #endif 00115 00116 00117 00118 struct Single_clause_wn_type 00119 { 00120 ST_list *private_clause; 00121 ST_list *firstprivate_clause; 00122 ST_list *copyprivate_clause; 00123 bool nowait_clause; 00124 }; 00125 00126 extern void 00127 WFE_expand_start_single (struct Single_clause_wn_type * single_clause_wn); 00128 00129 extern void 00130 WFE_expand_end_single( ); 00131 00132 struct Parallel_for_clause_wn_type 00133 { 00134 WN *if_clause; 00135 WN *num_threads_clause; 00136 ST_list *private_clause; 00137 ST_list *firstprivate_clause; 00138 ST_list *lastprivate_clause; 00139 ST_list *shared_clause; 00140 ST_list *copyin_clause; 00141 WN_list *reduction_clause; 00142 enum default_type default_clause; // needs to specify how to value 00143 bool ordered_clause; 00144 enum schedule_kind_type schedule_1_clause; 00145 struct schedule_2_wn schedule_2_clause; 00146 }; 00147 00148 extern void WFE_expand_start_parallel_for 00149 (struct Parallel_for_clause_wn_type * parallel_for_clause_wn); 00150 00151 extern void WFE_expand_end_parallel_for (); 00152 00153 struct Parallel_sections_clause_wn_type 00154 { 00155 WN *if_clause; 00156 WN *num_threads_clause; 00157 ST_list *private_clause; 00158 ST_list *firstprivate_clause; 00159 ST_list *lastprivate_clause; 00160 ST_list *shared_clause; 00161 ST_list *copyin_clause; 00162 WN_list *reduction_clause; 00163 enum default_type default_clause; // needs to specify how to value 00164 } ; 00165 00166 extern void WFE_expand_start_parallel_sections 00167 (struct Parallel_sections_clause_wn_type * parallel_sections_clause_wn); 00168 00169 extern void WFE_expand_end_parallel_sections (); 00170 00171 extern void WFE_expand_start_master ( ); 00172 00173 extern void WFE_expand_end_master (); 00174 00175 extern void WFE_expand_start_critical (ST *region_phrase,char* name); 00176 00177 extern void WFE_expand_end_critical ( ); 00178 00179 extern void WFE_expand_start_atomic (); 00180 00181 extern void WFE_expand_end_atomic (); 00182 00183 extern void WFE_expand_start_ordered ( ); 00184 00185 extern void WFE_expand_end_ordered ( ); 00186 00187 extern void WFE_expand_barrier ( ); 00188 00189 extern void WFE_expand_flush (WN_list *flush_variables); 00190 00191 extern void WFE_expand_threadprivate (ST_list *threadprivate_variables); 00192 00193 extern void WFE_expand_start_do_loop (WN *, WN *, WN *, WN *, struct nesting *); 00194 00195 extern void WFE_expand_end_do_loop (struct nesting *); 00196 00197 extern BOOL Trace_Omp; 00198 #endif 00199
1.5.6