pto_debug.c 1.54 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
/* -*- 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 Universitt Karlsruhe
   Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
*/

# ifdef HAVE_CONFIG_H
Michael Beck's avatar
Michael Beck committed
16
#  include "config.h"
Florian Liekweg's avatar
Florian Liekweg committed
17
18
19
20
21
22
23
# endif

/*
 pto_debug: Useful Macros for Debugging
*/

# include "pto_debug.h"
Florian Liekweg's avatar
Florian Liekweg committed
24
25
# include "pto_comp.h"
# include "qset.h"
Florian Liekweg's avatar
Florian Liekweg committed
26

Florian Liekweg's avatar
Florian Liekweg committed
27
/* # include "xmalloc.h" */
Florian Liekweg's avatar
Florian Liekweg committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

/* Local Defines: */

/* Local Data Types: */

/* Local Variables: */
static int dbg_lvl = 0;

/* Local Prototypes: */

/* ===================================================
   Local Implementation:
   =================================================== */


/* ===================================================
   Exported Implementation:
   =================================================== */
int get_dbg_lvl ()
{
  return (dbg_lvl);
}

void set_dbg_lvl (int lvl)
{
  dbg_lvl = lvl;
}

Florian Liekweg's avatar
Florian Liekweg committed
56
57
58
59
60
61
62
63
64
65
66
67
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");
  }
}

Florian Liekweg's avatar
Florian Liekweg committed
68
69
70
71


/*
  $Log$
Florian Liekweg's avatar
Florian Liekweg committed
72
73
74
  Revision 1.4  2004/12/20 17:34:35  liekweg
  fix recursion handling

Michael Beck's avatar
Michael Beck committed
75
76
77
  Revision 1.3  2004/12/02 16:17:51  beck
  fixed config.h include

Florian Liekweg's avatar
Florian Liekweg committed
78
79
80
  Revision 1.2  2004/11/24 14:53:56  liekweg
  Bugfixes

Florian Liekweg's avatar
Florian Liekweg committed
81
82
83
84
85
  Revision 1.1  2004/11/18 16:37:34  liekweg
  rewritten


*/