fix
[libfirm] / ir / ana2 / pto_debug.c
index d68f575..c746bc2 100644 (file)
@@ -1,19 +1,33 @@
 /* -*- c -*- */
 
 /*
-   Project:     libFIRM
-   File name:   ir/ana/pto_debug.c
-   Purpose:     Useful Macros for Debugging
-   Author:      Florian
-   Modified by:
-   Created:     Sat Nov 13 19:30:21 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     Useful Macros for Debugging
+ * @author    Florian
+ * @date      Sat Nov 13 19:30:21 CET 2004
+ * @version   $Id$
+ */
 # ifdef HAVE_CONFIG_H
-#  include <config.h>
+#  include "config.h"
 # endif
 
 /*
 */
 
 # include "pto_debug.h"
+# include "pto_comp.h"
+# include "gnu_ext.h"
+# include "qset.h"
 
-# include "irnode.h"
-# include "xmalloc.h"
+/* # include "xmalloc.h" */
 
 /* Local Defines: */
 
@@ -49,13 +65,39 @@ int get_dbg_lvl ()
 
 void set_dbg_lvl (int lvl)
 {
+  /* fprintf (stdout, "%s:%s (): dbg_lvl: %i -> %i\n", */
+/*            __FILE__, __FUNCTION__, dbg_lvl, lvl); */
   dbg_lvl = lvl;
 }
 
+void pto_print_pto (ir_node *node)
+{
+  pto_t *pto = get_node_pto (node);
+
+  fprintf (stdout, "pto (%s[%li]) = ", OPNAME (node), OPNUM (node));
+  if (NULL != pto) {
+    qset_print (pto->values, stdout);
+  } else {
+    fprintf (stdout, "NULL");
+  }
+}
+
 
 \f
 /*
   $Log$
+  Revision 1.5  2005/02/25 16:47:51  liekweg
+  fix GNU stuff
+
+  Revision 1.4  2004/12/20 17:34:35  liekweg
+  fix recursion handling
+
+  Revision 1.3  2004/12/02 16:17:51  beck
+  fixed config.h include
+
+  Revision 1.2  2004/11/24 14:53:56  liekweg
+  Bugfixes
+
   Revision 1.1  2004/11/18 16:37:34  liekweg
   rewritten