Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
cwh_io.i
Go to the documentation of this file.
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 typedef struct impdo_info IMPDO_INFO;
00036 typedef struct marked_set MARKED_SET;
00037 
00038 struct impdo_info {
00039    ST *index;
00040    struct impdo_info *next;
00041 };
00042 
00043 struct marked_set {
00044    ST *st;
00045    struct marked_set *next;
00046 };
00047 
00048 typedef struct nlist {
00049    WN *wn;
00050    struct nlist *next;
00051 } NLIST;
00052 
00053 #define Impdo_index(x) ((x)->index)
00054 #define Impdo_next(x) ((x)->next)
00055 
00056 #define Nlist_wn(x) ((x)->wn)
00057 #define Nlist_next(x) ((x)->next)
00058 
00059 #define Marked_st(x) ((x)->st)
00060 #define Marked_next(x) ((x)->next)
00061 
00062 static WN * cwh_io_create_new_label(void);
00063 static ST * cwh_io_ST_base(ST *st);
00064 static BOOL cwh_io_analyse_io_statement(WN *tree, int mode);
00065 static BOOL cwh_io_analyse_io_item(WN *tree, IMPDO_INFO *impdo_set, int mode);
00066 static BOOL cwh_io_analyse_expr(WN *tree, IMPDO_INFO *impdo_set, int mode);
00067 static BOOL cwh_io_analyse_arr(WN *tree, IMPDO_INFO *impdo_set, int mode);
00068 static INT32 cwh_io_analyse_index_expr(WN *tree, IMPDO_INFO *impdo_set, int mode);
00069 static INT32 member(ST *st, IMPDO_INFO *impdo_set);
00070 static void cwh_io_create_dopes(WN *tree);
00071 static void cwh_io_create_dope_from_item(WN *parent, int kid_num,
00072                         IMPDO_INFO *impdo_set);
00073 static WN * cwh_io_conv_array_to_dope(WN *arr, IMPDO_INFO *impdo_set,
00074                                       WN *old_item, WN *char_len, TY_IDX ty,
00075                                       WN *craytype);
00076 static WN * cwh_io_conv_arrsection_to_dope(WN *arr, IMPDO_INFO *impdo_set,
00077                                       WN *old_item, WN *char_len, TY_IDX ty,
00078                                       WN *craytype);
00079 static INT32 cwh_io_search_implied_do_index(WN *tree, IMPDO_INFO *impdo_set);
00080 static void cwh_io_add_st_to_marked_set(ST *st);
00081 static void cwh_io_unmark(void);
00082 static WN * Substitute_1_For_Impdo_Index_Val(WN *tree, IMPDO_INFO *impdo);
00083 static void cwh_io_split_io_statement(WN *tree);
00084 static void cwh_io_split_io_items(IOSTATEMENT ios, WN **cilist,
00085                                   INT32 num_cilist_items, WN *item);
00086 static BOOL OPCODE_has_aux(const OPCODE opc);
00087 static BOOL is_f90_pointer(WN *tree);
00088 
00089 INT cwh_io_in_ioblock = 0; /* are we in an I/O statement? */
00090 
00091 static WN * cwh_io_cvt_tos_label_to_wn(BOOL flag);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines