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]

Re: Mainline merge part 14 - profiler improvements


On Mon, May 06, 2002 at 03:58:51PM +0200, Jan Hubicka wrote:
>   function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
>      function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \
>      insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) \
> -    $(TM_P_H) langhooks.h
> +    $(TM_P_H) langhooks.h gthr.h

gthr.h is a target header.  You cannot include it in a host object file
at all.  This seems a fairly fundamental problem with the threading code.
Therefore I'm not going to review any of it.

Also, does it not make more sense to generate atomic add instructions
instead of expanding the amount of memory used possibly 1000 fold?

> !       char_array_type = build_array_type (char_type_node, integer_type_node);
> !       string_type = build_pointer_type (char_array_type);

integer_type_node is incorrect here.  You should use build_index_type 
to create the exact bounds of the array.  It is therefore senseless
to create a common type for this unless there are lots of arrays with
the same length.

See fix_string_type for how this should be handled.

> !       value_chain = make_node (TREE_LIST);
> !       TREE_TYPE (value_chain) = long_integer_type_node;

TREE_LIST doesn't have a type.  Use tree_cons or build_tree_list
for TREE_LIST construction.

Also, do not prefer chainon.  Either build the list from last to
first, or chain the list backward and use nreverse at the end.

> ! 	  TYPE_MIN_VALUE (domain_tree) = integer_zero_node;
> ! 	  TYPE_MAX_VALUE (domain_tree) = build_int_2 (profile_info.count_instrumented_edges - 1, 0);

build_index_type.

> !       TREE_TYPE (field_value) = structure_pointer_type;
> !       TREE_PURPOSE (field_value) = field_decl;
> !       TREE_VALUE (field_value) = integer_zero_node;

null_pointer_node.

> ! 	for ((item = functions_head); item != 0; (item = item->next))

Pointless parens.

Other notes:

  * Lots of lines exceed 80 columns.
  * If you're changing the file format, you need to document it.
    Yes, I know the previous format was undocumented, but that's
    a mistake we shouldn't repeat.


r~


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