]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/emit-rtl.h
Update Copyright years for files modified in 2011 and/or 2012.
[thirdparty/gcc.git] / gcc / emit-rtl.h
CommitLineData
4c74e6d9 1/* Exported functions from emit-rtl.c
71e45bc2 2 Copyright (C) 2004, 2007, 2008, 2010, 2011, 2012
3 Free Software Foundation, Inc.
4c74e6d9 4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
8c4c00c1 9Software Foundation; either version 3, or (at your option) any later
4c74e6d9 10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
8c4c00c1 18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
4c74e6d9 20
21#ifndef GCC_EMIT_RTL_H
22#define GCC_EMIT_RTL_H
23
24/* Set the alias set of MEM to SET. */
32c2fdea 25extern void set_mem_alias_set (rtx, alias_set_type);
4c74e6d9 26
27/* Set the alignment of MEM to ALIGN bits. */
28extern void set_mem_align (rtx, unsigned int);
29
bd1a81f7 30/* Set the address space of MEM to ADDRSPACE. */
31extern void set_mem_addr_space (rtx, addr_space_t);
32
4c74e6d9 33/* Set the expr for MEM to EXPR. */
34extern void set_mem_expr (rtx, tree);
35
36/* Set the offset for MEM to OFFSET. */
da443c27 37extern void set_mem_offset (rtx, HOST_WIDE_INT);
38
39/* Clear the offset recorded for MEM. */
40extern void clear_mem_offset (rtx);
4c74e6d9 41
42/* Set the size for MEM to SIZE. */
5b2a69fa 43extern void set_mem_size (rtx, HOST_WIDE_INT);
44
45/* Clear the size recorded for MEM. */
46extern void clear_mem_size (rtx);
4c74e6d9 47
ac681e84 48/* Set the attributes for MEM appropriate for a spill slot. */
49extern void set_mem_attrs_for_spill (rtx);
58029e61 50extern tree get_spill_slot_decl (bool);
ac681e84 51
4c74e6d9 52/* Return a memory reference like MEMREF, but with its address changed to
53 ADDR. The caller is asserting that the actual piece of memory pointed
54 to is the same, just the form of the address is being changed, such as
55 by putting something into a register. */
56extern rtx replace_equiv_address (rtx, rtx);
57
58/* Likewise, but the reference is not required to be valid. */
59extern rtx replace_equiv_address_nv (rtx, rtx);
60
06f9d6ef 61extern rtx gen_blockage (void);
62extern rtvec gen_rtvec (int, ...);
63extern rtx copy_insn_1 (rtx);
64extern rtx copy_insn (rtx);
a9abe1f1 65extern rtx copy_delay_slot_insn (rtx);
06f9d6ef 66extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode);
67extern rtx emit_copy_of_insn_after (rtx, rtx);
68extern void set_reg_attrs_from_value (rtx, rtx);
69extern void set_reg_attrs_for_parm (rtx, rtx);
70extern void set_reg_attrs_for_decl_rtl (tree t, rtx x);
71extern void adjust_reg_mode (rtx, enum machine_mode);
72extern int mem_expr_equal_p (const_tree, const_tree);
73
30c3c442 74extern bool need_atomic_barrier_p (enum memmodel, bool);
75
06f9d6ef 76/* Return the first insn of the current sequence or current function. */
77
78static inline rtx
79get_insns (void)
80{
81 return crtl->emit.x_first_insn;
82}
83
84/* Specify a new insn as the first in the chain. */
85
86static inline void
87set_first_insn (rtx insn)
88{
e95895ef 89 gcc_checking_assert (!insn || !PREV_INSN (insn));
06f9d6ef 90 crtl->emit.x_first_insn = insn;
91}
92
93/* Return the last insn emitted in current sequence or current function. */
94
95static inline rtx
96get_last_insn (void)
97{
98 return crtl->emit.x_last_insn;
99}
100
101/* Specify a new insn as the last in the chain. */
102
103static inline void
104set_last_insn (rtx insn)
105{
e95895ef 106 gcc_checking_assert (!insn || !NEXT_INSN (insn));
06f9d6ef 107 crtl->emit.x_last_insn = insn;
108}
109
110/* Return a number larger than any instruction's uid in this function. */
111
112static inline int
113get_max_uid (void)
114{
115 return crtl->emit.x_cur_insn_uid;
116}
4c74e6d9 117#endif /* GCC_EMIT_RTL_H */