This fix typos and spacing in comments for several source files. Please commit this patch if OK for trunk. Index: gcc/ira-conflicts.c =================================================================== --- gcc/ira-conflicts.c (revision 215391) +++ gcc/ira-conflicts.c (working copy) @@ -60,7 +60,7 @@ static IRA_INT_TYPE **conflicts; /* Record a conflict between objects OBJ1 and OBJ2. If necessary, canonicalize the conflict by recording it for lower-order subobjects - of the corresponding allocnos. */ + of the corresponding allocnos. */ static void record_object_conflict (ira_object_t obj1, ira_object_t obj2) { Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 215391) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2014-09-19 Felix Yang + + * cfgrtl.c ira.c ira-color.c ira-conflicts ira-lives.c: + Clean up code: update comments and fix spacing to conform to coding style. + 2014-09-19 James Greenhalgh * doc/md.texi (Modifiers): Consistently use "read/write" Index: gcc/ira-color.c =================================================================== --- gcc/ira-color.c (revision 215391) +++ gcc/ira-color.c (working copy) @@ -135,7 +135,7 @@ struct allocno_color_data and all its subnodes in the tree (forest) of allocno hard register nodes (see comments above). */ int hard_regs_subnodes_start; - /* The length of the previous array. */ + /* The length of the previous array. */ int hard_regs_subnodes_num; /* Records about updating allocno hard reg costs from copies. If the allocno did not get expected hard register, these records are @@ -1864,7 +1864,7 @@ assign_hard_reg (ira_allocno_t a, bool retry_p) if (best_hard_regno >= 0) update_costs_from_copies (a, true, ! retry_p); ira_assert (ALLOCNO_CLASS (a) == aclass); - /* We don't need updated costs anymore: */ + /* We don't need updated costs anymore. */ ira_free_allocno_updated_costs (a); return best_hard_regno >= 0; } @@ -3069,7 +3069,7 @@ color_allocnos (void) -/* Output information about the loop given by its LOOP_TREE_NODE. */ +/* Output information about the loop given by its LOOP_TREE_NODE. */ static void print_loop_title (ira_loop_tree_node_t loop_tree_node) { @@ -3205,7 +3205,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node) ALLOCNO_ASSIGNED_P (subloop_allocno) = true; if (hard_regno >= 0) update_costs_from_copies (subloop_allocno, true, true); - /* We don't need updated costs anymore: */ + /* We don't need updated costs anymore. */ ira_free_allocno_updated_costs (subloop_allocno); } } @@ -3249,7 +3249,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node) ALLOCNO_ASSIGNED_P (subloop_allocno) = true; if (hard_regno >= 0) update_costs_from_copies (subloop_allocno, true, true); - /* We don't need updated costs anymore: */ + /* We don't need updated costs anymore. */ ira_free_allocno_updated_costs (subloop_allocno); } continue; @@ -3265,7 +3265,7 @@ color_pass (ira_loop_tree_node_t loop_tree_node) ALLOCNO_ASSIGNED_P (subloop_allocno) = true; if (hard_regno >= 0) update_costs_from_copies (subloop_allocno, true, true); - /* We don't need updated costs anymore: */ + /* We don't need updated costs anymore. */ ira_free_allocno_updated_costs (subloop_allocno); } } Index: gcc/ira-lives.c =================================================================== --- gcc/ira-lives.c (revision 215391) +++ gcc/ira-lives.c (working copy) @@ -1323,7 +1323,7 @@ process_bb_node_lives (ira_loop_tree_node_t loop_t curr_point++; } - /* Propagate register pressure to upper loop tree nodes: */ + /* Propagate register pressure to upper loop tree nodes. */ if (loop_tree_node != ira_loop_tree_root) for (i = 0; i < ira_pressure_classes_num; i++) { Index: gcc/ira.c =================================================================== --- gcc/ira.c (revision 215391) +++ gcc/ira.c (working copy) @@ -1078,7 +1078,7 @@ setup_allocno_and_important_classes (void) containing a given class. If allocatable hard register set of a given class is not a subset of any corresponding set of a class from CLASSES, we use the cheapest (with load/store point of view) - class from CLASSES whose set intersects with given class set */ + class from CLASSES whose set intersects with given class set. */ static void setup_class_translate_array (enum reg_class *class_translate, int classes_num, enum reg_class *classes) @@ -1774,7 +1774,7 @@ void ira_setup_alts (rtx_insn *insn, HARD_REG_SET &alts) { /* MAP nalt * nop -> start of constraints for given operand and - alternative */ + alternative. */ static vec insn_constraints; int nop, nalt; bool curr_swapped; @@ -2728,7 +2728,7 @@ print_redundant_copies (void) FOR_EACH_ALLOCNO (a, ai) { if (ALLOCNO_CAP_MEMBER (a) != NULL) - /* It is a cap. */ + /* It is a cap. */ continue; hard_regno = ALLOCNO_HARD_REGNO (a); if (hard_regno >= 0) @@ -3463,7 +3463,7 @@ update_equiv_regs (void) note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src)); /* Don't bother considering a REG_EQUAL note containing an EXPR_LIST - since it represents a function call */ + since it represents a function call. */ if (note && GET_CODE (XEXP (note, 0)) == EXPR_LIST) note = NULL_RTX; @@ -4137,7 +4137,7 @@ build_insn_chain (void) to a multiword reg. Here, we only model the subreg case that is not wrapped in ZERO_EXTRACT precisely so we do not need to look at the - fabricated use. */ + fabricated use. */ if (DF_REF_FLAGS_IS_SET (use, DF_REF_READ_WRITE) && !DF_REF_FLAGS_IS_SET (use, DF_REF_ZERO_EXTRACT) && DF_REF_FLAGS_IS_SET (use, DF_REF_SUBREG)) Index: gcc/cfgrtl.c =================================================================== --- gcc/cfgrtl.c (revision 215391) +++ gcc/cfgrtl.c (working copy) @@ -696,8 +696,8 @@ first_insn_after_basic_block_note (basic_block blo return NEXT_INSN (insn); } -/* Creates a new basic block just after basic block B by splitting - everything after specified instruction I. */ +/* Creates a new basic block just after basic block BB by splitting + everything after specified instruction INSNP. */ static basic_block rtl_split_block (basic_block bb, void *insnp) @@ -4928,7 +4928,7 @@ rtl_lv_add_condition_to_bb (basic_block first_head seq = get_insns (); end_sequence (); - /* Add the new cond , in the new head. */ + /* Add the new cond, in the new head. */ emit_insn_after (seq, BB_END (cond_bb)); } Cheers, Felix