GCC Middle and Back End API Reference
resource.h
Go to the documentation of this file.
1/* Definitions for computing resource usage of specific insns.
2 Copyright (C) 1999-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_RESOURCE_H
21#define GCC_RESOURCE_H
22
23/* Macro to clear all resources. */
24#define CLEAR_RESOURCE(RES) \
25 do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \
26 CLEAR_HARD_REG_SET ((RES)->regs); } while (0)
27
28/* The resources used by a given insn. */
30{
31 char memory; /* Insn sets or needs a memory location. */
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
37/* The kinds of rtl mark_*_resources will consider */
43
44extern void mark_target_live_regs (rtx_insn *, rtx, struct resources *);
45extern void mark_set_resources (rtx, struct resources *, int,
47extern void mark_referenced_resources (rtx, struct resources *, bool);
50extern void incr_ticks_for_insn (rtx_insn *);
51extern void mark_end_of_function_resources (rtx, bool);
52extern void init_resource_info (rtx_insn *);
53extern void free_resource_info (void);
54
55#endif /* GCC_RESOURCE_H */
HARD_REG_ELT_TYPE HARD_REG_SET
Definition hard-reg-set.h:47
void clear_hashed_info_until_next_barrier(rtx_insn *)
Definition resource.cc:1281
mark_resource_type
Definition resource.h:39
@ MARK_SRC_DEST_CALL
Definition resource.h:41
@ MARK_SRC_DEST
Definition resource.h:40
void clear_hashed_info_for_insn(rtx_insn *)
Definition resource.cc:1261
void mark_end_of_function_resources(rtx, bool)
Definition resource.cc:1310
void incr_ticks_for_insn(rtx_insn *)
Definition resource.cc:1299
void mark_set_resources(rtx, struct resources *, int, enum mark_resource_type)
Definition resource.cc:609
void free_resource_info(void)
Definition resource.cc:1223
void mark_referenced_resources(rtx, struct resources *, bool)
Definition resource.cc:199
void init_resource_info(rtx_insn *)
Definition resource.cc:1140
void mark_target_live_regs(rtx_insn *, rtx, struct resources *)
Definition resource.cc:865
Definition resource.h:30
char volatil
Definition resource.h:32
char cc
Definition resource.h:33
char memory
Definition resource.h:31
HARD_REG_SET regs
Definition resource.h:34
Definition rtl.h:311
Definition rtl.h:545