osprey/be/cg/calls.cxx File Reference

#include "defs.h"
#include "erglob.h"
#include "erbe.h"
#include "glob.h"
#include "tracing.h"
#include "config_targ.h"
#include "config.h"
#include "symtab.h"
#include "strtab.h"
#include "be_symtab.h"
#include "targ_isa_lits.h"
#include "topcode.h"
#include "cg.h"
#include "cg_internal.h"
#include "cg_flags.h"
#include "register.h"
#include "tn.h"
#include "tn_set.h"
#include "bb.h"
#include "op.h"
#include "tn_map.h"
#include "cgemit.h"
#include "ttype.h"
#include "calls.h"
#include "const.h"
#include "data_layout.h"
#include "cgexp.h"
#include "targ_sim.h"
#include "whirl2ops.h"
#include "cg_spill.h"
#include "reg_live.h"
#include "lra.h"
#include "cgtarget.h"
#include "entry_exit_targ.h"
#include "targ_abi_properties.h"
#include "cxx_template.h"
#include "targ_isa_registers.h"

Include dependency graph for calls.cxx:

Go to the source code of this file.

Defines

#define Use_Scratch_GP(need_gp_setup)   ((need_gp_setup) && !PU_Has_Calls && !PU_has_region(Get_Current_PU()))

Enumerations

enum  {
  undefined_code, never_code, no_code, need_code,
  final_code
}

Functions/Subroutines

void Clean_Up (BB *bb)
void Split_BB_For_br (BB *bb)
static void Init_Pregs (void)
static void Setup_GP_TN_For_PU (ST *pu)
void Init_Callee_Saved_Regs_for_REGION (ST *pu, BOOL is_region)
static void Generate_Entry (BB *bb, BOOL gra_run)
BOOL Is_Function_Value (TN *tn)
static OPFind_Call_Addr_Load (BB *call_bb, INT *iopnd)
static BBCan_Be_Tail_Call (ST *pu_st, BB *exit_bb)
static BOOL Can_Do_Tail_Calls_For_PU ()
void Optimize_Tail_Calls (ST *pu)
static void Target_Unique_Exit (BB *bb, BB *unique_exit_bb, TN *rtn_tns[ISA_REGISTER_CLASS_MAX+1][REGISTER_MAX+1])
static void Generate_Unique_Exit (void)
static void Generate_Exit (ST *st, BB *bb, BOOL gra_run, BOOL is_region)
void Set_Frame_Len (INT64 val)
void Init_Entry_Exit_Code (WN *pu_wn)
void Generate_Entry_Exit_Code (ST *pu, BOOL is_region)
static void Adjust_GP_Entry (BB *bb)
static void Adjust_GP_Exit (BB *bb)
void Adjust_GP_Setup_Code (ST *pu, BOOL allocate_registers)
static void Adjust_LC_Entry (BB *bb)
static void Adjust_LC_Exit (BB *bb)
void Adjust_LC_Setup_Code (void)
static void Assign_Prolog_Temps (OP *first, OP *last, REGISTER_SET *temps)
static TNGen_Prolog_LDIMM64 (UINT64 val, OPS *ops)
static void Adjust_Entry (BB *bb)
static void Adjust_Exit (ST *pu_st, BB *bb)
static void Adjust_Alloca_Code (void)
void Adjust_Entry_Exit_Code (ST *pu)

Variables

INT64 Frame_Len
BOOL IPFEC_Enable_Edge_Profile
SAVE_REGCallee_Saved_Regs
INT32 Callee_Saved_Regs_Count
PREG_NUMCallee_Saved_Pregs
PREG_NUM Caller_FP_Preg
PREG_NUM Caller_GP_Preg
PREG_NUM Return_Preg
PREG_NUM GP_Preg
PREG_NUM Return_Int_Preg [2]
PREG_NUM Return_Float_Preg [2]
static SAVE_REG Return_Address_Reg_Map
SAVE_REGReturn_Address_Reg = &Return_Address_Reg_Map
static enum { ... }  GP_Setup_Code
BOOL LC_Used_In_PU
static TNCaller_GP_TN
static TNCaller_FP_TN
static TNCaller_Pfs_TN
static TNra_intsave_tn
static TNFrame_Len_TN
static TNNeg_Frame_Len_TN
BOOL Gen_Frame_Pointer
static BOOL Trace_EE = FALSE


Define Documentation

#define Use_Scratch_GP ( need_gp_setup   )     ((need_gp_setup) && !PU_Has_Calls && !PU_has_region(Get_Current_PU()))

Definition at line 187 of file calls.cxx.

Referenced by Generate_Entry(), Generate_Exit(), and Setup_GP_TN_For_PU().


Enumeration Type Documentation

anonymous enum

Enumerator:
undefined_code 
never_code 
no_code 
need_code 
final_code 

Definition at line 140 of file calls.cxx.


Function Documentation

static void Adjust_Alloca_Code ( void   )  [static]

static void Adjust_Entry ( BB bb  )  [static]

void Adjust_Entry_Exit_Code ( ST pu  ) 

static void Adjust_Exit ( ST pu_st,
BB bb 
) [static]

static void Adjust_GP_Entry ( BB bb  )  [static]

static void Adjust_GP_Exit ( BB bb  )  [static]

void Adjust_GP_Setup_Code ( ST pu,
BOOL  allocate_registers 
)

static void Adjust_LC_Entry ( BB bb  )  [static]

static void Adjust_LC_Exit ( BB bb  )  [static]

void Adjust_LC_Setup_Code ( void   ) 

static void Assign_Prolog_Temps ( OP first,
OP last,
REGISTER_SET temps 
) [static]

static BB* Can_Be_Tail_Call ( ST pu_st,
BB exit_bb 
) [static]

static BOOL Can_Do_Tail_Calls_For_PU (  )  [static]

void Clean_Up ( BB bb  ) 

static OP* Find_Call_Addr_Load ( BB call_bb,
INT iopnd 
) [static]

Definition at line 896 of file calls.cxx.

References BB_last_op, i, INT, NULL, OP_load, OP_opnd, OP_opnds, OP_prev, OP_result, OP_results, TN_is_ep_reg, and TN_is_symbol.

Referenced by Can_Be_Tail_Call().

static TN* Gen_Prolog_LDIMM64 ( UINT64  val,
OPS ops 
) [static]

Definition at line 2173 of file calls.cxx.

References Build_TN_Of_Mtype(), Exp_Immediate(), Gen_Literal_TN(), MTYPE_I8, result, src, and TRUE.

Referenced by Adjust_Entry().

static void Generate_Entry ( BB bb,
BOOL  gra_run 
) [static]

Definition at line 534 of file calls.cxx.

References ANNOT_ENTRYINFO, ANNOT_entryinfo, ANNOT_Get(), BB_annotations, BB_handler, BB_id, BB_Prepend_Ops(), BB_rid, BOOL, Build_OP(), Build_RCLASS_TN(), Build_TN_Like(), CALLEE_ded_tn, Callee_Saved_Regs_Count, CALLEE_tn, Caller_FP_Preg, Caller_GP_Preg, CG_opt_level, CGEXP_gp_prolog_call_shared, CGSPILL_LCL, CGSPILL_Store_To_Memory(), Constant_GP, CURRENT_SYMTAB, DBar, EETARG_Generate_PIC_Entry_Code(), EETARG_Save_Extra_Callee_Tns(), EETARG_Save_Pfs(), ENTRYINFO_name, ENTRYINFO_sp_adj, ENTRYINFO_srcpos, Ep_TN, Exp_ADD, Exp_COPY(), Exp_OP1, Exp_Spadjust(), Find_Special_Return_Address_Symbol(), FOR_ALL_BB_OPs, For_all_entries(), FOR_ALL_OPS_OPs, FP_TN, fprintf(), Gen_Frame_Pointer, Gen_PIC_Call_Shared, Gen_PIC_Shared, Gen_Register_TN(), Gen_Symbol_TN(), Get_Current_PU, GP_Setup_Code, GP_TN, i, INT, IPFEC_Enable_Edge_Profile, Is_Caller_Save_GP, Is_Formal_Preg, Is_Target_32bit, Is_Target_64bit, MTYPE_byte_size, MTYPE_I4, need_code, NULL, OP_opnd, OP_opnds, OP_srcpos, OPC_I4INTCONST, opnd, OPS_EMPTY, OPS_last, Pointer_Mtype, Pointer_Size, PREG_To_TN_Array, PREG_To_TN_Mtype, Print_OPS(), PU_Has_Calls, PU_has_return_address, PU_prototype(), PUSH_FRAME_POINTER_ON_STACK, RA_TN, REGION_First_BB, REGISTER_CLASS_multiple_save, REGISTER_machine_id, RID_level, RL_CGSCHED, SAVE_tn, Scope_tab, Set_OP_no_move_before_gra, Set_OP_volatile, Set_TN_save_creg, Set_TN_size, Set_TN_spill, SP_TN, Spill_Int_Mtype, Spill_Int_Type, ST_ATTR_Table_Size(), ST_base, ST_is_not_used, ST_name, TFile, TN_class_reg, TN_is_dedicated, TN_is_register, TN_is_save_reg, TN_MAP_Set(), TN_register, TN_register_class, TN_RELOC_GPIDENT, TN_RELOC_GPSUB, TN_To_PREG(), TN_To_PREG_Map, Trace_EE, TRUE, TY_is_varargs, TY_mtype, TY_size, Ty_Table, Use_Scratch_GP, and V_NONE.

Referenced by Generate_Entry_Exit_Code().

void Generate_Entry_Exit_Code ( ST pu,
BOOL  is_region 
)

static void Generate_Exit ( ST st,
BB bb,
BOOL  gra_run,
BOOL  is_region 
) [static]

Definition at line 1580 of file calls.cxx.

References ANNOT_exitinfo, ANNOT_EXITINFO, ANNOT_Get(), BB_annotations, BB_Append_Ops(), BB_call, BB_id, BB_Insert_Ops_Before(), BB_last_op, BB_rid, BB_Transfer_Exitinfo(), BOOL, Build_OP(), Build_TN_Like(), CALLEE_ded_tn, Callee_Saved_Regs_Count, CALLEE_tn, Caller_FP_Preg, Caller_GP_Preg, CG_opt_level, CGSPILL_LCL, CGSPILL_Load_From_Memory(), Current_Rid, DBar, EETARG_Generate_PIC_Exit_Code(), EETARG_Restore_Extra_Callee_Tns(), EETARG_Restore_Pfs(), Exit_BB_Head, EXITINFO_sp_adj, EXITINFO_srcpos, Exp_COPY(), Exp_Return(), Exp_Spadjust(), Find_Special_Return_Address_Symbol(), FOR_ALL_OPS_OPs, FP_TN, fprintf(), Gen_And_Insert_BB_After(), Gen_Frame_Pointer, Gen_PIC_Shared, Gen_Register_TN(), Get_Current_PU, Get_Return_Info(), GP_Setup_Code, GP_TN, i, INT, IPFEC_Enable_Edge_Profile, Is_Target_32bit, Is_True, MEM_pu_pool, MTYPE_byte_size, need_code, No_Simulated, NULL, OP_br, OP_srcpos, OPS_EMPTY, OPS_last, Pointer_Mtype, Pointer_Size, PREG_To_TN_Array, PREG_To_TN_Mtype, Print_OPS(), PU_Has_Calls, PU_has_return_address, Pu_Table, PUSH_FRAME_POINTER_ON_STACK, RA_TN, REGISTER_CLASS_multiple_save, REGISTER_machine_id, RETURN_INFO_return_via_first_arg(), RID_level, RL_CGSCHED, SAVE_tn, Set_OP_no_move_before_gra, Set_OP_volatile, Set_TN_save_creg, Set_TN_spill, SP_TN, Spill_Int_Mtype, Spill_Int_Type, ST_base, ST_name, ST_pu(), ST_pu_type, Target_Simple_Fall_Through_BB(), TFile, TN_class_reg, TN_is_save_reg, TN_MAP_Set(), TN_register, TN_register_class, TN_To_PREG_Map, Trace_EE, TRUE, TY_mtype, TY_ret_type, TY_return_to_param, TY_size, Use_Scratch_GP, and V_NONE.

Referenced by Generate_Entry_Exit_Code().

static void Generate_Unique_Exit ( void   )  [static]

void Init_Callee_Saved_Regs_for_REGION ( ST pu,
BOOL  is_region 
)

void Init_Entry_Exit_Code ( WN pu_wn  ) 

static void Init_Pregs ( void   )  [static]

BOOL Is_Function_Value ( TN tn  )  [inline]

void Optimize_Tail_Calls ( ST pu  ) 

void Set_Frame_Len ( INT64  val  ) 

Definition at line 1847 of file calls.cxx.

References BOOL, Frame_Len, Is_Stack_Used(), and Set_TN_value.

Referenced by CG_Generate_Code().

static void Setup_GP_TN_For_PU ( ST pu  )  [static]

void Split_BB_For_br ( BB bb  ) 

static void Target_Unique_Exit ( BB bb,
BB unique_exit_bb,
TN rtn_tns[ISA_REGISTER_CLASS_MAX+1][REGISTER_MAX+1] 
) [static]


Variable Documentation

Definition at line 127 of file calls.cxx.

Definition at line 119 of file calls.cxx.

Definition at line 128 of file calls.cxx.

Referenced by Generate_Entry(), Generate_Exit(), and Init_Pregs().

TN* Caller_FP_TN [static]

Definition at line 162 of file calls.cxx.

Referenced by Live_Init().

TN* Caller_GP_TN [static]

Definition at line 160 of file calls.cxx.

Referenced by EBO_Remove_Unused_Ops().

TN* Caller_Pfs_TN [static]

Definition at line 163 of file calls.cxx.

Referenced by Live_Init().

TN* Frame_Len_TN [static]

Definition at line 170 of file calls.cxx.

Definition at line 131 of file calls.cxx.

Referenced by Init_Pregs(), and Setup_GP_TN_For_PU().

enum { ... } GP_Setup_Code [static]

TN* Neg_Frame_Len_TN [static]

Definition at line 171 of file calls.cxx.

TN* ra_intsave_tn [static]

Definition at line 164 of file calls.cxx.

Referenced by Live_Init().

Definition at line 137 of file calls.cxx.

Referenced by Compute_Force_TNs(), Localize_Any_Global_TNs(), and Rename_TNs_For_BB().

Definition at line 136 of file calls.cxx.

Definition at line 133 of file calls.cxx.

Referenced by Init_Pregs().

Definition at line 132 of file calls.cxx.

Referenced by Init_Pregs().

Definition at line 130 of file calls.cxx.

Referenced by Init_Callee_Saved_Regs_for_REGION(), and Init_Pregs().

BOOL Trace_EE = FALSE [static]


Generated on Wed Apr 8 14:25:11 2009 for Open64 by  doxygen 1.5.6