Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
473b1e05
Commit
473b1e05
authored
Apr 23, 2013
by
Xinliang David Li
Committed by
Xinliang David Li
Apr 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display profile info in graph cfg dump
From-SVN: r198165
parent
b1485a33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
+15
-3
gcc/ChangeLog
+6
-0
gcc/Makefile.in
+1
-1
gcc/cfghooks.c
+5
-0
gcc/graph.c
+3
-2
No files found.
gcc/ChangeLog
View file @
473b1e05
2013-04-22 Xinliang David Li <davidxl@google.com>
* graph.c (draw_cfg_node_succ_edges): Add branch probility as label.
* cfghhooks.c (dump_bb_for_graph): Dump profile count and frquency.
* Makefile.in: New dependency
2013-04-22 Catherine Moore <clm@codesourcery.com>
2013-04-22 Catherine Moore <clm@codesourcery.com>
David Daney <ddaney.cavm@gmail.com>
David Daney <ddaney.cavm@gmail.com>
...
...
gcc/Makefile.in
View file @
473b1e05
...
@@ -3123,7 +3123,7 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
...
@@ -3123,7 +3123,7 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
$(GGC_H) $(OBSTACK_H) alloc-pool.h $(HASH_TABLE_H) $(CFGLOOP_H) $(TREE_H)
\
$(GGC_H) $(OBSTACK_H) alloc-pool.h $(HASH_TABLE_H) $(CFGLOOP_H) $(TREE_H)
\
$(BASIC_BLOCK_H)
$(BASIC_BLOCK_H)
cfghooks.o
:
cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H)
\
cfghooks.o
:
cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H)
\
$(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h $(DIAGNOSTIC_CORE_H) $(CFGLOOP_H)
$(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h $(DIAGNOSTIC_CORE_H) $(CFGLOOP_H)
$(PRETTY_PRINT_H)
cfgexpand.o
:
cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H)
\
cfgexpand.o
:
cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H)
\
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TM_H)
\
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TM_H)
\
coretypes.h $(EXCEPT_H) langhooks.h $(TREE_PASS_H) $(RTL_H)
\
coretypes.h $(EXCEPT_H) langhooks.h $(TREE_PASS_H) $(RTL_H)
\
...
...
gcc/cfghooks.c
View file @
473b1e05
...
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
...
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "timevar.h"
#include "diagnostic-core.h"
#include "diagnostic-core.h"
#include "cfgloop.h"
#include "cfgloop.h"
#include "pretty-print.h"
/* A pointer to one of the hooks containers. */
/* A pointer to one of the hooks containers. */
static
struct
cfg_hooks
*
cfg_hooks
;
static
struct
cfg_hooks
*
cfg_hooks
;
...
@@ -308,6 +309,10 @@ dump_bb_for_graph (pretty_printer *pp, basic_block bb)
...
@@ -308,6 +309,10 @@ dump_bb_for_graph (pretty_printer *pp, basic_block bb)
if
(
!
cfg_hooks
->
dump_bb_for_graph
)
if
(
!
cfg_hooks
->
dump_bb_for_graph
)
internal_error
(
"%s does not support dump_bb_for_graph"
,
internal_error
(
"%s does not support dump_bb_for_graph"
,
cfg_hooks
->
name
);
cfg_hooks
->
name
);
if
(
bb
->
count
)
pp_printf
(
pp
,
"COUNT:"
HOST_WIDEST_INT_PRINT_DEC
,
bb
->
count
);
pp_printf
(
pp
,
" FREQ:%i |"
,
bb
->
frequency
);
pp_write_text_to_stream
(
pp
);
cfg_hooks
->
dump_bb_for_graph
(
pp
,
bb
);
cfg_hooks
->
dump_bb_for_graph
(
pp
,
bb
);
}
}
...
...
gcc/graph.c
View file @
473b1e05
...
@@ -155,11 +155,12 @@ draw_cfg_node_succ_edges (pretty_printer *pp, int funcdef_no, basic_block bb)
...
@@ -155,11 +155,12 @@ draw_cfg_node_succ_edges (pretty_printer *pp, int funcdef_no, basic_block bb)
pp_printf
(
pp
,
pp_printf
(
pp
,
"
\t
fn_%d_basic_block_%d:s -> fn_%d_basic_block_%d:n "
"
\t
fn_%d_basic_block_%d:s -> fn_%d_basic_block_%d:n "
"[style=%s,color=%s,weight=%d,constraint=%s];
\n
"
,
"[style=%s,color=%s,weight=%d,constraint=%s
, label=
\"
[%i%%]
\"
];
\n
"
,
funcdef_no
,
e
->
src
->
index
,
funcdef_no
,
e
->
src
->
index
,
funcdef_no
,
e
->
dest
->
index
,
funcdef_no
,
e
->
dest
->
index
,
style
,
color
,
weight
,
style
,
color
,
weight
,
(
e
->
flags
&
(
EDGE_FAKE
|
EDGE_DFS_BACK
))
?
"false"
:
"true"
);
(
e
->
flags
&
(
EDGE_FAKE
|
EDGE_DFS_BACK
))
?
"false"
:
"true"
,
e
->
probability
*
100
/
REG_BR_PROB_BASE
);
}
}
pp_flush
(
pp
);
pp_flush
(
pp
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment