This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[hsa] HSA: function comments are added.
- From: mliska <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Dec 2014 15:28:48 +0100
- Subject: [hsa] HSA: function comments are added.
- Authentication-results: sourceware.org; auth=none
- Resent-user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
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