some clean up
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 8 Nov 2005 14:25:33 +0000 (14:25 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 8 Nov 2005 14:25:33 +0000 (14:25 +0000)
[r6885]

ir/opt/scalar_replace.c

index 6f32283..7f6ed79 100644 (file)
@@ -132,13 +132,12 @@ static int is_const_sel(ir_node *sel) {
  */
 int is_address_taken(ir_node *sel)
 {
-  int i, n;
+  int i;
 
   if (! is_const_sel(sel))
     return 1;
 
-  n = get_irn_n_outs(sel);
-  for (i = 0; i < n; ++i) {
+  for (i = get_irn_n_outs(sel) - 1; i >= 0; --i) {
     ir_node *succ = get_irn_out(sel, i);
 
     switch (get_irn_opcode(succ)) {