comparison gcc/resource.h @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
15:561a7518be6b 16:04ced10e8804
1 /* Definitions for computing resource usage of specific insns. 1 /* Definitions for computing resource usage of specific insns.
2 Copyright (C) 1999, 2003, 2004, 2006, 2007, 2009, 2010 2 Copyright (C) 1999-2017 Free Software Foundation, Inc.
3 Free Software Foundation, Inc.
4 3
5 This file is part of GCC. 4 This file is part of GCC.
6 5
7 GCC is free software; you can redistribute it and/or modify it under 6 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 7 the terms of the GNU General Public License as published by the Free
19 <http://www.gnu.org/licenses/>. */ 18 <http://www.gnu.org/licenses/>. */
20 19
21 #ifndef GCC_RESOURCE_H 20 #ifndef GCC_RESOURCE_H
22 #define GCC_RESOURCE_H 21 #define GCC_RESOURCE_H
23 22
24 #include "hard-reg-set.h"
25 #include "df.h"
26
27 /* Macro to clear all resources. */ 23 /* Macro to clear all resources. */
28 #define CLEAR_RESOURCE(RES) \ 24 #define CLEAR_RESOURCE(RES) \
29 do { (RES)->memory = (RES)->unch_memory = (RES)->volatil = (RES)->cc = 0; \ 25 do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \
30 CLEAR_HARD_REG_SET ((RES)->regs); } while (0) 26 CLEAR_HARD_REG_SET ((RES)->regs); } while (0)
31 27
32 /* The resources used by a given insn. */ 28 /* The resources used by a given insn. */
33 struct resources 29 struct resources
34 { 30 {
35 char memory; /* Insn sets or needs a memory location. */ 31 char memory; /* Insn sets or needs a memory location. */
36 char unch_memory; /* Insn sets or needs an "unchanging" MEM. */
37 char volatil; /* Insn sets or needs a volatile memory loc. */ 32 char volatil; /* Insn sets or needs a volatile memory loc. */
38 char cc; /* Insn sets or needs the condition codes. */ 33 char cc; /* Insn sets or needs the condition codes. */
39 HARD_REG_SET regs; /* Which registers are set or needed. */ 34 HARD_REG_SET regs; /* Which registers are set or needed. */
40 }; 35 };
41 36
44 { 39 {
45 MARK_SRC_DEST = 0, 40 MARK_SRC_DEST = 0,
46 MARK_SRC_DEST_CALL = 1 41 MARK_SRC_DEST_CALL = 1
47 }; 42 };
48 43
49 extern void mark_target_live_regs (rtx, rtx, struct resources *); 44 extern void mark_target_live_regs (rtx_insn *, rtx, struct resources *);
50 extern void mark_set_resources (rtx, struct resources *, int, 45 extern void mark_set_resources (rtx, struct resources *, int,
51 enum mark_resource_type); 46 enum mark_resource_type);
52 extern void mark_referenced_resources (rtx, struct resources *, bool); 47 extern void mark_referenced_resources (rtx, struct resources *, bool);
53 extern void clear_hashed_info_for_insn (rtx); 48 extern void clear_hashed_info_for_insn (rtx_insn *);
54 extern void incr_ticks_for_insn (rtx); 49 extern void incr_ticks_for_insn (rtx_insn *);
55 extern void mark_end_of_function_resources (rtx, bool); 50 extern void mark_end_of_function_resources (rtx, bool);
56 extern void init_resource_info (rtx); 51 extern void init_resource_info (rtx_insn *);
57 extern void free_resource_info (void); 52 extern void free_resource_info (void);
58 53
59 #endif /* GCC_RESOURCE_H */ 54 #endif /* GCC_RESOURCE_H */