pto_debug.h 1.77 KB
Newer Older
Florian Liekweg's avatar
Florian Liekweg committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* -*- c -*- */

/*
   Project:     libFIRM
   File name:   ir/ana/pto_debug.h
   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 Universitt Karlsruhe
   Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
*/


# ifndef _PTO_DEBUG_
# define _PTO_DEBUG_

Florian Liekweg's avatar
Florian Liekweg committed
19
20
# include "irnode.h"

Florian Liekweg's avatar
Florian Liekweg committed
21
22
23
24
25
26
27
/* ===================================================
   Global Defines:
   =================================================== */
# define DBGPRINT(lvl, args) if (get_dbg_lvl () > lvl) { fprintf args; }
# define DBGEXE(lvl, cmd) if (get_dbg_lvl () > lvl) {cmd;}
# define OPNAME(node) get_op_name (get_irn_op (node))
# define OPNUM(node) get_irn_node_nr (node)
Florian Liekweg's avatar
Florian Liekweg committed
28
# define HERE(msg)  fprintf (stdout, "%s:%i %s\n", __FUNCTION__, __LINE__, msg)
Florian Liekweg's avatar
Florian Liekweg committed
29
30
31
32
33
34
35
36
# define HERE2(msg1, msg2)  fprintf (stdout, "%s:%i: %s %s\n", __FUNCTION__, __LINE__, msg1, msg2)
# define HERE3(msg1, msg2, msg3)  fprintf (stdout, "%s:%i: %s %s %s\n", __FUNCTION__, __LINE__, msg1, msg2, msg3)

/* ===================================================
 Global Data Types:
 =================================================== */

/* ===================================================
Florian Liekweg's avatar
Florian Liekweg committed
37
 Global Prototypes:
Florian Liekweg's avatar
Florian Liekweg committed
38
39
40
41
 =================================================== */
int get_dbg_lvl (void);
void set_dbg_lvl (int);

Florian Liekweg's avatar
Florian Liekweg committed
42
43
void pto_print_pto (ir_node*);

Florian Liekweg's avatar
Florian Liekweg committed
44
45
46
47
48
49
50
51
52
53
/* ===================================================
   Global Variables:
   =================================================== */

# endif /* not defined _PTO_DEBUG_ */



/*
  $Log$
Florian Liekweg's avatar
Florian Liekweg committed
54
55
56
  Revision 1.3  2004/12/20 17:34:35  liekweg
  fix recursion handling

Florian Liekweg's avatar
Florian Liekweg committed
57
58
59
  Revision 1.2  2004/11/24 14:53:56  liekweg
  Bugfixes

Florian Liekweg's avatar
Florian Liekweg committed
60
61
62
63
64
  Revision 1.1  2004/11/18 16:37:34  liekweg
  rewritten


*/