Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 int parallel_do_count; 00036 00037 /* table to map asserts to whirl nodes */ 00038 /* the MIPS_ASSERT_* are defined in fe90/i_cvrt.h, this table must be sync-ed */ 00039 static struct { 00040 int fe_enum; 00041 WN_PRAGMA_ID wn_pragma_id; 00042 } map_asserts[] = { 00043 /* 0 */ { 0, WN_PRAGMA_UNDEFINED } /* 0'th index doesnt exist */, 00044 /* 1 */ {MIPS_ASSERT_ARGUMENTALIASING, WN_PRAGMA_KAP_ASSERT_ARGUMENT_ALIASING}, 00045 /* 2 */ {MIPS_ASSERT_NOARGUMENTALIASING, WN_PRAGMA_KAP_ASSERT_NO_ARGUMENT_ALIASING}, 00046 /* 3 */ {MIPS_ASSERT_BOUNDSVIOLATIONS, WN_PRAGMA_KAP_ASSERT_BOUNDS_VIOLATIONS}, 00047 /* 4 */ {MIPS_ASSERT_NOBOUNDSVIOLATIONS, WN_PRAGMA_KAP_ASSERT_NOBOUNDS_VIOLATIONS}, 00048 /* 5 */ {MIPS_ASSERT_CONCURRENTCALL, WN_PRAGMA_KAP_ASSERT_CONCURRENT_CALL}, 00049 /* 6 */ {MIPS_ASSERT_NOCONCURRENTCALL, WN_PRAGMA_KAP_ASSERT_NO_CONCURRENT_CALL}, 00050 /* 7 */ {MIPS_ASSERT_NORECURRENCE, WN_PRAGMA_KAP_ASSERT_NORECURRENCE}, 00051 /* 8 */ {MIPS_ASSERT_DOPREFER, WN_PRAGMA_KAP_ASSERT_DOPREFER}, 00052 /* 9 */ {MIPS_ASSERT_EQUIVALENCEHAZARD, WN_PRAGMA_KAP_ASSERT_EQUIVALENCE_HAZARD}, 00053 /* 10 */ {MIPS_ASSERT_NOEQUIVALENCEHAZARD, WN_PRAGMA_KAP_ASSERT_NOEQUIVALENCE_HAZARD}, 00054 /* 11 */ {MIPS_ASSERT_LASTVALUENEEDED, WN_PRAGMA_KAP_ASSERT_LAST_VALUE_NEEDED}, 00055 /* 12 */ {MIPS_ASSERT_LASTVALUESNEEDED, WN_PRAGMA_KAP_ASSERT_LAST_VALUE_NEEDED}, 00056 /* 13 */ {MIPS_ASSERT_NOLASTVALUENEEDED, WN_PRAGMA_KAP_ASSERT_NOLAST_VALUE_NEEDED}, 00057 /* 14 */ {MIPS_ASSERT_NOLASTVALUESNEEDED, WN_PRAGMA_KAP_ASSERT_NOLAST_VALUE_NEEDED}, 00058 /* 15 */ {MIPS_ASSERT_PERMUTATION, WN_PRAGMA_KAP_ASSERT_PERMUTATION}, 00059 /* 16 */ {MIPS_ASSERT_RELATION, WN_PRAGMA_KAP_ASSERT_RELATION}, 00060 /* 17 */ {MIPS_ASSERT_NOSYNC, WN_PRAGMA_KAP_ASSERT_NOSYNC}, 00061 /* 18 */ {MIPS_ASSERT_TEMPORARIESFORCONSTANTARGUMENTS, WN_PRAGMA_KAP_ASSERT_TEMPORARIES_FOR_CONSTANT_ARGUMENTS}, 00062 /* 19 */ {MIPS_ASSERT_NOTEMPORARIESFORCONSTANTARGUMENTS, WN_PRAGMA_KAP_ASSERT_NOTEMPORARIES_FOR_CONSTANT_ARGUMENTS}, 00063 /* 20 */ {MIPS_ASSERT_DO, WN_PRAGMA_KAP_ASSERT_DO}, 00064 /* 21 */ {MIPS_ASSERT_BENIGN, WN_PRAGMA_KAP_ASSERT_BENIGN}, 00065 /* 22 */ {MIPS_ASSERT_DEPENDENCE, WN_PRAGMA_KAP_ASSERT_DEPENDENCE}, 00066 /* 23 */ {MIPS_ASSERT_FREQUENCY, WN_PRAGMA_KAP_ASSERT_FREQUENCY}, 00067 /* 24 */ {MIPS_ASSERT_IGNOREANYDEPENDENCES, WN_PRAGMA_KAP_ASSERT_IGNORE_ANY_DEPENDENCE}, 00068 /* 25 */ {MIPS_ASSERT_IGNOREANYDEPENDENCE, WN_PRAGMA_KAP_ASSERT_IGNORE_ANY_DEPENDENCE}, 00069 /* 26 */ {MIPS_ASSERT_IGNOREASSUMEDDEPENDENCES, WN_PRAGMA_KAP_ASSERT_IGNORE_ASSUMED_DEPENDENCE}, 00070 /* 27 */ {MIPS_ASSERT_IGNOREASSUMEDDEPENDENCE, WN_PRAGMA_KAP_ASSERT_IGNORE_ASSUMED_DEPENDENCE}, 00071 /* 28 */ {MIPS_ASSERT_NOINTERCHANGE, WN_PRAGMA_KAP_ASSERT_NO_INTERCHANGE}, 00072 /* 29 */ {MIPS_ASSERT_USECOMPRESS, WN_PRAGMA_KAP_ASSERT_USE_COMPRESS}, 00073 /* 30 */ {MIPS_ASSERT_USEEXPAND, WN_PRAGMA_KAP_ASSERT_USE_EXPAND}, 00074 /* 31 */ {MIPS_ASSERT_USECONTROLLEDSTORE, WN_PRAGMA_KAP_ASSERT_USE_CONTROLLED_STORE}, 00075 /* 32 */ {MIPS_ASSERT_USEGATHER, WN_PRAGMA_KAP_ASSERT_USE_GATHER}, 00076 /* 33 */ {MIPS_ASSERT_USESCATTER, WN_PRAGMA_KAP_ASSERT_USE_SCATTER} 00077 }; 00078 00079 00080 static WN * do_loop_directive_block=NULL; 00081 static void cwh_directive_pragma_to_region(WN * prag, WN * region) ; 00082 static void cwh_directive_set_PU_flags(BOOL nested); 00083 static void cwh_directive_set_LNO_flags(void); 00084 static void cwh_directive_pop_and_nowait( BOOL nowait, BOOL is_omp); 00085 static void cwh_directive_pop_and_nowait_or_copyprivate( BOOL nowait); 00086 static void cwh_directive_add_pragma_to_loop(WN * wn, BOOL is_omp); 00087 static void cwh_directive_work_dist(INT32 work_dist, INT32 work_dist_opnd) ; 00088 static void cwh_directive_load_value_pragma(INT32 item, WN_PRAGMA_ID pragma, BOOL is_omp = FALSE); 00089 static void cwh_directive_fill_align(INT32 count,INT32 C_value, WN_PRAGMA_ID pragma ) ; 00090 00091 00092