]>
Commit | Line | Data |
---|---|---|
ca545bb5 | 1 | /* Definitions for computing resource usage of specific insns. |
818ab71a | 2 | Copyright (C) 1999-2016 Free Software Foundation, Inc. |
ca545bb5 | 3 | |
1322177d | 4 | This file is part of GCC. |
ca545bb5 | 5 | |
1322177d LB |
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 |
1322177d | 9 | version. |
ca545bb5 | 10 | |
1322177d LB |
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. | |
ca545bb5 BM |
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/>. */ | |
ca545bb5 | 19 | |
59587b18 JQ |
20 | #ifndef GCC_RESOURCE_H |
21 | #define GCC_RESOURCE_H | |
22 | ||
ca545bb5 BM |
23 | /* Macro to clear all resources. */ |
24 | #define CLEAR_RESOURCE(RES) \ | |
fd6beed4 | 25 | do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \ |
ca545bb5 BM |
26 | CLEAR_HARD_REG_SET ((RES)->regs); } while (0) |
27 | ||
2ba84f36 | 28 | /* The resources used by a given insn. */ |
ca545bb5 BM |
29 | struct resources |
30 | { | |
31 | char memory; /* Insn sets or needs a memory location. */ | |
ca545bb5 BM |
32 | char volatil; /* Insn sets or needs a volatile memory loc. */ |
33 | char cc; /* Insn sets or needs the condition codes. */ | |
34 | HARD_REG_SET regs; /* Which registers are set or needed. */ | |
35 | }; | |
36 | ||
73780b74 SC |
37 | /* The kinds of rtl mark_*_resources will consider */ |
38 | enum mark_resource_type | |
39 | { | |
40 | MARK_SRC_DEST = 0, | |
73fb6466 | 41 | MARK_SRC_DEST_CALL = 1 |
73780b74 SC |
42 | }; |
43 | ||
c3f14d55 | 44 | extern void mark_target_live_regs (rtx_insn *, rtx, struct resources *); |
0c20a65f AJ |
45 | extern void mark_set_resources (rtx, struct resources *, int, |
46 | enum mark_resource_type); | |
675f99c9 | 47 | extern void mark_referenced_resources (rtx, struct resources *, bool); |
a79b674b DM |
48 | extern void clear_hashed_info_for_insn (rtx_insn *); |
49 | extern void incr_ticks_for_insn (rtx_insn *); | |
675f99c9 | 50 | extern void mark_end_of_function_resources (rtx, bool); |
a79b674b | 51 | extern void init_resource_info (rtx_insn *); |
0c20a65f | 52 | extern void free_resource_info (void); |
59587b18 JQ |
53 | |
54 | #endif /* GCC_RESOURCE_H */ |