Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(653)

Unified Diff: cfgloop.h

Issue 6099055: [PATCH] Take branch misprediction effects into account when RTL loop unrolling Base URL: svn+ssh://gcc.gnu.org/svn/gcc/trunk/gcc/
Patch Set: [PATCH] Take branch misprediction effects into account when RTL loop unrolling Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cfgloop.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cfgloop.h
===================================================================
--- cfgloop.h (revision 187013)
+++ cfgloop.h (working copy)
@@ -249,7 +249,6 @@ extern basic_block *get_loop_body_in_custom_order
extern VEC (edge, heap) *get_loop_exit_edges (const struct loop *);
edge single_exit (const struct loop *);
-extern unsigned num_loop_branches (const struct loop *);
extern edge loop_preheader_edge (const struct loop *);
extern edge loop_latch_edge (const struct loop *);
@@ -359,7 +358,8 @@ struct rtx_iv
};
/* The description of an exit from the loop and of the number of iterations
- till we take the exit. */
+ till we take the exit. Also includes other information used primarily
+ by the loop unroller. */
struct niter_desc
{
@@ -400,6 +400,18 @@ struct niter_desc
/* The number of iterations of the loop. */
rtx niter_expr;
+
+ /* The number of branches in the loop. */
+ unsigned num_branches;
+
+ /* The number of executed branches per iteration. */
+ unsigned av_num_branches;
+
+ /* Whether the loop contains a call instruction. */
+ bool has_call;
+
+ /* Whether the loop contains fp instructions. */
+ bool has_fp;
};
extern void iv_analysis_loop_init (struct loop *);
@@ -413,6 +425,7 @@ extern void iv_analysis_done (void);
extern struct niter_desc *get_simple_loop_desc (struct loop *loop);
extern void free_simple_loop_desc (struct loop *loop);
+void analyze_loop_insns (const struct loop *, struct niter_desc *desc);
static inline struct niter_desc *
simple_loop_desc (struct loop *loop)
« no previous file with comments | « no previous file | cfgloop.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b