Fixed calculation of register parameters: A register parameter might be NOT the first...
[libfirm] / ir / ana / dfs.c
index 6ef6ba4..7151a56 100644 (file)
  * @file    dfs.c
  * @author  Sebastian Hack
  * @date    20.04.2007
- * @version $Id$
+ * @version $Id$
  * @summary
  *
  * Simple depth first search on CFGs.
- *
- * Copyright (C) 2007 Universitaet Karlsruhe
- * Released under the GPL
  */
 #include <assert.h>
 #include "irtools.h"
@@ -113,10 +110,10 @@ static void classify_edges(dfs_t *dfs)
 
                if (tgt->ancestor == src)
                        edge->kind = DFS_EDGE_ANC;
-               else if (_dfs_int_is_ancestor(src, tgt))
-                       edge->kind = DFS_EDGE_FWD;
                else if (_dfs_int_is_ancestor(tgt, src))
                        edge->kind = DFS_EDGE_BACK;
+               else if (_dfs_int_is_ancestor(src, tgt))
+                       edge->kind = DFS_EDGE_FWD;
                else
                        edge->kind = DFS_EDGE_CROSS;
        }