allow specification of names for in parameters in spec file
[libfirm] / ir / ana2 / pto_comp.c
index e923966..108394c 100644 (file)
@@ -1,17 +1,31 @@
 /* -*- c -*- */
 
 /*
-   Project:     libFIRM
-   File name:   ir/ana2/pto_comp.c
-   Purpose:     Main Implementation of PTO
-   Author:      Florian
-   Modified by:
-   Created:     Sat Nov 13 19:35:27 CET 2004
-   CVS-ID:      $Id$
-   Copyright:   (c) 1999-2004 Universität Karlsruhe
-   Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
-*/
-
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * @file
+ * @brief   Main Implementation of PTO
+ * @author  Florian
+ * @date    Sat Nov 13 19:35:27 CET 2004
+ * @version $Id$
+ */
 # ifdef HAVE_CONFIG_H
 #  include "config.h"
 # endif
@@ -187,8 +201,7 @@ static int set_graph_result (ir_graph *graph, ir_node *call)
 static pto_t *get_pto_proj (ir_node *proj, pto_env_t *env)
 {
   ir_node *proj_in = get_Proj_pred (proj);
-  const long proj_proj = get_Proj_proj (proj);
-  const opcode in_op = get_irn_opcode (proj_in);
+  const ir_opcode in_op = get_irn_opcode (proj_in);
   pto_t *in_pto = NULL;
   pto_t *proj_pto = NULL; /* get_node_pto (proj); */
 
@@ -200,7 +213,7 @@ static pto_t *get_pto_proj (ir_node *proj, pto_env_t *env)
 
     return (NULL);
   case (iro_Proj): {            /* ProjT (Start), ProjT (Call) */
-    opcode in_in_op;
+    ir_opcode in_in_op;
     long proj_in_proj;
 
     proj_in_in = get_Proj_pred (proj_in);
@@ -234,7 +247,7 @@ static pto_t *get_pto_proj (ir_node *proj, pto_env_t *env)
   }
 
   case (iro_Load):              /* ProjV (Load) */
-    assert (pn_Load_res == proj_proj);
+    assert (pn_Load_res == get_Proj_proj(proj));
     /* FALLTHROUGH */
   case (iro_Call):              /* ProjT (Call) */
     /* FALLTHROUGH */
@@ -321,7 +334,7 @@ static pto_t *get_pto_ret (ir_node *ret, pto_env_t *env)
 /* Dispatch to propagate PTO values */
 static pto_t *get_pto (ir_node *node, pto_env_t *env)
 {
-  const opcode op = get_irn_opcode (node);
+  const ir_opcode op = get_irn_opcode (node);
 
   DBGPRINT (2, (stdout, "%s (%s[%li])\n",
                 __FUNCTION__,
@@ -454,7 +467,7 @@ static void pto_method (ir_node *call, pto_env_t *pto_env)
 /* Perform the appropriate action on the given node */
 static void pto_node_node(ir_node *node, pto_env_t *pto_env)
 {
-  opcode op = get_irn_opcode (node);
+  ir_opcode op = get_irn_opcode (node);
 
   DBGPRINT (1, (stdout, "%s (%s[%li])\n",
                 __FUNCTION__, OPNAME (node), OPNUM (node)));
@@ -756,6 +769,12 @@ pto_t *get_alloc_pto (ir_node *alloc)
 \f
 /*
   $Log$
+  Revision 1.21  2007/03/22 10:39:33  matze
+  a bunch of fixes to make firm work with NDEBUG and without DEBUG_libfirm
+
+  Revision 1.20  2007/01/16 15:45:42  beck
+  renamed type opcode to ir_opcode
+
   Revision 1.19  2006/12/13 19:46:47  beck
   rename type entity into ir_entity