Fixed calculation of register parameters: A register parameter might be NOT the first...
[libfirm] / ir / ana / dfs.c
index 3c66fc9..7151a56 100644 (file)
@@ -1,15 +1,32 @@
-/**
- * @file   dfs.c
- * @date   20.04.2007
- * @author Sebastian Hack
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
  *
- * Simple depth first search on CFGs.
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
  *
- * Copyright (C) 2007 Universitaet Karlsruhe
- * Released under the GPL
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
  */
 
-#include "assert.h"
+/**
+ * @file    dfs.c
+ * @author  Sebastian Hack
+ * @date    20.04.2007
+ * @version $Id$
+ * @summary
+ *
+ * Simple depth first search on CFGs.
+ */
+#include <assert.h>
 #include "irtools.h"
 #include "irprintf.h"
 #include "set.h"
@@ -93,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;
        }