This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[hsa] HSA: function comments are added.


Hello.

In this small patch I add missing comments.

Thanks,
Martin

    gcc/ChangeLog:

    2014-12-12  Martin Liska  <mliska@suse.cz>

        * hsa-brig.c: Function comments are added.
        * hsa-gen.c: Likewise.
---
 gcc/hsa-brig.c |  5 +++++
 gcc/hsa-gen.c  | 19 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/gcc/hsa-brig.c b/gcc/hsa-brig.c
index 3e6ed68..45972b6 100644
--- a/gcc/hsa-brig.c
+++ b/gcc/hsa-brig.c
@@ -917,6 +917,8 @@ emit_code_ref_operand (hsa_op_code_ref *ref)
   brig_operand.add (&out, sizeof (out));
 }
 
+/* Emit a code list operand CODE_LIST.  */
+
 static void
 emit_code_list_operand (hsa_op_code_list *code_list)
 {
@@ -1288,6 +1290,9 @@ emit_arg_block (bool is_start)
   brig_insn_count++;
 }
 
+/* Emit call instruction INSN, where this instruction must be closed
+   within a call block instruction.  */
+
 static void
 emit_call_insn (hsa_insn_basic *insn)
 {
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index ac51eb0..b59a0b5 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -623,6 +623,9 @@ hsa_alloc_addr_op (hsa_symbol *sym, hsa_op_reg *reg, HOST_WIDE_INT offset)
   return addr;
 }
 
+/* Allocate and set up a new code list operands with given number
+   of ELEMENTS.  */
+
 static hsa_op_code_list *
 hsa_alloc_code_list_op (unsigned elements)
 {
@@ -1092,6 +1095,10 @@ gen_hsa_addr (tree ref, hsa_bb *hbb, vec <hsa_op_reg_p> ssa_map)
   return hsa_alloc_addr_op (symbol, reg, offset);
 }
 
+/* Generate HSA address for a function call argument of given TYPE.
+   INDEX is used to generate corresponding name of the arguments.
+   Special value -1 represents fact that result value is created.  */
+
 static hsa_op_address *
 gen_hsa_addr_for_arg (tree tree_type, int index)
 {
@@ -1663,7 +1670,7 @@ gen_hsa_insns_for_operation_assignment (gimple assign, hsa_bb *hbb,
   hsa_append_insn (hbb, insn);
 }
 
-/* Generate HSA instructions for a given gimple condition statemet COND.
+/* Generate HSA instructions for a given gimple condition statement COND.
    Instructions will be apended to HBB, which also needs to be the
    corresponding structure to the basic_block of COND.  SSA_MAP maps gimple SSA
    names to HSA pseudo registers.  */
@@ -1685,6 +1692,11 @@ gen_hsa_insns_for_cond_stmt (gimple cond, hsa_bb *hbb,
   hsa_append_insn (hbb, cbr);
 }
 
+/* Generate HSA instructions for a direct call isntruction.
+   Instructions will be apended to HBB, which also needs to be the
+   corresponding structure to the basic_block of STMT. SSA_MAP maps gimple SSA
+   names to HSA pseudo registers.  */
+
 static void
 gen_hsa_insns_for_direct_call (gimple stmt, hsa_bb *hbb,
 			       vec <hsa_op_reg_p> ssa_map)
@@ -1759,6 +1771,11 @@ gen_hsa_insns_for_direct_call (gimple stmt, hsa_bb *hbb,
   hsa_append_insn (hbb, call_block_insn);
 }
 
+/* Generate HSA instructions for a return value isntruction.
+   Instructions will be apended to HBB, which also needs to be the
+   corresponding structure to the basic_block of STMT. SSA_MAP maps gimple SSA
+   names to HSA pseudo registers.  */
+
 static void
 gen_hsa_insns_for_return (gimple stmt, hsa_bb *hbb,
 			vec <hsa_op_reg_p> ssa_map)
-- 
2.1.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]