diff options
Diffstat (limited to 'gcc/ipa-structure-reorg.c')
-rw-r--r-- | gcc/ipa-structure-reorg.c | 242 |
1 files changed, 144 insertions, 98 deletions
diff --git a/gcc/ipa-structure-reorg.c b/gcc/ipa-structure-reorg.c index 639a1e876f3..4d9bf695b59 100644 --- a/gcc/ipa-structure-reorg.c +++ b/gcc/ipa-structure-reorg.c @@ -230,6 +230,7 @@ setup_debug_flags ( Info *info) info->show_all_reorg_cands = true; info->show_all_reorg_cands_in_detail = dump_flags & TDF_DETAILS; info->show_prog_decls = true; + info->show_perf_qualify = true; info->show_delete = dump_flags & TDF_DETAILS; info->show_new_BBs = dump_flags & TDF_DETAILS; info->show_transforms = dump_flags & TDF_DETAILS; @@ -274,7 +275,7 @@ reorg_analysis ( Info *info) // specified since I am not sure what this function should // concretely do. // Eric this is not really helping me... ;-) - DEBUG_L("reorg_analysis: entered\n"); + //DEBUG_L("reorg_analysis: entered\n"); #if INTEGRATION_FUNCTIONAL const bool run_escape_analysis = flag_ipa_dead_field_eliminate && !flag_ipa_instance_interleave && !flag_ipa_field_reorder; if (run_escape_analysis) @@ -321,29 +322,29 @@ reorg_analysis ( Info *info) gsi_next ( &gsi) ) { gimple *stmt = gsi_stmt ( gsi); - DEBUG_L ( ""); - DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); + //DEBUG_L ( ""); + //DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); INDENT(2); if ( is_gimple_call ( stmt) ) { // next line has issues but the mechanism is sound tree t = *gimple_call_lhs_ptr ( stmt); - DEBUG_A( "t %p\n", t); + //DEBUG_A( "t %p\n", t); // Calls to a function returning void are skipped. if ( t != NULL ) { - DEBUG_A( "t: "); - DEBUG_F( flexible_print, stderr, t, 1, (dump_flags_t)0); + //DEBUG_A( "t: "); + //DEBUG_F( flexible_print, stderr, t, 1, (dump_flags_t)0); tree type = TREE_TYPE( t); - DEBUG_A( "type: "); - DEBUG_F( flexible_print, stderr, type, 1, (dump_flags_t)0); + //DEBUG_A( "type: "); + //DEBUG_F( flexible_print, stderr, type, 1, (dump_flags_t)0); //tree bt = base_type_of ( t); tree bt = base_type_of ( type); if ( TREE_CODE( bt) != RECORD_TYPE && TREE_CODE( bt) != VOID_TYPE) { - DEBUG_A( "TREE_CODE( bt) == %s\n", code_str( TREE_CODE ( bt))); - DEBUG_A(""); - DEBUG_F(flexible_print, stderr, bt, 1, (dump_flags_t)0); + //DEBUG_A( "TREE_CODE( bt) == %s\n", code_str( TREE_CODE ( bt))); + //DEBUG_A(""); + //DEBUG_F(flexible_print, stderr, bt, 1, (dump_flags_t)0); INDENT(-2); continue; } @@ -355,9 +356,9 @@ reorg_analysis ( Info *info) gimple *use_stmt; use_operand_p immuse; bool yup_a_use = single_imm_use ( t, &immuse, &use_stmt); - DEBUG_A("VOID case: %sa single imm use, ", yup_a_use ? "" : "not "); - DEBUG("%san assign\n", - yup_a_use && is_gimple_assign ( use_stmt) ? "" : "not "); + //DEBUG_A("VOID case: %sa single imm use, ", yup_a_use ? "" : "not "); + //DEBUG("%san assign\n", + // yup_a_use && is_gimple_assign ( use_stmt) ? "" : "not "); if ( TREE_CODE ( t) == SSA_NAME && yup_a_use && is_gimple_assign ( use_stmt) ) @@ -373,10 +374,10 @@ reorg_analysis ( Info *info) ReorgType_t *ri = get_reorgtype_info ( bt, info); if ( ri != NULL && is_reorg_alloc_trigger ( stmt) ) { - DEBUG_L( "Found allocaion: \n"); - DEBUG_A( " Reorg: "); - DEBUG_F( print_reorg, stderr, 0, ri); - DEBUG("\n"); + //DEBUG_L( "Found allocaion: \n"); + //DEBUG_A( " Reorg: "); + //DEBUG_F( print_reorg, stderr, 0, ri); + //DEBUG("\n"); // TBD this needs to increment with the execution count // instead of one. I hope the build-in block count estimation // will work or a DIY solution might be called for. @@ -389,7 +390,7 @@ reorg_analysis ( Info *info) } } - DEBUG_L( "possible deletes:\n"); +//DEBUG_L( "possible deletes:\n"); INDENT(2); // It's LOT more clear to use an iterator here TBD for ( int i = 0; i < info->reorg_type->size (); i++ ) @@ -403,7 +404,7 @@ reorg_analysis ( Info *info) } // Note when multi-pools are enabled the test should be // "n == 0" but until then... - DEBUG_A("%d pools\n",n) + //DEBUG_A("%d pools\n",n) if ( n != 1 ) { delete_reorgtype ( &(*(info->reorg_type))[i], info); @@ -845,7 +846,7 @@ disq_str_in_str_or_union_helper ( tree type, //tree base = base_type_of ( field_type); if ( TREE_CODE ( field_type) == RECORD_TYPE ) // base to field type { - DEBUG( "RECORD\n"); + //DEBUG( "RECORD\n"); ReorgType_t *rinfo = get_reorgtype_info ( field_type, info); // base to field type if ( rinfo != NULL ) @@ -1098,8 +1099,8 @@ modify_declarations ( Info *info) static void disqualify_all_reorgtypes_of ( gimple *stmt, int num, Info *info) { - DEBUG_L("disqualify %d reorgtypes of: ", num); - DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); + //DEBUG_L("disqualify %d reorgtypes of: ", num); + //DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); int i; for ( i = 0; i < num; i++ ) { @@ -1128,8 +1129,8 @@ static tree modify_func_type ( struct function *func, Info *info ) { tree func_type = TREE_TYPE ( func->decl); - DEBUG_L("old func_type = "); - DEBUG_F( flexible_print, stderr, func_type, 1, (dump_flags_t)0); + //DEBUG_L("old func_type = "); + //DEBUG_F( flexible_print, stderr, func_type, 1, (dump_flags_t)0); INDENT(4); tree new_type; tree func_ret_type = TREE_TYPE ( func_type); @@ -1193,13 +1194,13 @@ modify_func_type ( struct function *func, Info *info ) new_args = nreverse ( new_args); TREE_CHAIN ( last) = void_list_node; - DEBUG_A("new args = "); - DEBUG_F( flexible_print, stderr, new_args, 1, (dump_flags_t)0); + //DEBUG_A("new args = "); + //DEBUG_F( flexible_print, stderr, new_args, 1, (dump_flags_t)0); INDENT(-4); new_type = build_function_type ( func_ret_type, new_args); - DEBUG_L("new_type (func) = "); - DEBUG_F( flexible_print, stderr, new_type, 1, (dump_flags_t)0); + //DEBUG_L("new_type (func) = "); + //DEBUG_F( flexible_print, stderr, new_type, 1, (dump_flags_t)0); TREE_TYPE ( func->decl) = new_type; return new_type; } @@ -1429,14 +1430,14 @@ modify_decl_core ( tree *location, Info *info) void delete_reorgtype ( ReorgType_t *rt, Info *info ) { - DEBUG_L( "delete_reorgtype( %s ):", type_name_to_str( TYPE_NAME( rt->gcc_type))); + //DEBUG_L( "delete_reorgtype( %s ):", type_name_to_str( TYPE_NAME( rt->gcc_type))); if ( !rt->delete_me ) { - DEBUG( "TO DELETE\n"); + //DEBUG( "TO DELETE\n"); info->num_deleted++; rt->delete_me = true; } else { - DEBUG( "SKIP\n"); + //DEBUG( "SKIP\n"); } } @@ -1457,29 +1458,29 @@ undelete_reorgtype ( ReorgType_t *rt, Info *info ) ReorgTransformation reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) { - DEBUG_L ( "ReorgTransformation reorg_recognize for: "); - DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); + //DEBUG_L ( "ReorgTransformation reorg_recognize for: "); + //DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); INDENT(2); switch ( gimple_code( stmt) ) { case GIMPLE_ASSIGN: { - DEBUG_L("GIMPLE_ASSIGN:\n"); + //DEBUG_L("GIMPLE_ASSIGN:\n"); tree lhs = gimple_assign_lhs ( stmt); enum tree_code rhs_code = gimple_assign_rhs_code ( stmt); if ( gimple_assign_single_p ( stmt) ) { - DEBUG_L("gimple_assign_single_p() = true\n"); + //DEBUG_L("gimple_assign_single_p() = true\n"); INDENT(2); tree rhs = gimple_assign_rhs1 ( stmt); - enum ReorgOpTrans lhs_op = recognize_op ( lhs, info); + enum ReorgOpTrans lhs_op = recognize_op ( lhs, true, info); switch ( lhs_op ) { case ReorgOpT_Pointer: // "a" - DEBUG_L("case ReorgOpT_Pointer\n"); + //DEBUG_L("case ReorgOpT_Pointer\n"); INDENT(-4); - switch ( recognize_op ( rhs, info) ) + switch ( recognize_op ( rhs, true, info) ) { case ReorgOpT_Scalar: if ( integer_zerop ( rhs) ) @@ -1497,9 +1498,9 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) return Not_Supported; } case ReorgOpT_Struct: // "s" - DEBUG_L("case ReorgOpT_Struct\n"); + //DEBUG_L("case ReorgOpT_Struct\n"); INDENT(-4); - switch ( recognize_op ( rhs, info) ) + switch ( recognize_op ( rhs, true, info) ) { case ReorgOpT_Deref: // "*a" case ReorgOpT_Array: // "x[i]" @@ -1514,9 +1515,9 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) return Not_Supported; } case ReorgOpT_Deref: // "*a" - DEBUG_L("case ReorgOpT_Deref\n"); + //DEBUG_L("case ReorgOpT_Deref\n"); INDENT(-4); - switch ( recognize_op ( rhs, info) ) + switch ( recognize_op ( rhs, true, info) ) { case ReorgOpT_Deref: // "*a" case ReorgOpT_Struct: // "s" @@ -1526,9 +1527,9 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) return Not_Supported; } case ReorgOpT_Array: // "x[i]" - DEBUG_L("case ReorgOpT_Array\n"); + //DEBUG_L("case ReorgOpT_Array\n"); INDENT(-4); - switch ( recognize_op ( rhs, info) ) + switch ( recognize_op ( rhs, true, info) ) { case ReorgOpT_Struct: // "s" case ReorgOpT_Deref: // "*a" @@ -1539,9 +1540,9 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) } case ReorgOpT_Temp: // t case ReorgOpT_Scalar: // "z" - DEBUG_L("case ReorgOpT_%s\n", lhs_op == ReorgOpT_Temp ? "Temp" : "Scalar"); + //DEBUG_L("case ReorgOpT_%s\n", lhs_op == ReorgOpT_Temp ? "Temp" : "Scalar"); INDENT(-4); - switch ( recognize_op( rhs, info) ) + switch ( recognize_op( rhs, true, info) ) { case ReorgOpT_Scalar: // "z" case ReorgOpT_Temp: // "t" @@ -1553,9 +1554,9 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) } case ReorgOpT_Indirect: // "a->f" case ReorgOpT_AryDir: // "x[i].f" - DEBUG_L("case ReorgOpT_%s\n", lhs_op == ReorgOpT_Indirect ? "Indirect" : "AryDir"); + //DEBUG_L("case ReorgOpT_%s\n", lhs_op == ReorgOpT_Indirect ? "Indirect" : "AryDir"); INDENT(-4); - switch ( recognize_op ( rhs, info) ) + switch ( recognize_op ( rhs, true, info) ) { case ReorgOpT_Temp: // t case ReorgOpT_Scalar: // "z" @@ -1568,27 +1569,27 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) default: INDENT(-4); return Not_Supported; - } // switch ( recognize_op ( lhs, info) ) + } // switch ( recognize_op ( lhs, true, info) ) } else { - DEBUG_L("gimple_assign_single_p() = false\n"); + //DEBUG_L("gimple_assign_single_p() = false\n"); INDENT(2); tree op1 = gimple_assign_rhs1 ( stmt); tree op2 = gimple_assign_rhs2 ( stmt); - DEBUG_L("op1 = %p, op2 = %p\n", op1, op2); - DEBUG_A(""); - DEBUG_F( print_generic_expr, stderr, op1, (dump_flags_t)-1); - DEBUG("\n"); + //DEBUG_L("op1 = %p, op2 = %p\n", op1, op2); + //DEBUG_A(""); + //DEBUG_F( print_generic_expr, stderr, op1, (dump_flags_t)-1); + //DEBUG("\n"); if ( CONVERT_EXPR_CODE_P ( gimple_assign_rhs_code ( stmt))) { - DEBUG_L("CONVERT_EXPR_CODE_P (...)\n"); + //DEBUG_L("CONVERT_EXPR_CODE_P (...)\n"); INDENT(-4); return ReorgT_Convert; } if ( gimple_assign_rhs3 ( stmt) != NULL ) { - DEBUG_L("gimple_assign_rhs3 ( stmt) != NULL\n"); + //DEBUG_L("gimple_assign_rhs3 ( stmt) != NULL\n"); INDENT(-4); return Not_Supported; } @@ -1599,7 +1600,7 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) ( (POINTER_TYPE_P ( TREE_TYPE( op1)) && integer_zerop ( op2)) || (POINTER_TYPE_P ( TREE_TYPE( op2)) && integer_zerop ( op1))) && ( integer_zerop ( op1) || integer_zerop ( op2) ); - DEBUG_L("zero_case = %s\n", zero_case ? "true" : "false" ); + //DEBUG_L("zero_case = %s\n", zero_case ? "true" : "false" ); INDENT(-4); switch ( rhs_code ) { @@ -1658,11 +1659,11 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) } case GIMPLE_CALL: { - DEBUG_L("GIMPLE_CALL:\n"); + //DEBUG_L("GIMPLE_CALL:\n"); struct cgraph_edge *edge = node->get_edge ( stmt); gcc_assert( edge); - DEBUG_L("called function %s gimple_body\n", - edge->callee->has_gimple_body_p() ? "has a" : "has no"); + //DEBUG_L("called function %s gimple_body\n", + // edge->callee->has_gimple_body_p() ? "has a" : "has no"); INDENT(-2); if ( gimple_call_builtin_p( stmt, BUILT_IN_CALLOC ) ) return ReorgT_Calloc; if ( gimple_call_builtin_p( stmt, BUILT_IN_MALLOC ) ) return ReorgT_Malloc; @@ -1683,14 +1684,14 @@ reorg_recognize ( gimple *stmt, cgraph_node* node, Info_t *info ) } break; case GIMPLE_RETURN: - DEBUG_L("GIMPLE_RETURN:\n"); + //DEBUG_L("GIMPLE_RETURN:\n"); INDENT(-2); return ReorgT_Return; break; default: - DEBUG_L ( "didn't support: "); - DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); - DEBUG( "\n"); + //DEBUG_L ( "didn't support: "); + //DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); + //DEBUG( "\n"); INDENT(-2); return Not_Supported; } @@ -1796,35 +1797,46 @@ remove_deleted_types ( Info *info, ReorgFn reorg_fn) } enum ReorgOpTrans -recognize_op ( tree op, Info *info) +recognize_op ( tree op, bool lie, Info *info) { - DEBUG_L("recognize_op: "); - DEBUG_F( flexible_print, stderr, op, 1, TDF_DETAILS); + //DEBUG_L("recognize_op: "); + //DEBUG_F( flexible_print, stderr, op, 1, TDF_DETAILS); enum tree_code op_code = TREE_CODE ( op); - DEBUG_A("opcode = %s\n", code_str( op_code)); - if ( op_code == SSA_NAME ) + //DEBUG_A("opcode = %s\n", code_str( op_code)); + switch ( op_code ) { + case SSA_NAME: // We tried returning ReorgOpT_Scalar. // It caused an assertion failue because // it was incorrectly triggering the ReorgT_Ptr2Zero // case with a bogus RHS. - DEBUG_L(" returns: ReorgOpT_Temp\n"); + //DEBUG_L(" returns: ReorgOpT_Temp\n"); return ReorgOpT_Temp; + case REAL_CST: + case FIXED_CST: + case STRING_CST: + case COMPLEX_CST: + case CONSTRUCTOR: + case INTEGER_CST: + case VECTOR_CST: + return ReorgOpT_Cst; } + tree type = TREE_TYPE ( op); if ( type != NULL && POINTER_TYPE_P (type) ) { - DEBUG_L("POINTER_TYPE_P (type) = true\n"); - if ( is_reorg_type ( type, info) ) + //DEBUG_L("POINTER_TYPE_P (type) = true\n"); + bool a_reorg = is_reorg_type ( type, info); + if ( a_reorg || !lie ) { - DEBUG_L(" returns: ReorgOpT_Pointer\n"); + //DEBUG_L(" returns: ReorgOpT_Pointer\n"); return ReorgOpT_Pointer; } else { // This would be for when // the field of a struct element // is a pointer that's not a reorg // point. I.e. ReorgT_ElemAssign. - DEBUG_L(" returns: ReorgOpT_Scalar\n"); + //DEBUG_L(" returns: ReorgOpT_Scalar\n"); return ReorgOpT_Scalar; } } @@ -1833,15 +1845,15 @@ recognize_op ( tree op, Info *info) { // The assumption here is that this // is a reorg type. - DEBUG_L(" returns: ReorgOpT_Struct\n"); + //DEBUG_L(" returns: ReorgOpT_Struct\n"); return ReorgOpT_Struct; } if ( op_code == VAR_DECL ) { tree type = TREE_TYPE ( op); - DEBUG_L(" recursing on type :"); - DEBUG_F( flexible_print, stderr, type, 1, TDF_DETAILS); - return recognize_op ( type, info); + //DEBUG_L(" recursing on type :"); + //DEBUG_F( flexible_print, stderr, type, 1, TDF_DETAILS); + return recognize_op ( type, true, info); } tree inner_op = TREE_OPERAND( op, 0); tree inner_type = TREE_TYPE ( inner_op); @@ -1852,8 +1864,9 @@ recognize_op ( tree op, Info *info) if ( op_code == ADDR_EXPR ) { //DEBUG_L("op_code == ADDR_EXPR\n"); + bool a_reorg = is_reorg_type ( inner_op, info); if ( inner_op_code == ARRAY_REF - && is_reorg_type ( inner_op, info) ) + && (a_reorg || !lie) ) { //DEBUG_L(" returns: ReorgOpT_Address\n"); return ReorgOpT_Address; @@ -1865,7 +1878,8 @@ recognize_op ( tree op, Info *info) if ( inner_op_code == INDIRECT_REF ) { //DEBUG_L("TREE_CODE( inner_op) == INDIRECT_REF\n"); - if ( is_reorg_type ( base_type_of ( type), info) ) // inner_type??? + bool a_reorg = is_reorg_type ( base_type_of ( type), info); + if ( a_reorg || !lie ) { //DEBUG_L(" returns: ReorgOpT_Indirect\n"); return ReorgOpT_Indirect; @@ -1876,7 +1890,8 @@ recognize_op ( tree op, Info *info) } if ( inner_op_code == MEM_REF ) { //DEBUG_L("TREE_CODE( inner_op) == MEM_REF\n"); - if ( is_reorg_type ( base_type_of ( inner_type), info) ) + bool a_reorg = is_reorg_type ( base_type_of ( inner_type), info); + if ( a_reorg || !lie ) { //DEBUG_L(" returns: ReorgOpT_Indirect\n"); return ReorgOpT_Indirect; @@ -1885,11 +1900,12 @@ recognize_op ( tree op, Info *info) //DEBUG_L(" returns: ReorgOpT_Scalar\n"); return ReorgOpT_Scalar; } - DEBUG_L("TREE_CODE( inner_op) not INDIRECT_REF or MEM_REF\n"); + //DEBUG_L("TREE_CODE( inner_op) not INDIRECT_REF or MEM_REF\n"); // Note, doesn't this ignore ARRAY_REF of this? // I think it's OK at least until we start supporting // multi-pools. - if ( is_reorg_type ( base_type_of ( inner_type), info) ) + bool a_reorg = is_reorg_type ( base_type_of ( inner_type), info); + if ( a_reorg || !lie ) { //DEBUG_L(" returns: ReorgOpT_AryDir\n"); return ReorgOpT_AryDir; @@ -1901,7 +1917,8 @@ recognize_op ( tree op, Info *info) if ( op_code == ARRAY_REF ) { //DEBUG_L("op_code == ARRAY_REF\n"); - if ( is_reorg_type( base_type_of ( type), info) ) + bool a_reorg = is_reorg_type( base_type_of ( type), info); + if ( a_reorg || !lie ) { //DEBUG_L(" returns: ReorgOpT_Array\n"); return ReorgOpT_Array; @@ -1915,7 +1932,8 @@ recognize_op ( tree op, Info *info) // Do we want to chase the base type? // No, we care about (and transform) just // *r and not **...r (where r is a ReorgType.) - if( is_reorg_type ( type, info) ) + bool a_reorg = is_reorg_type ( type, info); + if( a_reorg || !lie ) { //DEBUG_L(" returns: ReorgOpT_Deref\n"); return ReorgOpT_Deref; @@ -2082,7 +2100,7 @@ bool same_type_p( tree a, tree b ) ReorgType_t * get_reorgtype_info ( tree type, Info* info) { - DEBUG_L( "get_reorgtype_info\n"); + //DEBUG_L( "get_reorgtype_info\n"); // Note, I'm going to use the most stupid and slowest possible way // to do this. The advanage is it will be super easy and almost @@ -2097,17 +2115,17 @@ get_reorgtype_info ( tree type, Info* info) // so this is just a place holder until I can get an answer // from the gcc community. Note, this is a big issue. // Remember, the same_type_p here is my own temporary hack. - DEBUG_L(""); - DEBUG_F( print_generic_expr, stderr, type, TDF_DETAILS); - DEBUG("\n"); + //DEBUG_L(""); + //DEBUG_F( print_generic_expr, stderr, type, TDF_DETAILS); + //DEBUG("\n"); if ( same_type_p ( ri->gcc_type, type) ) { - DEBUG_A( " returns %p\n", &(*ri)); + //DEBUG_A( " returns %p\n", &(*ri)); return &(*ri); } } - DEBUG_A( " returns NULL\n"); + //DEBUG_A( " returns NULL\n"); return NULL; } @@ -2124,9 +2142,9 @@ detect_reorg ( tree *tp, int *dummy, void *data) { struct walk_stmt_info *walk_data = ( struct walk_stmt_info *)data; hidden_info_t *hi = ( hidden_info_t *)walk_data->info; - DEBUG_L( "*tp = "); - DEBUG_F( print_generic_expr, stderr, *tp, (dump_flags_t)-1); - DEBUG("\n"); + //DEBUG_L( "*tp = "); + //DEBUG_F( print_generic_expr, stderr, *tp, (dump_flags_t)-1); + //DEBUG("\n"); tree operand = base_type_of ( TREE_TYPE ( *tp)); ReorgType_t *ri = get_reorgtype_info ( operand, hi->info); if ( ri != NULL ) @@ -2140,8 +2158,8 @@ detect_reorg ( tree *tp, int *dummy, void *data) ReorgType_t * contains_a_reorgtype ( gimple *stmt, Info *info) { - DEBUG_L ( "contains_a_reorgtype: "); - DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); + //DEBUG_L ( "contains_a_reorgtype: "); + //DEBUG_F ( print_gimple_stmt, stderr, stmt, 0); INDENT(2); if ( gimple_code ( stmt) == GIMPLE_PHI ) @@ -2176,7 +2194,8 @@ detect_reorg_in_expr ( tree *tp, int *w_s, void *data) //DEBUG_F( flexible_print, stderr, TREE_TYPE ( *tp), 1, (dump_flags_t)0); tree operand = base_type_of ( TREE_TYPE ( *tp)); //DEBUG_L("operand = %p, ", operand); - DEBUG_F( flexible_print, stderr, operand, 1, (dump_flags_t)0); + + //DEBUG_F( flexible_print, stderr, operand, 1, (dump_flags_t)0); ReorgType_t *ri = get_reorgtype_info ( operand, tre_hi->info); if ( ri != NULL ) { @@ -2640,6 +2659,33 @@ type_name_to_str ( tree tn) return identifier_to_locale ( IDENTIFIER_POINTER ( tn)); } +const char * +optrans_to_str ( enum ReorgOpTrans e ) +{ + switch ( e ) + { + case ReorgOpT_Temp: + return "Temp"; + case ReorgOpT_Address: + return "Address"; + case ReorgOpT_Pointer: + return "Pointer"; + case ReorgOpT_Struct: + return "Struct"; + case ReorgOpT_Deref: + return "Deref"; + case ReorgOpT_Array: + return "Array"; + case ReorgOpT_Scalar: + return "Scalar"; + case ReorgOpT_Indirect: + return "Indirect"; + case ReorgOpT_AryDir: + return "AryDir"; + } + return NULL; +} + #if DEBUGGING void handle_debug_indenting ( int amount ) |