builtins.c (expand_builtin_atomic_compare_exchange): Pass old value operand as MEM...
[platform/upstream/gcc.git] / gcc / valtrack.h
1 /* Infrastructure for tracking user variable locations and values
2    throughout compilation.
3    Copyright (C) 2010, 2011, 2012  Free Software Foundation, Inc.
4    Contributed by Alexandre Oliva <aoliva@redhat.com>.
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3.  If not see
20 <http://www.gnu.org/licenses/>.  */
21
22 #ifndef GCC_VALTRACK_H
23 #define GCC_VALTRACK_H
24
25 #include "bitmap.h"
26 #include "df.h"
27 #include "rtl.h"
28 #include "basic-block.h"
29
30 /* Debug uses of dead regs.  */
31
32 /* Node of a linked list of uses of dead REGs in debug insns.  */
33 struct dead_debug_use
34 {
35   df_ref use;
36   struct dead_debug_use *next;
37 };
38
39 /* Linked list of the above, with a bitmap of the REGs in the
40    list.  */
41 struct dead_debug
42 {
43   struct dead_debug_use *head;
44   bitmap used;
45   bitmap to_rescan;
46 };
47
48 /* This type controls the behavior of dead_debug_insert_temp WRT
49    UREGNO and INSN.  */
50 enum debug_temp_where
51   {
52     /* Bind a newly-created debug temporary to a REG for UREGNO, and
53        insert the debug insn before INSN.  REG is expected to die at
54        INSN.  */
55     DEBUG_TEMP_BEFORE_WITH_REG = -1,
56     /* Bind a newly-created debug temporary to the value INSN stores
57        in REG, and insert the debug insn before INSN.  */
58     DEBUG_TEMP_BEFORE_WITH_VALUE = 0,
59     /* Bind a newly-created debug temporary to a REG for UREGNO, and
60        insert the debug insn after INSN.  REG is expected to be set at
61        INSN.  */
62     DEBUG_TEMP_AFTER_WITH_REG = 1
63   };
64
65 extern void dead_debug_init (struct dead_debug *, bitmap);
66 extern void dead_debug_finish (struct dead_debug *, bitmap);
67 extern void dead_debug_add (struct dead_debug *, df_ref, unsigned int);
68 extern int dead_debug_insert_temp (struct dead_debug *,
69                                    unsigned int uregno, rtx insn,
70                                    enum debug_temp_where);
71
72 extern void propagate_for_debug (rtx, rtx, rtx, rtx, basic_block);
73
74
75 #endif /* GCC_VALTRACK_H */