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 00036 /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */ 00037 #ifndef anl_dir_attribute_INCLUDED 00038 #define anl_dir_attribute_INCLUDED 00039 00040 // ============================================================== 00041 // ============================================================== 00042 // 00043 // 00044 // Description: 00045 // 00046 // This defines a class representing a directive attribute, which 00047 // should belong to some enclosing construct (function, loop, etc.). 00048 // 00049 // ============================================================== 00050 // ============================================================== 00051 00052 00053 class ANL_FUNC_ENTRY; 00054 class ANL_SRCPOS; 00055 00056 00057 class ANL_PRAGMA_ATTRIBUTE 00058 { 00059 private: 00060 00061 enum ANL_PRAGMA_ATTR_KIND 00062 { 00063 ANL_UNKNOWN_ATTR, 00064 ANL_PREFETCH_REF_ATTR, 00065 ANL_DISTRIBUTE_ATTR, 00066 ANL_REDISTRIBUTE_ATTR, 00067 ANL_DISTRIBUTE_RESHAPE_ATTR, 00068 ANL_DYNAMIC_ATTR, 00069 ANL_COPYIN_ATTR, 00070 ANL_NUMTHREADS_ATTR, 00071 ANL_PAGE_PLACE_ATTR, 00072 ANL_CONCURRENTIZE, 00073 ANL_NOCONCURRENTIZE, 00074 ANL_ASSERT_PERMUTATION, 00075 ANL_ASSERT_CONCURRENT_CALL, 00076 ANL_ASSERT_DO, 00077 ANL_ASSERT_DOPREFER, 00078 ANL_IVDEP, 00079 ANL_FLUSH, 00080 ANL_NUM_ATTRS 00081 }; 00082 00083 ANL_PRAGMA_ATTR_KIND _pragma_kind; 00084 WN *_apragma; 00085 ANL_FUNC_ENTRY *_func_entry; 00086 INT32 _enclosing_construct_level; 00087 MEM_POOL *_pool; 00088 00089 static void _Append_Arg_Numbers(ANL_CBUF *cbuf, 00090 INT32 val1, 00091 INT32 val2); 00092 00093 BOOL _Is_Assertion(); 00094 void _Write_Distribution(ANL_CBUF *cbuf, WN **next); 00095 void _Write_Pragma_Arguments(ANL_CBUF *cbuf); 00096 void _Write_Pragma(ANL_CBUF *cbuf); 00097 00098 public: 00099 00100 // =================== Class Utilities ==================== 00101 00102 static BOOL Is_ProMpf_Pragma_Attribute(WN *stmt); 00103 00104 00105 // ============== Constructors & Destructors ============== 00106 00107 ANL_PRAGMA_ATTRIBUTE(WN *apragma, 00108 INT32 enclosing_construct_level, 00109 ANL_FUNC_ENTRY *func_entry, 00110 MEM_POOL *pool); 00111 00112 00113 // ======================== Queries ======================== 00114 00115 BOOL Is_Pragma_Construct_Attribute(INT32 construct_level); 00116 BOOL Is_Region_Construct_Attribute(INT32 construct_level); 00117 BOOL Is_Loop_Construct_Attribute(INT32 construct_level); 00118 00119 00120 // =================== Analysis and Output ================= 00121 00122 WN *Next_Stmt(); // Stmt after last clause belonging to this directive 00123 00124 void Write(ANL_CBUF *cbuf, INT32 id); 00125 00126 00127 }; // class ANL_PRAGMA_ATTRIBUTE 00128 00129 #endif /* anl_pragma_attribute_INCLUDED */