summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beblocksched.c
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-04-27 13:57:31 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2016-05-09 09:41:36 +0200
commit61098d23aa3d8907cbb2d432e3a92af2b39ae707 (patch)
tree1e87b3435cd3adbce7830979562e682b2b0caff7 /ir/be/beblocksched.c
parente860370470b793dcc81822acce2b7b962e02df29 (diff)
Reduce scope of local variable.
Diffstat (limited to 'ir/be/beblocksched.c')
-rw-r--r--ir/be/beblocksched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c
index 76686f7..67ef77e 100644
--- a/ir/be/beblocksched.c
+++ b/ir/be/beblocksched.c
@@ -190,8 +190,7 @@ static void collect_egde_frequency(ir_node *block, void *data)
entry->block = block;
set_irn_link(block, entry);
- ir_loop *loop = get_irn_loop(block);
- int arity = get_Block_n_cfgpreds(block);
+ int arity = get_Block_n_cfgpreds(block);
if (arity == 0) {
/* must be the start block, everything else is dead code and should be
* removed by now */
@@ -199,6 +198,7 @@ static void collect_egde_frequency(ir_node *block, void *data)
/* nothing to do here */
return;
} else if (arity == 1) {
+ ir_loop *loop = get_irn_loop(block);
ir_node *pred_block = get_Block_cfgpred_block(block, 0);
ir_loop *pred_loop = get_irn_loop(pred_block);
float freq = (float)get_block_execfreq(block);