This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: [Patch Ping] [RFC] Alias export patch


Hi,

Testing the aliasing patch with the latest mainline has revealed the
changes in structure aliasing, so we had to rewrite some code that handles
variables with SFTs. Most significant changes are in get_extended_alias_set
routine that allocates alias set numbers based on points-to information.
In the other part of patch which handles directly rtxes in true_dependence
and write_dependence additional efforts were made to preserve original
expression trees in MEM_ATTRS while processing rtl (a field addressed with
MEM_ORIG_EXPR was introduced along with MEM_EXPR). This caused us to
rewrite some code in emit-rtl.c.

Here are the numbers of disambiguations obtained on SPECINT2000 build
on ia64 with -O2 (see the legend below):

D = 85757
P = 1826
u = 3247
A = 27
a = 8397
d = 9009
F = 2616
x = 4780
X = 151552
+ = 2828
- = 1952

Legend:

D - Total number of dereferenced ptrs.
P - Number of pointers (after merge of different ssa versions) with useful (non-empty)
    points-to set.
u - Number of SSA-pointers (before merge) with useful (non-empty) points-to set.
A - Number of ptrs with not empty points-to, but with points-to-anything
    attribute set. These are not included in P, and can't be used for disambiguation.

x - Number of new disambiguated MEM pairs in true_dependence and
    write_dependence with -fpropagate-points-to.
X - Could have been disambiguated with -fpropagate-points-to, if none
    of the existing disambiguation heuristics in alias.c have worked
    (i.e. it's not only new, but all disambiguations obtained with -fpropagate-points-to).
a - New disambiguations with -fpropagate-alias-sets in alias_sets_conflict_p.
d - Could have been disambiguated with -fpropagate-alias-sets, if not
    strict-aliasing type-based disambiguations (i.e. like 'a', but
    counting every disambiguation).
+ - The number of mem pairs that were disambiguated with both
    -fpropagate-alias-sets and -fpropagate-points-to-sets
    simultaneously (|x * a|, '*' means intersection).
- - The number of new disambiuations obtained with
    -fpropagate-points-to-sets over the number obtained with
    -fpropagate-alias-sets for the same mem pairs (|(x + a) \ a|).

The patch was bootstrapped and regtested on x86, x86_64 and ia64 with
March 06 mainline and c,c++ enabled, and on x86 with today's mainline
and all languages enabled. The SPEC performance change is neutral.
Okay for trunk?

We still need additional pass_may_alias right before pass_del_ssa so
we can compute and save more precise aliasing information after loop
optimizations have finished, but if we add pass_may_alias after
pass_iv_optimize, compiler fails to bootstrap. There's a comment
concerning this issue in passes.c:

  /* NEXT_PASS (pass_may_alias) cannot be done again because the
     vectorizer creates alias relations that are not supported by
     pass_may_alias.  */

But it's not clear whether it considered normal, or is it going to be
fixed someday?

Should we try the patch with ipa points-to analysis? if so, what's the
correct way of doing this?

     
-- 
Best regards,
  Dmitry

Attachment: Changelog.txt
Description: Text document

Attachment: aliasing-info-propagation.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]