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 * 00037 * Block stack to maintain DO/IF/PDO etc blocks. 00038 * A list of statements to be deferred to the end of the block 00039 * may be maintained - these are added when the block is popped. 00040 * Similarly statements may be appended to the enclosing BLOCK 00041 * when the block is popped. 00042 * 00043 * A block can be a WN REGION (mp DO etc), or some form of 00044 * control flow structure 00045 * 00046 */ 00047 00048 typedef struct { 00049 WN *wn; /* may be a block or a region */ 00050 union { 00051 struct { 00052 WN *deferred; /* deferred statements for end of block */ 00053 WN *append; /* deferred statements to append after block */ 00054 } block; 00055 WN *region_parent; /* block holding this region */ 00056 } u; 00057 00058 UINT32 is_parallel_do:1 ; /* this loop is a parallel loop (may be a pseudo nested one */ 00059 UINT32 is_top_pdo:1 ; /* this loop is the top DO of a C$PAR PDO */ 00060 00061 } block_stack_t; 00062 00063 static block_stack_t *block_stack; 00064 static INT32 block_stack_size = 0; 00065 static INT32 block_stack_top = -1; 00066 #define BLOCK_CHUNK_SIZE 20 00067 00068 00069 /* WN blocks */ 00070 00071 static WN * WN_block ; /* Current OPC_BLOCK to tack WNs onto */ 00072 static WN * WN_decl_block ; /* statements created at declaration time, */ 00073 /* to be placed first into PU block */ 00074 static WN * WN_copyin_block ; /* statements created at declaration time, */ 00075 /* to be placed last in the preamble block */ 00076 static WN * WN_defer_block ; /* Block of statements to add at end of */ 00077 /* current statement. By call to fei_stmt. */ 00078 static WN * WN_top_of_loop_block ; /* MP directives added to top of DO loop */ 00079 00080 00081 static BOOL cwh_block_add_debug_line ; /* in routine's preamble = FALSE */ 00082 00083 /* forward references */ 00084 00085 static void cwh_block_bump(void) ; 00086 static WN** cwh_block_find_address(enum block_id id); 00087 00088 #define cwh_block_current_inline() WN_block 00089 #define cwh_block_decl() WN_decl_block 00090 00091