]>
Commit | Line | Data |
---|---|---|
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 | |
5 | This file is part of GCC. | |
6 | ||
7 | GCC is free software; you can redistribute it and/or modify it under | |
8 | the terms of the GNU General Public License as published by the Free | |
8c4c00c1 | 9 | Software Foundation; either version 3, or (at your option) any later |
4c74e6d9 | 10 | version. |
11 | ||
12 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
8c4c00c1 | 18 | along 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 | 25 | extern void set_mem_alias_set (rtx, alias_set_type); |
4c74e6d9 | 26 | |
27 | /* Set the alignment of MEM to ALIGN bits. */ | |
28 | extern void set_mem_align (rtx, unsigned int); | |
29 | ||
bd1a81f7 | 30 | /* Set the address space of MEM to ADDRSPACE. */ |
31 | extern void set_mem_addr_space (rtx, addr_space_t); | |
32 | ||
4c74e6d9 | 33 | /* Set the expr for MEM to EXPR. */ |
34 | extern void set_mem_expr (rtx, tree); | |
35 | ||
36 | /* Set the offset for MEM to OFFSET. */ | |
da443c27 | 37 | extern void set_mem_offset (rtx, HOST_WIDE_INT); |
38 | ||
39 | /* Clear the offset recorded for MEM. */ | |
40 | extern void clear_mem_offset (rtx); | |
4c74e6d9 | 41 | |
42 | /* Set the size for MEM to SIZE. */ | |
5b2a69fa | 43 | extern void set_mem_size (rtx, HOST_WIDE_INT); |
44 | ||
45 | /* Clear the size recorded for MEM. */ | |
46 | extern void clear_mem_size (rtx); | |
4c74e6d9 | 47 | |
ac681e84 | 48 | /* Set the attributes for MEM appropriate for a spill slot. */ |
49 | extern void set_mem_attrs_for_spill (rtx); | |
58029e61 | 50 | extern 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. */ | |
56 | extern rtx replace_equiv_address (rtx, rtx); | |
57 | ||
58 | /* Likewise, but the reference is not required to be valid. */ | |
59 | extern rtx replace_equiv_address_nv (rtx, rtx); | |
60 | ||
06f9d6ef | 61 | extern rtx gen_blockage (void); |
62 | extern rtvec gen_rtvec (int, ...); | |
63 | extern rtx copy_insn_1 (rtx); | |
64 | extern rtx copy_insn (rtx); | |
a9abe1f1 | 65 | extern rtx copy_delay_slot_insn (rtx); |
06f9d6ef | 66 | extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode); |
67 | extern rtx emit_copy_of_insn_after (rtx, rtx); | |
68 | extern void set_reg_attrs_from_value (rtx, rtx); | |
69 | extern void set_reg_attrs_for_parm (rtx, rtx); | |
70 | extern void set_reg_attrs_for_decl_rtl (tree t, rtx x); | |
71 | extern void adjust_reg_mode (rtx, enum machine_mode); | |
72 | extern int mem_expr_equal_p (const_tree, const_tree); | |
73 | ||
30c3c442 | 74 | extern bool need_atomic_barrier_p (enum memmodel, bool); |
75 | ||
06f9d6ef | 76 | /* Return the first insn of the current sequence or current function. */ |
77 | ||
78 | static inline rtx | |
79 | get_insns (void) | |
80 | { | |
81 | return crtl->emit.x_first_insn; | |
82 | } | |
83 | ||
84 | /* Specify a new insn as the first in the chain. */ | |
85 | ||
86 | static inline void | |
87 | set_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 | ||
95 | static inline rtx | |
96 | get_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 | ||
103 | static inline void | |
104 | set_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 | ||
112 | static inline int | |
113 | get_max_uid (void) | |
114 | { | |
115 | return crtl->emit.x_cur_insn_uid; | |
116 | } | |
4c74e6d9 | 117 | #endif /* GCC_EMIT_RTL_H */ |