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