builtins.c (expand_builtin_atomic_compare_exchange): Pass old value operand as MEM...
[platform/upstream/gcc.git] / gcc / dumpfile.h
1 /* Definitions for the shared dumpfile.
2    Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3    Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20
21
22 #ifndef GCC_DUMPFILE_H
23 #define GCC_DUMPFILE_H 1
24
25 /* Different tree dump places.  When you add new tree dump places,
26    extend the DUMP_FILES array in tree-dump.c.  */
27 enum tree_dump_index
28 {
29   TDI_none,                     /* No dump */
30   TDI_cgraph,                   /* dump function call graph.  */
31   TDI_tu,                       /* dump the whole translation unit.  */
32   TDI_class,                    /* dump class hierarchy.  */
33   TDI_original,                 /* dump each function before optimizing it */
34   TDI_generic,                  /* dump each function after genericizing it */
35   TDI_nested,                   /* dump each function after unnesting it */
36   TDI_vcg,                      /* create a VCG graph file for each
37                                    function's flowgraph.  */
38   TDI_ada,                      /* dump declarations in Ada syntax.  */
39   TDI_tree_all,                 /* enable all the GENERIC/GIMPLE dumps.  */
40   TDI_rtl_all,                  /* enable all the RTL dumps.  */
41   TDI_ipa_all,                  /* enable all the IPA dumps.  */
42
43   TDI_end
44 };
45
46 /* Bit masks to control dumping. Not all values are applicable to
47    all dumps. Add new ones at the end. When you define new
48    values, extend the DUMP_OPTIONS array in tree-dump.c */
49 #define TDF_ADDRESS     (1 << 0)        /* dump node addresses */
50 #define TDF_SLIM        (1 << 1)        /* don't go wild following links */
51 #define TDF_RAW         (1 << 2)        /* don't unparse the function */
52 #define TDF_DETAILS     (1 << 3)        /* show more detailed info about
53                                            each pass */
54 #define TDF_STATS       (1 << 4)        /* dump various statistics about
55                                            each pass */
56 #define TDF_BLOCKS      (1 << 5)        /* display basic block boundaries */
57 #define TDF_VOPS        (1 << 6)        /* display virtual operands */
58 #define TDF_LINENO      (1 << 7)        /* display statement line numbers */
59 #define TDF_UID         (1 << 8)        /* display decl UIDs */
60
61 #define TDF_TREE        (1 << 9)        /* is a tree dump */
62 #define TDF_RTL         (1 << 10)       /* is a RTL dump */
63 #define TDF_IPA         (1 << 11)       /* is an IPA dump */
64 #define TDF_STMTADDR    (1 << 12)       /* Address of stmt.  */
65
66 #define TDF_GRAPH       (1 << 13)       /* a graph dump is being emitted */
67 #define TDF_MEMSYMS     (1 << 14)       /* display memory symbols in expr.
68                                            Implies TDF_VOPS.  */
69
70 #define TDF_DIAGNOSTIC  (1 << 15)       /* A dump to be put in a diagnostic
71                                            message.  */
72 #define TDF_VERBOSE     (1 << 16)       /* A dump that uses the full tree
73                                            dumper to print stmts.  */
74 #define TDF_RHS_ONLY    (1 << 17)       /* a flag to only print the RHS of
75                                            a gimple stmt.  */
76 #define TDF_ASMNAME     (1 << 18)       /* display asm names of decls  */
77 #define TDF_EH          (1 << 19)       /* display EH region number
78                                            holding this gimple statement.  */
79 #define TDF_NOUID       (1 << 20)       /* omit UIDs from dumps.  */
80 #define TDF_ALIAS       (1 << 21)       /* display alias information  */
81 #define TDF_ENUMERATE_LOCALS (1 << 22)  /* Enumerate locals by uid.  */
82 #define TDF_CSELIB      (1 << 23)       /* Dump cselib details.  */
83 #define TDF_SCEV        (1 << 24)       /* Dump SCEV details.  */
84 #define TDF_COMMENT     (1 << 25)       /* Dump lines with prefix ";;"  */
85
86
87 /* In tree-dump.c */
88
89 extern char *get_dump_file_name (int);
90 extern int dump_enabled_p (int);
91 extern int dump_initialized_p (int);
92 extern FILE *dump_begin (int, int *);
93 extern void dump_end (int, FILE *);
94 extern void dump_node (const_tree, int, FILE *);
95 extern int dump_switch_p (const char *);
96 extern const char *dump_flag_name (int);
97
98 /* Global variables used to communicate with passes.  */
99 extern FILE *dump_file;
100 extern int dump_flags;
101 extern const char *dump_file_name;
102
103 /* Return the dump_file_info for the given phase.  */
104 extern struct dump_file_info *get_dump_file_info (int);
105
106 /* Define a tree dump switch.  */
107 struct dump_file_info
108 {
109   const char *suffix;           /* suffix to give output file.  */
110   const char *swtch;            /* command line switch */
111   const char *glob;             /* command line glob  */
112   int flags;                    /* user flags */
113   int state;                    /* state of play */
114   int num;                      /* dump file number */
115 };
116
117
118 #endif /* GCC_DUMPFILE_H */