Hi, this is a very simple cleanup, renaming two fields of different classes called offset to a more descriptive name and removal of one which is no longer used.
Committed to the branch. Thanks, Martin 2014-10-24 Martin Jambor <mjam...@suse.cz> * hsa.h (hsa_symbol): Renamed offset to directive_offset. Updated all users. (hsa_op_base): Renamed offset to brig_op_offset. Updated all users. (hsa_op_immed): Removed unused field offset. diff --git a/gcc/ChangeLog.hsa b/gcc/ChangeLog.hsa index d9695fd..04ecd06 100644 --- a/gcc/ChangeLog.hsa +++ b/gcc/ChangeLog.hsa @@ -1,3 +1,11 @@ +2014-10-24 Martin Jambor <mjam...@suse.cz> + + * hsa.h (hsa_symbol): Renamed offset to directive_offset. Updated all + users. + (hsa_op_base): Renamed offset to brig_op_offset. Updated all + users. + (hsa_op_immed): Removed unused field offset. + 2014-10-07 Martin Jambor <mjam...@suse.cz> * README.hsa: Added known tested revisions of required git diff --git a/gcc/hsa-brig.c b/gcc/hsa-brig.c index 1598adb..b74f557 100644 --- a/gcc/hsa-brig.c +++ b/gcc/hsa-brig.c @@ -387,8 +387,8 @@ emit_directive_variable (struct hsa_symbol *symbol) static unsigned res_name_offset; char prefix; - if (symbol->offset) - return symbol->offset; + if (symbol->directive_offset) + return symbol->directive_offset; dirvar.base.byteCount = htole16 (sizeof (dirvar)); dirvar.base.kind = htole16 (BRIG_KIND_DIRECTIVE_VARIABLE); @@ -432,8 +432,8 @@ emit_directive_variable (struct hsa_symbol *symbol) dirvar.modifier = BRIG_SYMBOL_DEFINITION; dirvar.reserved = 0; - symbol->offset = brig_code.add (&dirvar, sizeof (dirvar)); - return symbol->offset; + symbol->directive_offset = brig_code.add (&dirvar, sizeof (dirvar)); + return symbol->directive_offset; } /* Emit directives describing the function, for example its input and output @@ -658,11 +658,11 @@ enqueue_op (hsa_op_base *op) { unsigned ret; - if (op->offset) - return op->offset; + if (op->brig_op_offset) + return op->brig_op_offset; ret = op_queue.projected_size; - op->offset = op_queue.projected_size; + op->brig_op_offset = op_queue.projected_size; if (!op_queue.first_op) op_queue.first_op = op; @@ -873,7 +873,7 @@ emit_queued_operands (void) { for (hsa_op_base *op = op_queue.first_op; op; op = op->next) { - gcc_assert (op->offset == brig_operand.total_size); + gcc_assert (op->brig_op_offset == brig_operand.total_size); if (hsa_op_immed *imm = dyn_cast <hsa_op_immed *> (op)) emit_immediate_operand (imm); else if (hsa_op_reg *reg = dyn_cast <hsa_op_reg *> (op)) diff --git a/gcc/hsa.h b/gcc/hsa.h index fb66fc4..eeb8386 100644 --- a/gcc/hsa.h +++ b/gcc/hsa.h @@ -48,7 +48,7 @@ struct hsa_symbol /* Once written, this is the offset of the associated symbol directive. Zero means the symbol has not been written yet. */ - unsigned offset; + unsigned directive_offset; /* HSA type of the parameter. */ BrigType16_t type; @@ -70,7 +70,7 @@ struct hsa_op_base /* Offset to which the associated operand structure will be written. Zero if yet not scheduled for writing. */ - unsigned offset; + unsigned brig_op_offset; /* The type of a particular operand. */ BrigKinds16_t kind; @@ -83,10 +83,6 @@ struct hsa_op_immed : public hsa_op_base /* Type of the. */ BrigType16_t type; - /* Offset to which the associated immediate operand structure will be written. - Zero if not yet scheduled for writing */ - unsigned offset; - /* Value as represented by middle end. */ tree value; };