GCC Middle and Back End API Reference
tree-outof-ssa.h
Go to the documentation of this file.
1/* Routines for expanding from SSA form to RTL.
2 Copyright (C) 2009-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for 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
21#ifndef GCC_TREE_OUTOF_SSA_H
22#define GCC_TREE_OUTOF_SSA_H
23
24
25/* This structure (of which only a singleton SA exists) is used to
26 pass around information between the outof-SSA functions, cfgexpand
27 and expand itself. */
29{
30 /* The computed partitions of SSA names are stored here. */
32
33 /* For an SSA name version V bit V is set iff TER decided that
34 its definition should be forwarded. */
36
37 /* For a partition number I partition_to_pseudo[I] contains the
38 RTL expression of the allocated space of it (either a MEM or
39 a pseudos REG). */
41
42 /* If partition I contains an SSA name that has a default def for a
43 parameter, bit I will be set in this bitmap. */
45
46 /* If partition I contains an SSA name that has an undefined value,
47 bit I will be set in this bitmap. */
49};
50
51/* This is the singleton described above. */
52extern struct ssaexpand SA;
53
54/* Returns the RTX expression representing the storage of the outof-SSA
55 partition that the SSA name EXP is a member of. */
56inline rtx
65
66/* If TER decided to forward the definition of SSA name EXP this function
67 returns the defining statement, otherwise NULL. */
68inline gimple *
70{
71 int v = SSA_NAME_VERSION (exp);
72 if (SA.values && bitmap_bit_p (SA.values, v))
73 return SSA_NAME_DEF_STMT (exp);
74 return NULL;
75}
76
77extern bool ssa_is_replaceable_p (gimple *stmt);
78extern void finish_out_of_ssa (struct ssaexpand *sa);
79extern unsigned int rewrite_out_of_ssa (struct ssaexpand *sa);
80extern void expand_phi_nodes (struct ssaexpand *sa);
81
82#endif /* GCC_TREE_OUTOF_SSA_H */
class bitmap_head * bitmap
Definition coretypes.h:51
union tree_node * tree
Definition coretypes.h:97
double exp(double)
#define bitmap_bit_p(bitstring, bitno)
Definition genautomata.cc:3429
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
Definition tree-ssa-live.h:46
partition var_partition
Definition tree-ssa-live.h:48
int * partition_to_view
Definition tree-ssa-live.h:51
Definition gimple.h:225
Definition rtl.h:311
Definition tree-outof-ssa.h:29
bitmap partitions_for_undefined_values
Definition tree-outof-ssa.h:48
bitmap values
Definition tree-outof-ssa.h:35
bitmap partitions_for_parm_default_defs
Definition tree-outof-ssa.h:44
rtx * partition_to_pseudo
Definition tree-outof-ssa.h:40
var_map map
Definition tree-outof-ssa.h:31
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:821
unsigned int rewrite_out_of_ssa(struct ssaexpand *sa)
Definition tree-outof-ssa.cc:1333
gimple * get_gimple_for_ssa_name(tree exp)
Definition tree-outof-ssa.h:69
bool ssa_is_replaceable_p(gimple *stmt)
Definition tree-outof-ssa.cc:57
struct ssaexpand SA
Definition cfgexpand.cc:88
void expand_phi_nodes(struct ssaexpand *sa)
Definition tree-outof-ssa.cc:1012
void finish_out_of_ssa(struct ssaexpand *sa)
Definition tree-outof-ssa.cc:1317
rtx get_rtx_for_ssa_name(tree exp)
Definition tree-outof-ssa.h:57
#define NO_PARTITION
Definition tree-ssa-live.h:85
#define SSA_NAME_DEF_STMT(NODE)
Definition tree.h:2097
#define SSA_NAME_VERSION(NODE)
Definition tree.h:2101