[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2010-07-13 Thread rguenth at gcc dot gnu dot org


--- Comment #20 from rguenth at gcc dot gnu dot org  2010-07-13 13:29 
---
The bug is confused now and mixes -fargument-* with other missed opts (which
I think are fixed with IPA-PTA and/or proper use of restricts or are dups
of other problems).

-fargument-noalias* problems are WONTFIX, as that options no longer exist.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2010-07-13 Thread steven at gcc dot gnu dot org


--- Comment #19 from steven at gcc dot gnu dot org  2010-07-13 11:27 ---
Ehm, Richi, WONTFIX why?  Is this not what you added the alias attributes for?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2010-07-13 Thread rguenth at gcc dot gnu dot org


--- Comment #18 from rguenth at gcc dot gnu dot org  2010-07-13 11:10 
---
WONTFIX.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2010-07-13 Thread steven at gcc dot gnu dot org


--- Comment #17 from steven at gcc dot gnu dot org  2010-07-13 10:21 ---
>From common.opt r161963:

fargument-alias
Common
Does nothing. Preserved for backward compatibility.

fargument-noalias
Common
Does nothing. Preserved for backward compatibility.

fargument-noalias-global
Common
Does nothing. Preserved for backward compatibility.

fargument-noalias-anything
Common
Does nothing. Preserved for backward compatibility.

This was changed in http://gcc.gnu.org/viewcvs?view=revision&revision=158060


The test case of comment #1 is now optimized on GIMPLE at -O2.


Richi, what should be done with this bug report, now that the flag doesn't even
exist anymore?


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|NEW |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2009-04-03 Thread rguenth at gcc dot gnu dot org


--- Comment #16 from rguenth at gcc dot gnu dot org  2009-04-03 11:57 
---
Re-confirmed with current trunk.  The issue is that PTA computes

Flow-insensitive points-to information for foo

p_1(D), points-to vars: { PARM_NOALIAS.28 } (includes global vars)

foo (int * p)
{
:
  *p_1(D) = 1;
  bar ();
  *p_1(D) = 2;
  return;

note the 'includes global vars' flag.  Note that "fixing" this would
really make _both_ stores to *p dead, as "does-not-point-to-global"
does not mean "does-point-to-local".

A more proper definition of the effect of this flag should be given.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Last reconfirmed|2006-01-05 14:24:50 |2009-04-03 11:57:05
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-30 Thread pinskia at gcc dot gnu dot org


--- Comment #15 from pinskia at gcc dot gnu dot org  2006-01-31 01:11 
---
The other time pi->pt_global_mem is set to 1 is when vi->is_artificial_var and
vi->is_heap_var is set.

now trying to turn off is_artificial_var and what David pointed out does not
work, because we don't have a way to say this is used after the function is
done so DCE removes the both sets in the testcase in comment #13.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-30 Thread dje at gcc dot gnu dot org


--- Comment #14 from dje at gcc dot gnu dot org  2006-01-31 00:49 ---
The parameter is considered global because it is marked DECL_EXTERNAL.  And it
is marked EXTERNAL in tree-ssa-structalias.c:

heapvar = create_tmp_var_raw (TREE_TYPE (TREE_TYPE (t)), PARM_NOALIAS");
DECL_EXTERNAL (heapvar) = 1;

Should the temp variable always be marked external?


-- 

dje at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dje at gcc dot gnu dot org,
   ||dberlin at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-28 Thread pinskia at gcc dot gnu dot org


--- Comment #13 from pinskia at gcc dot gnu dot org  2006-01-29 04:32 
---
All the rest of the issues are going to be too complex for me to fix, IFort
does not optimize Fortran code like this either.

So the comments which are not fixed are #0 and #2 across the functions.

The corresponding Fortran looks like:
function h(a)
integer a
a = 1
call g()
a = 1
h = 1.0
end function


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-26 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2006-01-26 18:15 
---
This is the patch which helps the call clobering but does not fix it all the
way (because a different call clobbering issue):
Index: tree-ssa-alias.c
===
--- tree-ssa-alias.c(revision 110263)
+++ tree-ssa-alias.c(working copy)
@@ -328,7 +328,8 @@ set_initial_properties (struct alias_inf
}
   else if (TREE_CODE (var) == PARM_DECL
   && default_def (var)
-  && POINTER_TYPE_P (TREE_TYPE (var)))
+  && POINTER_TYPE_P (TREE_TYPE (var))
+  && flag_argument_noalias > 1)
{
  tree def = default_def (var);
  get_ptr_info (def)->value_escapes_p = 1;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-26 Thread pinskia at gcc dot gnu dot org


--- Comment #11 from pinskia at gcc dot gnu dot org  2006-01-26 17:51 
---
The partial fix has been applied, I have another patch which fixes another part
of this but still not fully.
It just helps the call cloberring mechanism.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-26 Thread pinskia at gcc dot gnu dot org


--- Comment #10 from pinskia at gcc dot gnu dot org  2006-01-26 17:51 
---
Subject: Bug 17064

Author: pinskia
Date: Thu Jan 26 17:51:25 2006
New Revision: 110263

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110263
Log:
2006-01-26  Richard Guenther  <[EMAIL PROTECTED]>
Andrew Pinski  <[EMAIL PROTECTED]>

PR tree-opt/21470
partial PR tree-opt/17064
* tree-ssa-structalias.c (intra_create_variable_infos):
Create heap variables for incoming parameters if
flag_argument_noalias > 1.
(find_what_p_points_to): Look through default defs of
parameter decls.


Modified:
trunk/gcc/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-16 Thread pinskia at gcc dot gnu dot org


--- Comment #9 from pinskia at gcc dot gnu dot org  2006-01-16 17:11 ---
Partial patch posted:
http://gcc.gnu.org/ml/gcc-patches/2006-01/msg00864.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-10 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2006-01-10 20:36 ---
I should note that the patch is not fully done as I still need to be able to
add it to the list of variables to remove before running the may_alias again
(like the HEAP variables).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064




[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2006-01-10 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2006-01-10 20:35 ---
I have a semi fix for this one but the variable is still being marked as a call
clobber but that is because of a FIXME in the source.  I am going to take it
anyways but not close it once I get my patch approved.
It does fix comment #3 though.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|dnovillo at gcc dot gnu dot |pinskia at gcc dot gnu dot
   |org |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064




[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2005-10-05 Thread pinskia at gcc dot gnu dot org


--- Comment #6 from pinskia at gcc dot gnu dot org  2005-10-05 13:21 ---
Talked to Daniel Berlin about the patch I had, it was in the wrong spot, I had
it in the post process and not when analyzing the code.  So assigning back to
Diego.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|pinskia at gcc dot gnu dot  |dnovillo at gcc dot gnu dot
   |org |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064



[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2005-08-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-06 
19:51 ---
Diego, sorry to steal this from you but I got a fix for this issue though there 
are still some issues with 
address considered call clobered which cannot be true.

-- 
   What|Removed |Added

 AssignedTo|dnovillo at gcc dot gnu dot |pinskia at gcc dot gnu dot
   |org |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064


[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2005-07-27 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-27 
17:06 ---
Another testcase for extra load at the tree level:
int g (int* g1, int* g2)
{
  int i;
  g2[0] = 2;
  g1[0] = 3;
  return g2[0];
}

Note the test in comment #1 has been fixed already.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064


[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2005-03-03 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-04 
03:41 ---
Here is a testcase which we semi optimize on the RTL level but not at the tree 
level:
sum cannot alias a or b at all because of the default option for gfortran.

subroutine dot_product (sum, a, b, n)
   real*8 a(n), b(n), sum
   sum = 0
   do i = 1, n
 sum = sum + a (i) * b(i)
   end do
end

The reason why I say semi is because there is an extra fmr (PPC):
The loop looks like:
L4:
lfd f13,0(r4)
addi r4,r4,8
lfd f0,0(r5)
addi r5,r5,8
fmadd f0,f13,f0,f12
fmr f12,f0
bdnz L4

If we had optimizate it at the tree level it would look like:
L4:
lfd f13,0(r4)
addi r4,r4,8
lfd f0,0(r5)
addi r5,r5,8
fmadd f12,f13,f0,f12
bdnz L4

Note how we don't have the extra fmr.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064


[Bug tree-optimization/17064] -falias-noargument-global doesn't eliminate dead stores/loads

2005-02-07 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-07 
19:00 ---
Another testcase this time for loads:
#include 
int i;

void bar(void)
{
  i = 42;
}

int foo(int * p)
{
  int i = *p;
  bar ();
  return *p + i;/* This load is dead with -fargument-noalias-global.  */
}

int main()
{
  int t = 2;
  int t1;
  t1 = foo(&t);
  if (t1 != 4)
abort();
  return 0;
}

-- 
   What|Removed |Added

Summary|-falias-noargument-global   |-falias-noargument-global
   |doesn't eliminate dead  |doesn't eliminate dead
   |stores  |stores/loads


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064