00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef cg_INCLUDED
00041 #define cg_INCLUDED
00042
00043
00044
00045 #include "opt_alias_interface.h"
00046 #include "region_util.h"
00047
00048 #include "wn.h"
00049 #include "dwarf_DST_mem.h"
00050 #include "symtab.h"
00051 #if defined(TARG_SL) || defined(TARG_MIPS)
00052 #include "register.h"
00053 #endif
00054
00055
00056
00057
00058 struct bb;
00059
00060 extern BOOL PU_Has_Calls;
00061 extern BOOL PU_References_GP;
00062 #ifdef TARG_IA64
00063 extern BOOL GRA_optimize_restore_pr;
00064 extern BOOL GRA_optimize_restore_b0_ar_pfs;
00065 extern BOOL GRA_optimize_restore_ar_lc;
00066 extern BOOL EBO_data_spec;
00067 extern BOOL edge_done;
00068 #endif
00069 #ifdef KEY
00070 extern BOOL PU_Has_Exc_Handler;
00071 extern BOOL PU_Has_Nonlocal_Goto_Target;
00072 extern BOOL CG_file_scope_asm_seen;
00073 #endif
00074
00075 #ifdef TARG_X8664
00076 extern BOOL PU_References_GOT;
00077 #endif
00078
00079 extern BOOL CG_PU_Has_Feedback;
00080
00081 #if defined(TARG_IA64) || defined(TARG_SL) || defined(TARG_MIPS)
00082 extern BOOL RGN_Formed;
00083 #endif
00084
00085
00086 extern struct ALIAS_MANAGER *Alias_Manager;
00087
00088 #ifdef __cplusplus
00089 extern "C" {
00090 #endif
00091
00092
00093
00094
00095 extern WN *CG_Generate_Code (
00096 WN *rwn,
00097 struct ALIAS_MANAGER *am,
00098 DST_IDX pu_dst,
00099 BOOL region
00100 );
00101
00102 extern void CG_PU_Initialize( WN *wn );
00103 extern void CG_PU_Finalize( void );
00104
00105 extern void CG_Change_Elf_Symbol_To_Undefined (ST* st);
00106
00107
00108
00109 extern void Init_gen_quad_preg(void);
00110
00111 #ifdef __cplusplus
00112 }
00113 #endif
00114
00115
00116 extern void Trace_IR (
00117 INT phase,
00118 const char *pname,
00119 #ifdef TARG_IA64
00120 struct bb *bb,
00121 BOOL after = TRUE
00122 #else
00123 struct bb *bb
00124 #endif
00125 );
00126
00127
00128 extern void Check_for_Dump (
00129 INT phase,
00130 struct bb *bb
00131 );
00132
00133
00134
00135
00136
00137
00138 extern BOOL Get_Trace ( INT func, INT arg, struct bb *bb );
00139
00140
00141 extern MEM_POOL MEM_local_region_pool;
00142 extern MEM_POOL MEM_local_region_nz_pool;
00143
00144 extern RID *Current_Rid;
00145
00146 #if defined(TARG_SL) || defined(TARG_MIPS)
00147 extern void CG_Dump_Cur_Region();
00148 extern REGISTER_SET caller_saved_regs_used[ISA_REGISTER_CLASS_MAX+1];
00149 extern void IPISR_Insert_Spills();
00150 #endif
00151 #if defined(TARG_IA64) || defined(TARG_SL) || defined(TARG_MIPS)
00152
00153 extern BOOL RGN_Formed;
00154 #endif
00155
00156 #endif