This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix tree based profiling
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu,stevenb at suse dot de
- Date: Mon, 2 Aug 2004 20:04:36 +0200
- Subject: Fix tree based profiling
Richard,
you apparently broke tree based profiling - the incerments ends up to be
generated all for the first element of the array. The attached patch
fix it, I will commit it if the testing passes (since the code is not
executed, it likely will ;)
Steven, this is probably the failure that broke gcov after the
tree-profiling merge.
Bootstrapping/regtesting i686-pc-gnu-linux on mainline, will commit it
if passes.
Honza
2004-08-02 Jan Hubicka <jh@suse.cz>
* coverage.c (tree_coverage_counter_ref): Fix computation of the new
ARRAY_REF argument.
*** /aux/hubicka/egcs/gcc/gcc/coverage.c Fri Jul 30 16:36:34 2004
--- coverage.c Mon Aug 2 19:59:15 2004
*************** tree_coverage_counter_ref (unsigned coun
*** 437,443 ****
fold_convert (domain_type, build_int_2 (no, 0)),
TYPE_MIN_VALUE (domain_type),
size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (GCOV_TYPE_NODE),
! size_int (TYPE_ALIGN (GCOV_TYPE_NODE))));
}
/* Generate a checksum for a string. CHKSUM is the current
--- 437,443 ----
fold_convert (domain_type, build_int_2 (no, 0)),
TYPE_MIN_VALUE (domain_type),
size_binop (EXACT_DIV_EXPR, TYPE_SIZE_UNIT (GCOV_TYPE_NODE),
! size_int (TYPE_ALIGN_UNIT (GCOV_TYPE_NODE))));
}
/* Generate a checksum for a string. CHKSUM is the current