ir/ir/irop_t.h added
[libfirm] / ir / ana2 / pto_debug.h
1 /* -*- c -*- */
2
3 /*
4    Project:     libFIRM
5    File name:   ir/ana/pto_debug.h
6    Purpose:     Useful Macros for Debugging
7    Author:      Florian
8    Modified by:
9    Created:     Sat Nov 13 19:30:21 CET 2004
10    CVS-ID:      $Id$
11    Copyright:   (c) 1999-2004 Universität Karlsruhe
12    Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
13 */
14
15
16 # ifndef _PTO_DEBUG_
17 # define _PTO_DEBUG_
18
19 # include "irnode.h"
20
21 /* ===================================================
22    Global Defines:
23    =================================================== */
24 # define DBGPRINT(lvl, args) if (get_dbg_lvl () > lvl) { fprintf args; }
25 # define DBGEXE(lvl, cmd) if (get_dbg_lvl () > lvl) {cmd;}
26 # define OPNAME(node) get_irn_opname(node)
27 # define OPNUM(node) get_irn_node_nr(node)
28 # define HERE(msg)  fprintf (stdout, "%s:%i %s\n", __FUNCTION__, __LINE__, msg)
29 # define HERE2(msg1, msg2)  fprintf (stdout, "%s:%i: %s %s\n", __FUNCTION__, __LINE__, msg1, msg2)
30 # define HERE3(msg1, msg2, msg3)  fprintf (stdout, "%s:%i: %s %s %s\n", __FUNCTION__, __LINE__, msg1, msg2, msg3)
31
32 /* ===================================================
33  Global Data Types:
34  =================================================== */
35
36 /* ===================================================
37  Global Prototypes:
38  =================================================== */
39 int get_dbg_lvl (void);
40 void set_dbg_lvl (int);
41
42 void pto_print_pto (ir_node*);
43
44 /* ===================================================
45    Global Variables:
46    =================================================== */
47
48 # endif /* not defined _PTO_DEBUG_ */
49
50
51 \f
52 /*
53   $Log$
54   Revision 1.5  2005/01/14 13:33:10  liekweg
55   Use only public irnode interface
56
57   Revision 1.4  2004/12/21 15:51:07  beck
58   simplifyed
59
60   Revision 1.3  2004/12/20 17:34:35  liekweg
61   fix recursion handling
62
63   Revision 1.2  2004/11/24 14:53:56  liekweg
64   Bugfixes
65
66   Revision 1.1  2004/11/18 16:37:34  liekweg
67   rewritten
68
69
70 */