diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 11 | ||||
-rw-r--r-- | gcc/doc/tree-ssa.texi | 39 |
2 files changed, 49 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a1ef8313..c30b161 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -266,6 +266,7 @@ Objective-C and Objective-C++ Dialects}. -fdump-tree-nrv -fdump-tree-vect @gol -fdump-tree-sink @gol -fdump-tree-sra@r{[}-@var{n}@r{]} @gol +-fdump-tree-salias @gol -fdump-tree-fre@r{[}-@var{n}@r{]} @gol -ftree-vectorizer-verbose=@var{n} @gol -feliminate-dwarf2-dups -feliminate-unused-debug-types @gol @@ -322,6 +323,7 @@ Objective-C and Objective-C++ Dialects}. -ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol -ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol -ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize @gol +-ftree-salias @gol --param @var{name}=@var{value} -O -O0 -O1 -O2 -O3 -Os} @@ -3819,6 +3821,11 @@ appending @file{.ch} to the source file name. Dump SSA related information to a file. The file name is made by appending @file{.ssa} to the source file name. +@item salias +@opindex fdump-tree-salias +Dump structure aliasing variable information to a file. This file name +is made by appending @file{.salias} to the source file name. + @item alias @opindex fdump-tree-alias Dump aliasing information for each function. The file name is made by @@ -4695,6 +4702,10 @@ that are computed on all paths leading to the redundant computation. This analysis faster than PRE, though it exposes fewer redundancies. This flag is enabled by default at @option{-O} and higher. +@item -ftree-salias +Perform structural alias analysis on trees. This flag +is enabled by default at @option{-O} and higher. + @item -ftree-sink Perform forward store motion on trees. This flag is enabled by default at @option{-O} and higher. diff --git a/gcc/doc/tree-ssa.texi b/gcc/doc/tree-ssa.texi index 6996e83..4679912 100644 --- a/gcc/doc/tree-ssa.texi +++ b/gcc/doc/tree-ssa.texi @@ -1208,9 +1208,46 @@ hooks to execute custom code at various points during traversal: @cindex flow-sensitive alias analysis @cindex flow-insensitive alias analysis -Alias analysis proceeds in 3 main phases: +Alias analysis proceeds in 4 main phases: @enumerate +@item Structural alias analysis. + +This phase walks the types for structure variables, and determines which +of the fields can overlap using offset and size of each field. For each +field, a ``subvariable'' called a ``Structure field tag'' (SFT)@ is +created, which represents that field as a separate variable. All +accesses that could possibly overlap with a given field will have +virtual operands for the SFT of that field. + +@smallexample +struct foo +@{ + int a; + int b; +@} +struct foo temp; +int bar (void) +@{ + int tmp1, tmp2, tmp3; + SFT.0_2 = V_MUST_DEF <SFT.0_1> + temp.a = 5; + SFT.1_4 = V_MUST_DEF <SFT.1_3> + temp.b = 6; + + VUSE <SFT.1_4> + tmp1_5 = temp.b; + VUSE <SFT.0_2> + tmp2_6 = temp.a; + + tmp3_7 = tmp1_5 + tmp2_6; + return tmp3_7; +@} +@end smallexample + +If you copy the type tag for a variable for some reason, you probably +also want to copy the subvariables for that variable. + @item Points-to and escape analysis. This phase walks the use-def chains in the SSA web looking for |