GCC Middle and Back End API Reference
Main Page
Namespaces
Data Structures
Files
File List
Globals
GCC Middle and Back End API Reference
Namespaces
Data Structures
Files
File List
addresses.h
alias.c
alias.h
alloc-pool.c
alloc-pool.h
asan.c
asan.h
attribs.c
auto-inc-dec.c
basic-block.h
bb-reorder.c
bb-reorder.h
bitmap.c
bitmap.h
bt-load.c
builtins.c
builtins.h
caller-save.c
calls.c
cfg.c
cfganal.c
cfgbuild.c
cfgcleanup.c
cfgexpand.c
cfghooks.c
cfghooks.h
cfgloop.c
cfgloop.h
cfgloopanal.c
cfgloopmanip.c
cfgrtl.c
cgraph.c
cgraph.h
cgraphbuild.c
cgraphclones.c
cgraphunit.c
cilk-common.c
cilk.h
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
combine-stack-adj.c
combine.c
compare-elim.c
conditions.h
context.c
context.h
convert.c
convert.h
coretypes.h
coverage.c
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c
cselib.c
cselib.h
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
dbgcnt.c
dbgcnt.h
dbxout.c
dbxout.h
dce.c
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
df-core.c
df-problems.c
df-scan.c
df.h
dfp.c
dfp.h
diagnostic-color.c
diagnostic-color.h
diagnostic-core.h
diagnostic.c
diagnostic.h
dojump.c
dominance.c
domwalk.c
domwalk.h
double-int.c
double-int.h
dse.c
dumpfile.c
dumpfile.h
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c
dwarf2out.c
dwarf2out.h
emit-rtl.c
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c
except.h
explow.c
expmed.c
expmed.h
expr.c
expr.h
file-find.c
file-find.h
final.c
fixed-value.c
fixed-value.h
flag-types.h
flags.h
fold-const.c
foo.c
fp-test.c
function.c
function.h
fwprop.c
gcc-ar.c
gcc-plugin.h
gcc.c
gcc.h
gcov-dump.c
gcov-io.c
gcov-io.h
gcov-iov.c
gcov.c
gcse.c
gcse.h
gdbhooks.py
genattr-common.c
genattr.c
genattrtab.c
genautomata.c
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genenums.c
genextract.c
genflags.c
gengenrtl.c
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmddeps.c
genmddump.c
genmodes.c
genopinit.c
genoutput.c
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c
ggc.h
gimple-builder.c
gimple-builder.h
gimple-fold.c
gimple-fold.h
gimple-iterator.c
gimple-low.c
gimple-low.h
gimple-pretty-print.c
gimple-pretty-print.h
gimple-ssa-strength-reduction.c
gimple-ssa.h
gimple-streamer-in.c
gimple-streamer-out.c
gimple-streamer.h
gimple.c
gimple.h
gimplify.c
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c
graphite-clast-to-gimple.h
graphite-dependences.c
graphite-htab.h
graphite-interchange.c
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c
graphite-scop-detection.h
graphite-sese-to-poly.c
graphite-sese-to-poly.h
graphite.c
gstab.h
gsyms.h
gsyslimits.h
haifa-sched.c
hard-reg-set.h
hash-table.c
hash-table.h
highlev-plugin-common.h
hooks.c
hooks.h
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c
incpath.c
incpath.h
init-regs.c
input.c
input.h
insn-addr.h
internal-fn.c
internal-fn.h
intl.c
intl.h
ipa-cp.c
ipa-devirt.c
ipa-inline-analysis.c
ipa-inline-transform.c
ipa-inline.c
ipa-inline.h
ipa-profile.c
ipa-prop.c
ipa-prop.h
ipa-pure-const.c
ipa-ref-inline.h
ipa-ref.c
ipa-ref.h
ipa-reference.c
ipa-reference.h
ipa-split.c
ipa-utils.c
ipa-utils.h
ipa.c
ira-build.c
ira-color.c
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h
ira-lives.c
ira.c
ira.h
is-a.h
jump.c
langhooks-def.h
langhooks.c
langhooks.h
lcm.c
libfuncs.h
limitx.h
limity.h
lists.c
loop-doloop.c
loop-init.c
loop-invariant.c
loop-iv.c
loop-unroll.c
loop-unswitch.c
lower-subreg.c
lower-subreg.h
lra-assigns.c
lra-coalesce.c
lra-constraints.c
lra-eliminations.c
lra-int.h
lra-lives.c
lra-spills.c
lra.c
lra.h
lto-cgraph.c
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-out.c
lto-streamer-in.c
lto-streamer-out.c
lto-streamer.c
lto-streamer.h
lto-wrapper.c
machmode.h
main.c
mcf.c
mode-switching.c
modulo-sched.c
omega.c
omega.h
omp-low.c
omp-low.h
optabs.c
optabs.h
opts-common.c
opts-diagnostic.h
opts-global.c
opts.c
opts.h
output.h
params.c
params.h
pass_manager.h
passes.c
plugin.c
plugin.h
pointer-set.c
pointer-set.h
postreload-gcse.c
postreload.c
predict.c
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c
print-tree.c
profile.c
profile.h
read-md.c
read-md.h
read-rtl.c
real.c
real.h
realmpfr.c
realmpfr.h
recog.c
recog.h
ree.c
reg-stack.c
regcprop.c
reginfo.c
regrename.c
regrename.h
regs.h
regset.h
regstat.c
reload.c
reload.h
reload1.c
reorg.c
resource.c
resource.h
rtl-error.c
rtl-error.h
rtl.c
rtl.h
rtlanal.c
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
sched-deps.c
sched-ebb.c
sched-int.h
sched-rgn.c
sched-vis.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c
sel-sched-ir.h
sel-sched.c
sel-sched.h
sese.c
sese.h
simplify-rtx.c
sparseset.c
sparseset.h
sreal.c
sreal.h
ssa-iterators.h
stack-ptr-mod.c
statistics.c
statistics.h
stmt.c
stor-layout.c
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c
symtab.c
system.h
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.h
targhooks.c
targhooks.h
timevar.c
timevar.h
tlink.c
toplev.c
toplev.h
tracer.c
trans-mem.c
trans-mem.h
tree-affine.c
tree-affine.h
tree-browser.c
tree-call-cdce.c
tree-cfg.c
tree-cfg.h
tree-cfgcleanup.c
tree-cfgcleanup.h
tree-chrec.c
tree-chrec.h
tree-complex.c
tree-core.h
tree-data-ref.c
tree-data-ref.h
tree-dfa.c
tree-dfa.h
tree-diagnostic.c
tree-diagnostic.h
tree-dump.c
tree-dump.h
tree-eh.c
tree-eh.h
tree-emutls.c
tree-hasher.h
tree-if-conv.c
tree-inline.c
tree-inline.h
tree-into-ssa.c
tree-into-ssa.h
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c
tree-nested.c
tree-nrv.c
tree-object-size.c
tree-outof-ssa.c
tree-outof-ssa.h
tree-parloops.c
tree-parloops.h
tree-pass.h
tree-phinodes.c
tree-phinodes.h
tree-predcom.c
tree-pretty-print.c
tree-pretty-print.h
tree-profile.c
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c
tree-ssa-address.c
tree-ssa-address.h
tree-ssa-alias.c
tree-ssa-alias.h
tree-ssa-ccp.c
tree-ssa-coalesce.c
tree-ssa-coalesce.h
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c
tree-ssa-dom.h
tree-ssa-dse.c
tree-ssa-forwprop.c
tree-ssa-ifcombine.c
tree-ssa-live.c
tree-ssa-live.h
tree-ssa-loop-ch.c
tree-ssa-loop-im.c
tree-ssa-loop-ivcanon.c
tree-ssa-loop-ivopts.c
tree-ssa-loop-ivopts.h
tree-ssa-loop-manip.c
tree-ssa-loop-manip.h
tree-ssa-loop-niter.c
tree-ssa-loop-niter.h
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-loop.h
tree-ssa-math-opts.c
tree-ssa-operands.c
tree-ssa-operands.h
tree-ssa-phiopt.c
tree-ssa-phiprop.c
tree-ssa-pre.c
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c
tree-ssa-sccvn.c
tree-ssa-sccvn.h
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c
tree-ssa-tail-merge.c
tree-ssa-ter.c
tree-ssa-ter.h
tree-ssa-threadedge.c
tree-ssa-threadedge.h
tree-ssa-threadupdate.c
tree-ssa-threadupdate.h
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c
tree-ssa.h
tree-ssanames.c
tree-ssanames.h
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c
tree-streamer-out.c
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c
tree-tailcall.c
tree-vect-data-refs.c
tree-vect-generic.c
tree-vect-loop-manip.c
tree-vect-loop.c
tree-vect-patterns.c
tree-vect-slp.c
tree-vect-stmts.c
tree-vectorizer.c
tree-vectorizer.h
tree-vrp.c
tree.c
tree.h
tsan.c
tsan.h
tsystem.h
typeclass.h
ubsan.c
ubsan.h
valtrack.c
valtrack.h
value-prof.c
value-prof.h
var-tracking.c
varasm.c
varpool.c
vec.c
vec.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
vtable-verify.c
vtable-verify.h
web.c
xcoff.h
xcoffout.c
xcoffout.h
Globals
tree-ssa-alias.h
Go to the documentation of this file.
1
/* Tree based alias analysis and alias oracle.
2
Copyright (C) 2008-2013 Free Software Foundation, Inc.
3
Contributed by Richard Guenther <rguenther@suse.de>
4
5
This file is part of GCC.
6
7
GCC is free software; you can redistribute it and/or modify
8
under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 3 of the License, or
10
(at your option) any later version.
11
12
GCC is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with GCC; see the file COPYING3. If not see
19
<http://www.gnu.org/licenses/>. */
20
21
#ifndef TREE_SSA_ALIAS_H
22
#define TREE_SSA_ALIAS_H
23
24
/* The points-to solution.
25
26
The points-to solution is a union of pt_vars and the abstract
27
sets specified by the flags. */
28
struct
GTY(())
pt_solution
29
{
30
/* Nonzero if points-to analysis couldn't determine where this pointer
31
is pointing to. */
32
unsigned
int
anything : 1;
33
34
/* Nonzero if the points-to set includes any global memory. Note that
35
even if this is zero pt_vars can still include global variables. */
36
unsigned
int
nonlocal : 1;
37
38
/* Nonzero if the points-to set includes the local escaped solution by
39
reference. */
40
unsigned
int
escaped : 1;
41
42
/* Nonzero if the points-to set includes the IPA escaped solution by
43
reference. */
44
unsigned
int
ipa_escaped : 1;
45
46
/* Nonzero if the points-to set includes 'nothing', the points-to set
47
includes memory at address NULL. */
48
unsigned
int
null : 1;
49
50
51
/* Nonzero if the pt_vars bitmap includes a global variable. */
52
unsigned
int
vars_contains_global : 1;
53
54
55
/* Set of variables that this pointer may point to. */
56
bitmap
vars;
57
};
58
59
60
/* Simplified and cached information about a memory reference tree.
61
Used by the alias-oracle internally and externally in alternate
62
interfaces. */
63
typedef
struct
ao_ref_s
64
{
65
/* The original full memory reference tree or NULL_TREE if that is
66
not available. */
67
tree
ref
;
68
69
/* The following fields are the decomposed reference as returned
70
by get_ref_base_and_extent. */
71
/* The base object of the memory reference or NULL_TREE if all of
72
the following fields are not yet computed. */
73
tree
base
;
74
/* The offset relative to the base. */
75
HOST_WIDE_INT
offset
;
76
/* The size of the access. */
77
HOST_WIDE_INT
size
;
78
/* The maximum possible extent of the access or -1 if unconstrained. */
79
HOST_WIDE_INT
max_size
;
80
81
/* The alias set of the access or -1 if not yet computed. */
82
alias_set_type
ref_alias_set
;
83
84
/* The alias set of the base object or -1 if not yet computed. */
85
alias_set_type
base_alias_set
;
86
87
/* Whether the memory is considered a volatile access. */
88
bool
volatile_p
;
89
}
ao_ref
;
90
91
92
/* In tree-ssa-alias.c */
93
extern
void
ao_ref_init
(
ao_ref
*,
tree
);
94
extern
void
ao_ref_init_from_ptr_and_size
(
ao_ref
*,
tree
,
tree
);
95
extern
tree
ao_ref_base
(
ao_ref
*);
96
extern
alias_set_type
ao_ref_alias_set
(
ao_ref
*);
97
extern
bool
ptr_deref_may_alias_global_p
(
tree
);
98
extern
bool
ptr_derefs_may_alias_p
(
tree
,
tree
);
99
extern
bool
ref_may_alias_global_p
(
tree
);
100
extern
bool
refs_may_alias_p
(
tree
,
tree
);
101
extern
bool
refs_may_alias_p_1
(
ao_ref
*,
ao_ref
*,
bool
);
102
extern
bool
refs_anti_dependent_p
(
tree
,
tree
);
103
extern
bool
refs_output_dependent_p
(
tree
,
tree
);
104
extern
bool
ref_maybe_used_by_stmt_p
(
gimple
,
tree
);
105
extern
bool
stmt_may_clobber_global_p
(
gimple
);
106
extern
bool
stmt_may_clobber_ref_p
(
gimple
,
tree
);
107
extern
bool
stmt_may_clobber_ref_p_1
(
gimple
,
ao_ref
*);
108
extern
bool
call_may_clobber_ref_p
(
gimple
,
tree
);
109
extern
bool
stmt_kills_ref_p
(
gimple
,
tree
);
110
extern
tree
get_continuation_for_phi
(
gimple
,
ao_ref
*,
111
unsigned
int
*,
bitmap
*,
bool
);
112
extern
void
*
walk_non_aliased_vuses
(
ao_ref
*,
tree
,
113
void
*(*)(
ao_ref
*,
tree
,
114
unsigned
int
,
void
*),
115
void
*(*)(
ao_ref
*,
tree
,
void
*),
void
*);
116
extern
unsigned
int
walk_aliased_vdefs
(
ao_ref
*,
tree
,
117
bool
(*)(
ao_ref
*,
tree
,
void
*),
118
void
*,
bitmap
*);
119
extern
void
dump_alias_info
(FILE *);
120
extern
void
debug_alias_info
(
void
);
121
extern
void
dump_points_to_solution
(FILE *,
struct
pt_solution
*);
122
extern
void
debug
(
pt_solution
&ref);
123
extern
void
debug
(
pt_solution
*ptr);
124
extern
void
dump_points_to_info_for
(FILE *,
tree
);
125
extern
void
debug_points_to_info_for
(
tree
);
126
extern
void
dump_alias_stats
(FILE *);
127
128
129
/* In tree-ssa-structalias.c */
130
extern
unsigned
int
compute_may_aliases
(
void
);
131
extern
bool
pt_solution_empty_p
(
struct
pt_solution
*);
132
extern
bool
pt_solution_singleton_p
(
struct
pt_solution
*,
unsigned
*);
133
extern
bool
pt_solution_includes_global
(
struct
pt_solution
*);
134
extern
bool
pt_solution_includes
(
struct
pt_solution
*,
const_tree
);
135
extern
bool
pt_solutions_intersect
(
struct
pt_solution
*,
struct
pt_solution
*);
136
extern
void
pt_solution_reset
(
struct
pt_solution
*);
137
extern
void
pt_solution_set
(
struct
pt_solution
*,
bitmap
,
bool
);
138
extern
void
pt_solution_set_var
(
struct
pt_solution
*,
tree
);
139
140
extern
void
dump_pta_stats
(FILE *);
141
142
extern
GTY(()) struct
pt_solution
ipa_escaped_pt
;
143
144
/* Return true, if the two ranges [POS1, SIZE1] and [POS2, SIZE2]
145
overlap. SIZE1 and/or SIZE2 can be (unsigned)-1 in which case the
146
range is open-ended. Otherwise return false. */
147
148
static inline
bool
149
ranges_overlap_p
(
unsigned
HOST_WIDE_INT
pos1,
150
unsigned
HOST_WIDE_INT
size1,
151
unsigned
HOST_WIDE_INT
pos2,
152
unsigned
HOST_WIDE_INT
size2)
153
{
154
if
(pos1 >= pos2
155
&& (size2 == (
unsigned
HOST_WIDE_INT
)-1
156
|| pos1 < (pos2 + size2)))
157
return
true
;
158
if
(pos2 >= pos1
159
&& (size1 == (
unsigned
HOST_WIDE_INT)-1
160
|| pos2 < (pos1 + size1)))
161
return
true
;
162
163
return
false
;
164
}
165
166
167
168
#endif
/* TREE_SSA_ALIAS_H */
gcc
tree-ssa-alias.h
Generated by
1.8.1.1