00001 /* IPA handling of references. 00002 Copyright (C) 2004-2005 Free Software Foundation, Inc. 00003 Contributed by Kenneth Zadeck <zadeck@naturalbridge.com> 00004 00005 This file is part of GCC. 00006 00007 GCC is free software; you can redistribute it and/or modify it under 00008 the terms of the GNU General Public License as published by the Free 00009 Software Foundation; either version 2, or (at your option) any later 00010 version. 00011 00012 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00013 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with GCC; see the file COPYING. If not, write to the Free 00019 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. */ 00021 00022 #ifndef GCC_IPA_REFERENCE_H 00023 #define GCC_IPA_REFERENCE_H 00024 #include "bitmap.h" 00025 #include "tree.h" 00026 00027 /* The static variables defined within the compilation unit that are 00028 loaded or stored directly by function that owns this structure. */ 00029 00030 struct ipa_reference_local_vars_info_d 00031 { 00032 bitmap statics_read; 00033 bitmap statics_written; 00034 00035 /* Set when this function calls another function external to the 00036 compilation unit or if the function has a asm clobber of memory. 00037 In general, such calls are modeled as reading and writing all 00038 variables (both bits on) but sometime there are attributes on the 00039 called function so we can do better. */ 00040 bool calls_read_all; 00041 bool calls_write_all; 00042 }; 00043 00044 struct ipa_reference_global_vars_info_d 00045 { 00046 bitmap statics_read; 00047 bitmap statics_written; 00048 bitmap statics_not_read; 00049 bitmap statics_not_written; 00050 }; 00051 00052 /* Statics that are read and written by some set of functions. The 00053 local ones are based on the loads and stores local to the function. 00054 The global ones are based on the local info as well as the 00055 transitive closure of the functions that are called. The 00056 structures are separated to allow the global structures to be 00057 shared between several functions since every function within a 00058 strongly connected component will have the same information. This 00059 sharing saves both time and space in the computation of the vectors 00060 as well as their translation from decl_uid form to ann_uid 00061 form. */ 00062 00063 typedef struct ipa_reference_local_vars_info_d *ipa_reference_local_vars_info_t; 00064 typedef struct ipa_reference_global_vars_info_d *ipa_reference_global_vars_info_t; 00065 00066 struct ipa_reference_vars_info_d 00067 { 00068 ipa_reference_local_vars_info_t local; 00069 ipa_reference_global_vars_info_t global; 00070 }; 00071 00072 typedef struct ipa_reference_vars_info_d *ipa_reference_vars_info_t; 00073 00074 /* In ipa-reference.c */ 00075 bitmap ipa_reference_get_read_local (tree fn); 00076 bitmap ipa_reference_get_written_local (tree fn); 00077 bitmap ipa_reference_get_read_global (tree fn); 00078 bitmap ipa_reference_get_written_global (tree fn); 00079 bitmap ipa_reference_get_not_read_global (tree fn); 00080 bitmap ipa_reference_get_not_written_global (tree fn); 00081 00082 #endif /* GCC_IPA_REFERENCE_H */ 00083
1.5.6