diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-22 21:46:48 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-22 21:46:48 +0000 |
commit | d04f7eb91682e4a29e6a1a24aeecb3799c04fe4e (patch) | |
tree | ff2786de6067078df56240e0b8d6d340cb186aac /gcc/cfgloopmanip.c | |
parent | cd0b0dd13eeb107cabf1cfa2b752f63fd9b9339d (diff) | |
download | gcc-d04f7eb91682e4a29e6a1a24aeecb3799c04fe4e.tar.gz |
* cfgloopmanip.c (scale_bbs_frequencies): Use RDIV macro
* cfgloopanal.c (expected_loop_iterations): Change the return value
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81058 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r-- | gcc/cfgloopmanip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 2dc46432aa9..59ae4a1ed7a 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -50,6 +50,8 @@ static void scale_bbs_frequencies (basic_block *, int, int, int); static basic_block create_preheader (struct loop *, int); static void fix_irreducible_loops (basic_block); +#define RDIV(X,Y) (((X) + (Y) / 2) / (Y)) + /* Splits basic block BB after INSN, returns created edge. Updates loops and dominators. */ edge @@ -458,7 +460,7 @@ scale_bbs_frequencies (basic_block *bbs, int nbbs, int num, int den) for (i = 0; i < nbbs; i++) { bbs[i]->frequency = (bbs[i]->frequency * num) / den; - bbs[i]->count = (bbs[i]->count * num) / den; + bbs[i]->count = RDIV (bbs[i]->count * num, den); for (e = bbs[i]->succ; e; e = e->succ_next) e->count = (e->count * num) /den; } @@ -812,7 +814,6 @@ can_duplicate_loop_p (struct loop *loop) return ret; } -#define RDIV(X,Y) (((X) + (Y) / 2) / (Y)) /* Duplicates body of LOOP to given edge E NDUPL times. Takes care of updating LOOPS structure and dominators. E's destination must be LOOP header for |