This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
edge types
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 06 Jul 2002 21:19:12 +0100
- Subject: edge types
- Organization: Codesourcery LLC
Hi,
I've been wandering over the profiling code, trying to understand
the data structures and flags. Unfortunately the structs and bitmasks
are a little uncommented, which is confusing.
basic-block.h defines the following flags, which apply to edges.
I've added the comments - are they on the right track?
#define EDGE_FALLTHRU 1 /* 'Straight line' flow */
#define EDGE_ABNORMAL 2 /* Strange flow, like computed
label, or eh */
#define EDGE_ABNORMAL_CALL 4 /* Call with abnormal exit
like an exception, or sibcall */
#define EDGE_EH 8 /* Exception throw */
#define EDGE_FAKE 16 /* Not a real edge */
#define EDGE_DFS_BACK 32 /* A backwards edge */
#define EDGE_CAN_FALLTHRU 64 /* Candidate for straight line
flow. */
What exactly is a fake edge? gcov appears to take fake edges to
be calls.
how hard/stupid would it be to add an annotation 'unexpected'
edge type (for gcov use)? It seems to me that it would be useful to
keep this separate from the __builtin_expect (var, const) construct.
Though perhaps a __builtin_unexpected (var, const), might fit the
bill. Thoughts?
thanks
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org