[Bug c/26751] [4.2 Regression] Some OpenMP semantics are caught too late (in the gimplifier)

2006-04-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2006-04-28 19:02 
---
(In reply to comment #0)

> The gimplifier should not be emitting errors.
> 
Why, exactly?  Some diagnostics are impossible to emit early enough.  Is this a
documented requirement?  What's the rationale?


-- 


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



[Bug c/26751] [4.2 Regression] Some OpenMP semantics are caught too late (in the gimplifier)

2006-04-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2006-04-28 19:17 
---
(In reply to comment #2)

> Read the comments in PR 24222 but basicially the gimplifier is not should not
> being doing any semantic anlyasis, that is the job of the front-end.
> 
Well, some of the structural analysis for which emit errors is done even later
than that, so it would be naive to pretend that we can catch everything during
parsing.

If you find a non-intrusive way of bubbling this diagnostic up to the parser,
be my guest.  Otherwise, we should close as WONTFIX.


-- 


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



[Bug c++/26943] [gomp] firstprivate not working properly with non-POD

2006-04-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2006-04-29 04:55 
---
(In reply to comment #2)

> In addition to this, I'm not sure what exactly the standard requires say when
> firstprivate is used on a global var.  The global var can be visible to the
> threads and they can modify it, do we need to make any guarantees about what
> exact value gets assigned to the privatized n variable in various threads?
>
No, we do not need to handle this case.  In A.26.2, pg 169:

-
The private clause of a parallel construct is only in effect inside the
construct,
and not for the rest of the region. Therefore, in the example that follows, any
uses of the
variable a within the loop in the routine f refers to a private copy of a,
while a usage in
routine g refers to the global a.
  C/C++
Example A.26.2c
int a;
void g(int k) {
  a = k; /* The global "a", not the private "a" in f */
}
void f(int n) {
  int a = 0;
  #pragma omp parallel for private(a)
for (int i=1; ihttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=26943



[Bug c++/26943] [gomp] firstprivate not working properly with non-POD

2006-05-01 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-05-01 12:39:33
   date||


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



[Bug c++/26943] [gomp] firstprivate not working properly with non-POD

2006-05-01 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2006-05-01 15:15 
---
(In reply to comment #2)

> without this we don't remap privatized global vars except directly in the
> omp context that privatized them.
>
But this is as it should be.  We are only required to privatize variables in
the direct context that privatized them.  We currently aren't, but if 'n' was
accessed inside a separate function, the global 'n' should be accessed.

> With the above patch, we still create wrong code, with 2 different bugs:
> 1) there is no barrier to separate firstprivate assignments from lastprivate
>
Barrier?  We don't need a barrier.  We just need to make sure that only the
thread handling the very last iteration of the loop or the thread executing the
last omp section is the only one executing the copy-out operation.

> 2) on the sender side, we store the global var n into
> .omp_data_o.4D.1945.nD.1938, but on the receiver side we access either the
> remapped private n (assuming the above patch is in) or, when accessing the
> outside n we use the global variable n rather than .omp_data_iD.1937.nD.1938
> 
We should not need to access via .omp_data_o/.omp_data_i.  So, if n.1591 is the
privatized version of n.1567, we should emit something like:

#pragma omp parallel firstprivate(n.1567) lastprivate(n.1567)
  n.1591 = n.1567
  #pragma omp for
  for (i.1587 = 0; i.1587 <= 15; i.1587 = i.1587 + 1)
< ... use and set n.1591 ...>
  OMP_CONTIUNE
  if (i.1587 == 16)
n.1567 = n.1591
  OMP_RETURN [nowait]


-- 


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



[Bug tree-optimization/26242] [4.1/4.2 Regression] VRP is not documented in passes.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2006-05-29 14:57 
---

Fixed.  Also documented other missing passes.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/26242] [4.1/4.2 Regression] VRP is not documented in passes.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2006-05-29 14:58 
---
Subject: Bug 26242

Author: dnovillo
Date: Mon May 29 14:57:39 2006
New Revision: 114200

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114200
Log:

PR 26242
* doc/passes.texi: Add documentation for pass_vrp, pass_ipa_pta,
pass_fre, pass_store_ccp, pass_copy_prop,
pass_store_copy_prop, pass_merge_phi, pass_nrv,
pass_return_slot, pass_object_size, pass_lim,
pass_linear_transform, pass_empty_loop, pass_complete_unroll,
pass_loop_prefetch and pass_stdarg.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/passes.texi


-- 


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



[Bug tree-optimization/26242] [4.1/4.2 Regression] VRP is not documented in passes.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #7 from dnovillo at gcc dot gnu dot org  2006-05-29 15:28 
---
Subject: Bug 26242

Author: dnovillo
Date: Mon May 29 15:28:33 2006
New Revision: 114202

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114202
Log:

PR 26242
* passes.texi: Add documentation for pass_vrp,
pass_fre, pass_store_ccp, pass_copy_prop,
pass_store_copy_prop, pass_merge_phi, pass_nrv,
pass_return_slot, pass_object_sizes, pass_lim,
pass_linear_transform, pass_empty_loop, pass_complete_unroll,
and pass_stdarg.


Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/doc/passes.texi


-- 


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



[Bug middle-end/26237] [4.2 Regression] None of the OMP_* trees are documented in c-tree.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug middle-end/26237] [4.2 Regression] None of the OMP_* trees are documented in c-tree.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2006-05-29 15:52 
---
Subject: Bug 26237

Author: dnovillo
Date: Mon May 29 15:52:51 2006
New Revision: 114204

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114204
Log:

PR 26237
* c-tree.texi: Document OpenMP directives and clauses.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/c-tree.texi


-- 


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



[Bug middle-end/26237] [4.2 Regression] None of the OMP_* trees are documented in c-tree.texi

2006-05-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2006-05-29 15:56 
---

Fixed.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c/26154] [4.2 Regression] OpenMP extensions to the C language is not documented

2006-06-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2006-06-04 18:03 
---
(In reply to comment #3)

> Diego, would you be able to put a pointer in the manual?
> 
There are two references to the OpenMP API already.  One in the documentation
of -fopenmp, the other with the documentation of the OpenMP gimple codes.  I
don't think we need to duplicate API documentation when so much external
documentation is available.


-- 


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



[Bug libgomp/26165] Cannot find libgomp.spec after 'make install' on x86_64 and ppc64

2006-06-12 Thread dnovillo at gcc dot gnu dot org


--- Comment #7 from dnovillo at gcc dot gnu dot org  2006-06-12 21:10 
---

This is still an issue.  http://gcc.gnu.org/ml/fortran/2006-06/msg00178.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|WORKSFORME  |


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



[Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering

2006-07-17 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-07-17 13:30:56
   date||


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



[Bug c++/38178] [LTO] devirtualization is missing in lto

2008-11-20 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2008-11-20 18:47 
---
Subject: Bug 38178

Author: dnovillo
Date: Thu Nov 20 18:45:58 2008
New Revision: 142055

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142055
Log:
2008-11-20  Rafael Espindola  <[EMAIL PROTECTED]>
Diego Novillo  <[EMAIL PROTECTED]>

PR 38178
* tree.c (reset_type_lang_specific): Set TYPE_BINFO to
NULL.

cp/ChangeLog.lto

PR 38178
* cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Undefine.

testsuite/ChangeLog.lto:

PR 38178
* g++.dg/lto/20081119_0.C: New.
* g++.dg/lto/20081119_1.C: New.
* g++.dg/opt/devirt1.C: Do not scan for the devirtualized
call.



Added:
branches/lto/gcc/testsuite/g++.dg/lto/20081119_0.C
branches/lto/gcc/testsuite/g++.dg/lto/20081119_1.C
Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/cp/ChangeLog.lto
branches/lto/gcc/cp/cp-lang.c
branches/lto/gcc/testsuite/ChangeLog.lto
branches/lto/gcc/testsuite/g++.dg/opt/devirt1.C
branches/lto/gcc/tree.c


-- 


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



[Bug c++/37352] thunks for virtual function should work on lto

2008-12-31 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2008-12-31 19:32 
---

Initial fix at http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00953.html
Keeping open as thunks with varargs are still broken.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|maddox at google dot com|
 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-12-31 19:26:06 |2008-12-31 19:32:54
   date||


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



[Bug middle-end/37843] [4.4 Regression] unaligned stack in main due to tail call optimization

2009-01-15 Thread dnovillo at gcc dot gnu dot org


--- Comment #25 from dnovillo at gcc dot gnu dot org  2009-01-15 15:23 
---
(In reply to comment #24)
> Created an attachment (id=17107)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17107&action=view) [edit]
> Here is the updated patch.

OK.


Diego.


-- 


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



[Bug bootstrap/38992] [LTO] Bootstrap failed on RHEL5/ia32 and RHEL5/ia64

2009-01-27 Thread dnovillo at gcc dot gnu dot org


--- Comment #2 from dnovillo at gcc dot gnu dot org  2009-01-27 22:10 
---
The libelf included in Red Hat based distros is different than the one we used
to develop LTO.  There was a thread on IRC recently where Jakub proposed a way
of working around this:

(16:27:18) jakub: dnovillo: very user visible difference is e.g. for
LFS on 32-bit arches
(16:28:25) dnovillo: jakub: we have exactly one problem with fedora's
libelf.  It doesn't support one of the functions that exists in the
other libelf that we use.  Ian suggested a way of implementing it
using fedora's facilities, but I've never bothered yet.
(16:29:24) jakub: dnovillo: which one it is?  If it is a sane API, no
problem suggesting Uli or Roland to add it
(16:30:03) dnovillo: jakub: elfx_update_shstrndx
(16:30:28) dnovillo: ian says that it can be implemented using
gelf_update_ehdr.
(16:30:48) dnovillo: i never got around to trying it, so i don't know
more details.
(16:31:45) dnovillo: i'll send mail to roland/uli, thanks.
(16:34:57) jakub: dnovillo: only elf{,32,64}_ and gelf_ prefixes are
standard SGI libelf
(16:35:09) jakub: dnovillo: elfx_ must be some weirdo extension
(16:43:03) jakub: dnovillo: I fail to see what is that
elfx_update_shstrndx good for?  Just gelf_getehdr, modify the field,
gelf_update_ehdr
(16:43:03) jakub: dnovillo: if for every field we had such a wrapper,
what would we gain?
(16:45:18) dnovillo: jakub: as i said, i don't know.  i don't know
libelf and i didn't write this code.


-- 


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



[Bug bootstrap/38994] [LTO] lto1 isn't built when configured with --enable-languages=c,c++,fortran

2009-01-27 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2009-01-27 23:00 
---

No, of course not.  This is by design.  The lto1 binary is the front end for
GIMPLE, as with any other front end, it has to be specifically requested when
configuring the compiler.  You have to add 'lto' to the list of languages (more
details at http://gcc.gnu.org/wiki/LinkTimeOptimization).

We should probably change the name from 'lto' to 'gimple', as that is the name
of the language that lto1 reads, but that's just a minor detail.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug bootstrap/39001] lto branch doesn't build

2009-01-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2009-01-28 13:41 
---

Additional information on the failure and a suggestion on a possible fix:

http://gcc.gnu.org/ml/gcc/2009-01/msg00074.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-01-28 13:41:30
   date||


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



[Bug middle-end/39004] Revision 143730 breaks LTO

2009-01-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2009-01-28 15:05 
---
Subject: Bug 39004

Author: dnovillo
Date: Wed Jan 28 15:05:16 2009
New Revision: 143731

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143731
Log:

PR middle-end/39004
* lto-function-in.c (input_local_var_decl): Remove unused
locals CONTEXT_TAG and CONTEXT.


Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/lto-function-in.c


-- 


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



[Bug middle-end/39004] Revision 143730 breaks LTO

2009-01-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #2 from dnovillo at gcc dot gnu dot org  2009-01-28 15:17 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2009-01/msg01367.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug bootstrap/39011] lto bootstrap failure on ppc-linux

2009-01-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2009-01-28 21:08 
---

This is the same issue reported in 39001, except that it happens on a different
file.

*** This bug has been marked as a duplicate of 39001 ***


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug bootstrap/39001] lto branch doesn't build

2009-01-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2009-01-28 21:08 
---
*** Bug 39011 has been marked as a duplicate of this bug. ***


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||andreast at gcc dot gnu dot
   ||org


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



[Bug lto/39010] [LTO] Memory corruption on gcc.c-torture/compile/limits-fndefn.c

2009-01-31 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2009-01-31 18:49 
---
Subject: Bug 39010

Author: dnovillo
Date: Sat Jan 31 18:49:10 2009
New Revision: 143828

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143828
Log:

Revert

2009-01-30  H.J. Lu  

PR lto/39010
* lto-function-out.c (output_string): Properly handle the
trailing '\0'.
(output_tree_flags): Updated.


Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/lto-function-out.c


-- 


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



[Bug lto/39010] [LTO] Memory corruption on gcc.c-torture/compile/limits-fndefn.c

2009-01-31 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2009-01-31 18:51 
---

The patch 

2009-01-30  H.J. Lu  

PR lto/39010
* lto-function-out.c (output_string): Properly handle the
trailing '\0'.
(output_tree_flags): Updated.

caused 478 new regressions in the testsuite.  Reverted.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|FIXED   |


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



[Bug lto/40739] [LTO] ICE in bp_pack_value, at lto-streamer.c:336

2009-07-14 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2009-07-14 21:41 
---

This is likely fixed by
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00819.html,
could you try again?


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-07-14 07:06:28 |2009-07-14 21:41:56
   date||


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



[Bug tree-optimization/24670] [4.1 Regression] VRP ICE in compare_name_with_value

2005-11-04 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dnovillo at redhat dot com  |
 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


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



[Bug tree-optimization/24670] [4.1 Regression] VRP ICE in compare_name_with_value

2005-11-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #2 from dnovillo at gcc dot gnu dot org  2005-11-04 14:19 
---

testing fix.


-- 


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



[Bug tree-optimization/24627] [4.1 Regression] xntp miscompiled

2005-11-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #17 from dnovillo at gcc dot gnu dot org  2005-11-04 19:56 
---
Subject: Bug 24627

Author: dnovillo
Date: Fri Nov  4 19:56:28 2005
New Revision: 106502

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106502
Log:

PR 24627
* tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Use
TODO_update_ssa instead of TODO_update_ssa_no_phi.

testsuite/

PR 24627
* gcc.dg/tree-ssa/pr24627.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr24627.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-dce.c


-- 


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



[Bug tree-optimization/24627] [4.1 Regression] xntp miscompiled

2005-11-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #18 from dnovillo at gcc dot gnu dot org  2005-11-04 19:57 
---
Fixed. http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00239.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/24670] [4.1 Regression] VRP ICE in compare_name_with_value

2005-11-06 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2005-11-06 14:51 
---
Subject: Bug 24670

Author: dnovillo
Date: Sun Nov  6 14:51:16 2005
New Revision: 106562

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106562
Log:

PR 24670
* tree-vrp.c (fix_equivalence_set): New.
(extract_range_from_assert): Call it.


testsuite/

PR 24670
* gcc.dg/tree-ssa/pr24670.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr24670.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c


-- 


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



[Bug tree-optimization/24670] [4.1 Regression] VRP ICE in compare_name_with_value

2005-11-06 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2005-11-06 14:56 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00405.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug driver/24684] No flag documentation for gomp (openmp)

2005-11-07 Thread dnovillo at gcc dot gnu dot org


--- Comment #2 from dnovillo at gcc dot gnu dot org  2005-11-07 19:06 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00458.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug c++/23046] [4.1 Regression] ICE in set_value_range, at tree-vrp.c:191

2005-11-08 Thread dnovillo at gcc dot gnu dot org


--- Comment #21 from dnovillo at gcc dot gnu dot org  2005-11-08 21:09 
---
Subject: Bug 23046

Author: dnovillo
Date: Tue Nov  8 21:09:51 2005
New Revision: 106656

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106656
Log:
2005-11-08  James A. Morrison  <[EMAIL PROTECTED]>
Diego Novillo  <[EMAIL PROTECTED]>

PR 23046
* tree-vrp.c (register_edge_assert_for): Do not register
always-false predicates.

testsuite/

PR 23046
* g++.dg/tree-ssa/pr23046.C: New test.



Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/pr23046.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c


-- 


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



[Bug c++/23046] [4.1 Regression] ICE in set_value_range, at tree-vrp.c:191

2005-11-08 Thread dnovillo at gcc dot gnu dot org


--- Comment #22 from dnovillo at gcc dot gnu dot org  2005-11-08 21:16 
---
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00539.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/23201] [4.1 Regression] internal compiler error: verify_ssa failed

2005-11-11 Thread dnovillo at gcc dot gnu dot org


--- Comment #8 from dnovillo at gcc dot gnu dot org  2005-11-12 01:04 
---

Will take a look shortly.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug middle-end/24703] [GOMP] Unable to compile OpenMP program with omp parallel for schedule(dynamic) directive

2005-11-12 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2005-11-12 17:47 
---

Testing new patch.


-- 


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



[Bug middle-end/24703] [GOMP] Unable to compile OpenMP program with omp parallel for schedule(dynamic) directive

2005-11-13 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2005-11-14 01:25 
---
Subject: Bug 24703

Author: dnovillo
Date: Mon Nov 14 01:24:54 2005
New Revision: 106878

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106878
Log:

PR 24703
* omp-low.c (determine_parallel_type): Make extern.
Do not return IS_PARALLEL if OMP_FOR_PRE_BODY is set.
(enum omp_parallel_type): Move ...
* tree-gimple.h (enum omp_parallel): ... here.
(determine_parallel_type): Declare.
* gimplify.c (struct gimplify_ctx): Add fields combined_pre_p
and combined_ctxp.
(gimplify_expr_in_ctx): New.
(gimplify_omp_for): Call it if gimplify_ctxp->combined_pre_p
is set.
(gimplify_omp_parallel): Set gimplify_ctxp->combined_pre_p
and gimplify_ctxp->combined_ctxp if this is a combined
parallel+workshare directive.


Modified:
branches/gomp-20050608-branch/gcc/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/gimplify.c
branches/gomp-20050608-branch/gcc/omp-low.c
branches/gomp-20050608-branch/gcc/tree-gimple.h


-- 


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



[Bug tree-optimization/24840] [4.1 Regression] ICE process_assert_insertions_for, at tree-vrp.c:2807

2005-11-14 Thread dnovillo at gcc dot gnu dot org


--- Comment #9 from dnovillo at gcc dot gnu dot org  2005-11-14 19:50 
---

Working on it.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dnovillo at gcc dot gnu dot |
   |org |
 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


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



[Bug tree-optimization/24840] [4.1 Regression] ICE process_assert_insertions_for, at tree-vrp.c:2807

2005-11-14 Thread dnovillo at gcc dot gnu dot org


--- Comment #10 from dnovillo at gcc dot gnu dot org  2005-11-15 02:59 
---
Subject: Bug 24840

Author: dnovillo
Date: Tue Nov 15 02:59:03 2005
New Revision: 106930

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106930
Log:

PR 24840
* tree-vrp.c (infer_value_range): Return false if STMT is a
block terminator and its basic block has no successors.

testsuite/

PR 24840
* gcc.dg/tree-ssa/pr24840.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr24840.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c


-- 


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



[Bug tree-optimization/24840] [4.1 Regression] ICE process_assert_insertions_for, at tree-vrp.c:2807

2005-11-14 Thread dnovillo at gcc dot gnu dot org


--- Comment #11 from dnovillo at gcc dot gnu dot org  2005-11-15 03:01 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01042.html.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/23201] [4.1 Regression] internal compiler error: verify_ssa failed

2005-11-15 Thread dnovillo at gcc dot gnu dot org


--- Comment #9 from dnovillo at gcc dot gnu dot org  2005-11-15 21:50 
---
(In reply to comment #8)
> Will take a look shortly.
> 
I stand by my analysis in #5.  The Fortran FE is lying to the middle end. 
There is no field 'ktbuf' in this structure.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

     CC|dnovillo at gcc dot gnu dot |
   |org |
 AssignedTo|dnovillo 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=23201



[Bug middle-end/24703] [GOMP] Unable to compile OpenMP program with omp parallel for schedule(dynamic) directive

2005-11-16 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2005-11-16 15:56 
---

Fixed.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c++/24849] [gomp] ICE in expand_expr_real_1

2005-11-16 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2005-11-16 15:57 
---

Working on this.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug c++/24849] [gomp] ICE in expand_expr_real_1

2005-11-19 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2005-11-19 15:18 
---
Subject: Bug 24849

Author: dnovillo
Date: Sat Nov 19 15:18:08 2005
New Revision: 107220

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107220
Log:

PR 24849
* omp-low.c (determine_parallel_type): Do not handle OMP_FOR.

testsuite/

PR 24849
* g++.dg/gomp/pr24849.C: New test.
* gcc.dg/gomp/for-19.c: XFAIL.
* gcc.dg/gomp/for-18.c: XFAIL.


Added:
branches/gomp-20050608-branch/gcc/testsuite/g++.dg/gomp/pr24849.C
Modified:
branches/gomp-20050608-branch/gcc/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/omp-low.c
branches/gomp-20050608-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/testsuite/gcc.dg/gomp/for-18.c
branches/gomp-20050608-branch/gcc/testsuite/gcc.dg/gomp/for-19.c


-- 


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



[Bug c++/24849] [gomp] ICE in expand_expr_real_1

2005-11-19 Thread dnovillo at gcc dot gnu dot org


--- Comment #7 from dnovillo at gcc dot gnu dot org  2005-11-19 15:18 
---

Workaround applied.

The actual solution separates lowering from optimization, once all the OMP
directives are lowered to a language-independent form, we can apply the
combined parallel+loop optimization without running into these odd corners.

I need a few more days to finish implementing this separation.  In the
meantime, we can live without this optimization.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/23948] [4.1/4.2 Regression] internal compiler error: verify_stmts failed

2006-01-05 Thread dnovillo at gcc dot gnu dot org


--- Comment #21 from dnovillo at gcc dot gnu dot org  2006-01-05 14:40 
---
(In reply to comment #20)
> This is a showstopper.
> 
I'm reviewing bonzini's patch today.


-- 


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




[Bug fortran/25219] [GOMP] ICE with SAVE attribute and (FIRST|LAST)PRIVATE

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


--- Comment #5 from dnovillo at gcc dot gnu dot org  2006-01-16 18:23 
---

Fixed with http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01192.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering

2006-07-18 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2006-07-18 13:25 
---

Testing patch.  The bug was in the alias pruning code.  We need to handle
.GLOBAL_VAR in access_can_touch_variable.  A memory reference that uses a
call-clobbered memory tag should always be considered to touch .GLOBAL_VAR.


-- 


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



[Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering

2006-07-18 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2006-07-18 17:28 
---
Subject: Bug 28410

Author: dnovillo
Date: Tue Jul 18 17:27:57 2006
New Revision: 115564

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115564
Log:

PR 28410
* tree-ssa-operands.c (access_can_touch_variable): Update
comment.
Return true if ALIAS is .GLOBAL_VAR.

testsuite/ChangeLog

PR 28410
* gcc.dg/tree-ssa/pr28410.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr28410.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-operands.c


-- 


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



[Bug tree-optimization/28410] [4.2 Regression] Wrong aliasing with global var grouping during call clobbering

2006-07-18 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2006-07-18 17:29 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00786.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/29272] [4.2 Regression] memcpy optimization causes wrong-code

2006-09-28 Thread dnovillo at gcc dot gnu dot org


--- Comment #3 from dnovillo at gcc dot gnu dot org  2006-09-28 18:32 
---

Excerpts from IRC session with jakub discussing this:

13:28   1grow ();
13:28   2node = pool;
13:28   3D.1928 = node->next;
13:28   4pool = D.1928;
13:28   5foo = (struct Foo *) node;
13:28   6foo->a = 0;
13:28   7foo->b = -1;
13:28   8node = (struct Node *) foo;   <- redundant. node ==
foo already.
13:28   9node->next = D.1928;  <- redundant.
node->next == D.1928 already
13:28  10pool = node;  <- redundant. node ==
pool already.
13:28  11return foo->a;
13:33  line 9 is not redundant, because node->next occupies the same
memory as foo->a and foo->b
13:34  I think we have 2 options with this optimization
13:35  1) for each memcpy etc. operand, look through all handled
components and if it is an actual VAR_DECL, we can surely optimize it, with the
native alias set
13:36  but if it is a pointer, we can't be sure
13:37  now, either we figure out some way how to express that operation
in an alias friendly way if it is a pointer, or we just bail and don't optimize
13:37  but, my point was that i don't see where the RTL optimizers
may be screwing up.  what's the exact operation that they remove that they
shouldn't have?
13:37  it all looks removable to me.
13:39  RTL optimizers remove the node->next = D.1928 line
13:40  which means 1) pool->next is in the end 0 rather than old
pool->next
13:40  and 2) 0 is returned rather than (int) pool->next
13:40  but D.1928 and node->next have the same value according to the
tree dump.  or am i misreading something?
14:03  foo == node, so foo->a and node->next occupy the same memory
14:03  oh, crap.
14:03  and eventhough those 2 have aliasing incompatible types, the use
of memcpy makes it ok
14:03  i had missed that.
14:04  guess I'll now write just a quick patch to only do it for
VAR_DECLs and components thereof
14:05  so that the bug is fixed and we can then keep discussing how even
pointers can be safely optimized
14:05  so, going back to not apply this on pointers then?
14:05  yeah, for now that would be the safe approach.
14:10/* If var is a VAR_DECL or a component thereof,
14:10   we can use its alias set, otherwise we'd need to make
14:10   sure we go through alias set 0.  */
14:10inner = srcvar;
14:10while (handled_component_p (inner))
14:10  inner = TREE_OPERAND (inner, 0);
14:10if (TREE_CODE (inner) != VAR_DECL)
14:10  return 0;
14:11  or should I use SSA_VAR_P (inner) instead?
14:12  I guess at least PARM_DECL or RESULT_DECL would be ok, not sure
about SSA names
14:22  the reason we don't screw up in the trees is the presence of
points-to information, most likely.  i got tricked because i wasn't following
who was pointing to who.
14:22  the store foo->a changes node->next.
14:23  bah.
14:23  RTL misses that because the stores have different alias sets.
14:23  the transformation we do on trees is invalid for RTL because
we don't keep points-to info in RTL, only type info.
14:23  the Real Fix would tag the stores so that gimple->RTL changes
the alias sets.
14:24  something along the lines of what you suggest may work.
14:26  yeah, now to find a way to force the alias set...


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.2.0   |---


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



[Bug tree-optimization/25737] ACATS c974001 c974013 hang with struct aliasing

2006-10-03 Thread dnovillo at gcc dot gnu dot org


--- Comment #39 from dnovillo at gcc dot gnu dot org  2006-10-03 12:54 
---
(In reply to comment #38)

> The name, and all the documentation, which say they cannot be
> addressed, which means they cannot be pointed to by any pointer, which
> means they are unaliased.
> 
Absolutely.  If the Ada FE somehow wants these two predicates to generate
*more* VDEF/VUSE chains, then there is something fundamentally wrong with it. 
The meaning of these two predicates is the exact opposite, they will lead to
*fewer* VDEF/VUSE chains.


> > I'm not saying that this is a sane design or that we should try to replicate
> > it in GCC 4, I'm just saying that for the time being struct aliasing totally
> > overlooks this mechanism and doesn't work for Ada because of that.
> Okay, and i'm saying i don't plan on accepting fixes that appear to
> hack around well accepted infrastructure to try to fix symptoms.
> Really. That's all.  I'm not going to approve patches that randomly
> skip fields because it seems to get the right result sometimes.  If
> you want to try to explain what all this is actually trying to do, i'm
> happy to work with you to come up with a sane solution.
> 
Agreed.  The Ada FE should either change or prove that there is a
design/implementation flaw in the aliasing machinery.


-- 


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



[Bug tree-optimization/30375] [4.3 Regression] tree-ssa-dse incorrectly removes struct initialization

2007-02-03 Thread dnovillo at gcc dot gnu dot org


--- Comment #8 from dnovillo at gcc dot gnu dot org  2007-02-03 15:49 
---
(In reply to comment #7)
> Is this now being looked into by Diego or Aldy?
> 
It wasn't.  It is now.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-02-03 15:28:16 |2007-02-03 15:49:29
   date||


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



[Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)

2007-02-05 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2007-02-05 19:48 
---

Testing alternate patch.


-- 


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



[Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)

2007-02-07 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2007-02-07 23:33 
---

I cannot reproduce this bug with mainline as of 2007-02-06.  The bug is still
latent though, so I will commit a variant of this patch to fix it. 
Essentially, we should leave every TREE_ADDRESSABLE variable alone so that it
can be removed by a subsequent may_alias pass:

Index: tree-ssa-live.c
===
--- tree-ssa-live.c (revision 121699)
+++ tree-ssa-live.c (working copy)
@@ -502,18 +502,20 @@
   cell = &TREE_CHAIN (*cell);
 }

-  /* Remove unused variables from REFERENCED_VARs.  As an special exception
- keep the variables that are believed to be aliased.  Those can't be
- easily removed from the alias sets and and operand caches.
- They will be removed shortly after next may_alias pass is performed.  */
+  /* Remove unused variables from REFERENCED_VARs.  As a special
+ exception keep the variables that are believed to be aliased.
+ Those can't be easily removed from the alias sets and operand
+ caches.  They will be removed shortly after the next may_alias
+ pass is performed.  */
   FOR_EACH_REFERENCED_VAR (t, rvi)
 if (!is_global_var (t)
&& !MTAG_P (t)
&& TREE_CODE (t) != PARM_DECL
&& TREE_CODE (t) != RESULT_DECL
&& !(ann = var_ann (t))->used
-   && !ann->is_aliased && !is_call_clobbered (t) && !ann->symbol_mem_tag)
-remove_referenced_var (t);
+   && !ann->symbol_mem_tag
+       && !TREE_ADDRESSABLE (t))
+  remove_referenced_var (t);
 }


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||WORKSFORME


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



[Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)

2007-02-08 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2007-02-08 16:56 
---
Subject: Bug 30562

Author: dnovillo
Date: Thu Feb  8 16:55:43 2007
New Revision: 121715

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121715
Log:

PR 30562
* tree-flow.h (struct var_ann_d): Remove field 'is_used'.
Update all users.
* tree-ssa-alias.c (compute_is_aliased): Remove.  Update all
users.
(init_alias_info):
* tree-ssa-live.c (remove_unused_locals): Do not remove
TREE_ADDRESSABLE variables.
* tree-ssa-structalias.c (compute_points_to_sets): Tidy.
* tree-ssa-operands.c (add_virtual_operand): Remove argument
FOR_CLOBBER.  Update all users.
If VAR has an associated alias set, add a virtual operand for
it if no alias is found to conflict with the memory reference.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-dfa.c
trunk/gcc/tree-flow.h
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-live.c
trunk/gcc/tree-ssa-operands.c
trunk/gcc/tree-ssa-structalias.c
trunk/gcc/tree-ssa.c


-- 


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



[Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)

2007-02-08 Thread dnovillo at gcc dot gnu dot org


--- Comment #7 from dnovillo at gcc dot gnu dot org  2007-02-08 17:10 
---

Fix http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00727.html


-- 


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



[Bug tree-optimization/30735] 50% slow down due to mem-ssa merge

2007-02-08 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-02-08 18:42:31
   date||


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



[Bug tree-optimization/30735] 50% slow down due to mem-ssa merge

2007-02-12 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2007-02-13 00:59 
---

I have now reproduced this locally and I'm working on a fix.


-- 


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



[Bug tree-optimization/30791] New: Need to run may-alias early in IPA

2007-02-13 Thread dnovillo at gcc dot gnu dot org
Without aliasing information some passes and cleanups cannot be scheduled
early.  See http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01176.html


-- 
   Summary: Need to run may-alias early in IPA
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: dnovillo at gcc dot gnu dot org
ReportedBy: dnovillo at gcc dot gnu dot org


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



[Bug middle-end/30768] [4.3 regression]: ICE in ext/pb_ds/regression/list_update_data_map_rand.cc

2007-02-14 Thread dnovillo at gcc dot gnu dot org


--- Comment #11 from dnovillo at gcc dot gnu dot org  2007-02-14 23:54 
---
(In reply to comment #10)

> Diego, is this something that you might be able to help with?
> 
Sure.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dnovillo at redhat dot com  |
 AssignedTo|mark at codesourcery dot com|dnovillo at gcc dot gnu dot
   |        |org


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



[Bug middle-end/30768] [4.3 regression]: ICE in ext/pb_ds/regression/list_update_data_map_rand.cc

2007-02-16 Thread dnovillo at gcc dot gnu dot org


--- Comment #23 from dnovillo at gcc dot gnu dot org  2007-02-16 12:35 
---
(In reply to comment #22)
> Frankly, I think it would make sense to remove completely this XFAIL-ing mess
> and just wait for Diego to fix the compiler issue.
> 
Agreed. I don't understand why the rush to XFAIL a test that's obviously
exposing a bug. At most, I would like to understand which patch started
triggering the failure. It can't have been too long ago, the 2-3 day old
mainline tree I have in my box does not have this failure.


-- 


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



[Bug tree-optimization/31036] [4.3 Regression] ACATS: verify_ssa failed for c41307d c85006d cd10002 cxaa018

2007-03-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2007-03-04 18:37 
---

I've just reproduced these failures locally.  Two options:

1- The Ada FE is somehow tricking alias analysis into thinking that some
call-clobbered symbols are not call-clobbered.

2- Alias analysis is not properly marking some call-clobbered symbols.

Tell me how I generate the .adb file from its .ada source?  What I see in
acats.log does not work.
gnatmake --GCC="/home/dnovillo/gcc/native.clean/bld/gcc/xgcc
-B/home/dnovillo/gcc/native.clean/bld/gcc/" -gnatws -O2
-I/home/dnovillo/gcc/native.clean/bld/gcc/testsuite/ada/acats/support
c41307d.adb -largs --GCC="/home/dnovillo/gcc/native.clean/bld/gcc/xgcc
-B/home/dnovillo/gcc/native.clean/bld/gcc/"
/home/dnovillo/gcc/native.clean/bld/gcc/xgcc -c
-B/home/dnovillo/gcc/native.clean/bld/gcc/ -gnatws -O2
-I/home/dnovillo/gcc/native.clean/bld/gcc/testsuite/ada/acats/support
c41307d.adb


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-03-04 18:37:21
   date||


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



[Bug tree-optimization/31036] [4.3 Regression] ACATS: verify_ssa failed for c41307d c85006d cd10002 cxaa018

2007-03-04 Thread dnovillo at gcc dot gnu dot org


--- Comment #8 from dnovillo at gcc dot gnu dot org  2007-03-04 19:04 
---
(In reply to comment #7)
> If you have a run directory:
> cd gcc/testsuite/ada/acats/tests/c4/c41307d
> gdb  .../gcc/x86_64-unknown-linux-gnu/4.3.0/gnat1
> r -I../../../support -quiet -dumpbase c41307d.adb -O1 -mtune=generic
> c41307d.adb
> 
> If not cd somewhere then
> gnatchop .../version-head/gcc/testsuite/ada/acats/tests/c4/c41307d.ada 
> gnatchop ../version-head/gcc/testsuite/ada/acats/support/rep*
> gcc -c -O1 c41307d.adb
> 


Thanks.  It's one of these three symbols:

c41307d: This symbols is not marked call-clobbered: C.83
c41307d: This symbols is not marked call-clobbered: C.84
c41307d: This symbols is not marked call-clobbered: C.87

These symbols are in the alias set of a call-clobbered memory tag.  When the
operand scanner is adding VDEFs for this call-clobbered tag, it goes through
the set of aliases adding VDEF operands for them.  However, since these symbols
are not marked as call-clobbered, the operand scanner is ignoring them.

For now, I'm suspecting a bug in alias analysis because according to the alias
dumps, the variables are all considered global and addressable.  We are not
discovering that their address escape.


-- 


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



[Bug tree-optimization/31037] [4.3 Regression] ICE: verify_ssa failed - definition in block 23 does not dominate use in block 32

2007-03-06 Thread dnovillo at gcc dot gnu dot org


--- Comment #7 from dnovillo at gcc dot gnu dot org  2007-03-06 12:55 
---

Might as well take this one too.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-03-04 20:56:47 |2007-03-06 12:55:29
   date||


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



[Bug tree-optimization/31090] Revision 121302 causes 30% performance regression

2007-03-09 Thread dnovillo at gcc dot gnu dot org


--- Comment #11 from dnovillo at gcc dot gnu dot org  2007-03-09 23:53 
---

I'm already handling this family of performance problems.  I need a few more
days to finish the WIP patch I have.  In the meantime, see if increasing
--param max-aliased-vops works around the problem.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||30735


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



[Bug tree-optimization/29585] [4.2 Regression] tree check: expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:558

2007-03-13 Thread dnovillo at gcc dot gnu dot org


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dnovillo at redhat dot com  |
 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-10-25 05:09:36 |2007-03-13 16:16:05
   date||


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



[Bug tree-optimization/29585] [4.2 Regression] tree check: expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:558

2007-03-29 Thread dnovillo at gcc dot gnu dot org


--- Comment #13 from dnovillo at gcc dot gnu dot org  2007-03-29 19:55 
---

I can't reproduce this on mainline anymore.  It does fail on the 4.2 branch.


-- 


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



[Bug tree-optimization/29585] [4.2 Regression] tree check: expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:558

2007-03-31 Thread dnovillo at gcc dot gnu dot org


--- Comment #14 from dnovillo at gcc dot gnu dot org  2007-03-31 19:22 
---
Subject: Bug 29585

Author: dnovillo
Date: Sat Mar 31 19:21:46 2007
New Revision: 123386

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123386
Log:
2007-03-31  Diego Novillo  <[EMAIL PROTECTED]>
Mark Mitchell  <[EMAIL PROTECTED]>

PR 29585
* class.c (dfs_accumulate_vtbl_inits): Use build_address
to build the vtbl entry.

testsuite/ChangeLog

PR 29585
* g++.dg/tree-ssa/pr29585.C: New test.


Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/tree-ssa/pr29585.C
Modified:
branches/gcc-4_2-branch/gcc/cp/ChangeLog
branches/gcc-4_2-branch/gcc/cp/class.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/29585] [4.2 Regression] tree check: expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:558

2007-03-31 Thread dnovillo at gcc dot gnu dot org


--- Comment #15 from dnovillo at gcc dot gnu dot org  2007-03-31 19:28 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2007-03/msg02059.html


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug rtl-optimization/19780] Floating point computation far slower for -mfpmath=sse

2007-04-05 Thread dnovillo at gcc dot gnu dot org


--- Comment #14 from dnovillo at gcc dot gnu dot org  2007-04-05 12:49 
---
(In reply to comment #11)

> So, why does SSA pass have to interfere with computation dataflow? This
> interferece makes things worse and effectively takes away user's control on 
> the
> flow of data.
> 

Huh?  How is it relevant whether PHIs are in different order?  Conceptually,
the ordering of PHI nodes in a basic block is completely irrelevant.  Some pass
is getting confused when it shouldn't.  Transformations should not depend on
how PHI nodes are emitted in a block as all PHI nodes are always evaluated in
parallel.


-- 


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



[Bug tree-optimization/31090] Revision 121302 causes 30% performance regression

2007-04-11 Thread dnovillo at gcc dot gnu dot org


--- Comment #14 from dnovillo at gcc dot gnu dot org  2007-04-11 17:14 
---
Subject: Bug 31090

Author: dnovillo
Date: Wed Apr 11 17:14:06 2007
New Revision: 123719

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123719
Log:

PR 30735
PR 31090
* doc/invoke.texi: Document --params max-aliased-vops and
avg-aliased-vops.
* tree-ssa-operands.h (get_mpt_for, dump_memory_partitions,
debug_memory_partitions): Move to tree-flow.h
* params.h (AVG_ALIASED_VOPS): Define.
* tree-ssa-alias.c (struct mp_info_def): Remove.  Update all
users.
(mp_info_t): Likewise.
(get_mem_sym_stats_for): New.
(set_memory_partition): Move from tree-flow-inline.h.
(mark_non_addressable): Only clear the set of symbols for the
partition if it exists.
(dump_memory_partitions): Move from tree-ssa-operands.c
(debug_memory_partitions): Likewise.
(need_to_partition_p): New.
(dump_mem_ref_stats): New.
(debug_mem_ref_stats): New.
(dump_mem_sym_stats): New.
(debug_mem_sym_stats): New.
(update_mem_sym_stats_from_stmt): New.
(compare_mp_info_entries): New.
(mp_info_cmp): Call it.
(sort_mp_info): Change argument to a list of mem_sym_stats_t
objects.
(get_mpt_for): Move from tree-ssa-operands.c.
(find_partition_for): New.
(create_partition_for): Remove.
(estimate_vop_reduction): New.
(update_reference_counts): New.
(build_mp_info): New.
(compute_memory_partitions): Refactor.
Document new heuristic.
Call build_mp_info, update_reference_counts,
find_partition_for and estimate_vop_reduction.
(compute_may_aliases): Populate virtual operands before
calling debugging dumps.
(delete_mem_sym_stats): New.
(delete_mem_ref_stats): New.
(init_mem_ref_stats): New.
(init_alias_info): Call it.
(maybe_create_global_var): Remove alias_info argument.
Get number of call sites and number of pure/const call sites
from gimple_mem_ref_stats().
(dump_alias_info): Call dump_memory_partitions first.
(dump_points_to_info_for): Show how many times a pointer has
been dereferenced.
* opts.c (decode_options): For -O2 set --param
max-aliased-vops to 500.
For -O3 set --param max-aliased-vops to 1000 and --param
avg-aliased-vops to 3.
* fortran/options.c (gfc_init_options): Remove assignment to
MAX_ALIASED_VOPS.
* tree-flow-inline.h (gimple_mem_ref_stats): New.
* tree-dfa.c (dump_variable): Dump memory reference
statistics.
Dump NO_ALIAS* settings.
(referenced_var_lookup): Tidy.
(mem_sym_stats): New.
* tree-ssa-copy.c (may_propagate_copy): Return true if DEST
and ORIG are different SSA names for a memory partition.
* tree-ssa.c (delete_tree_ssa): Call delete_mem_ref_stats.
* tree-flow.h (struct mem_sym_stats_d): Define.
(mem_sym_stats_t): Define.
(struct mem_ref_stats_d): Define.
(struct gimple_df): Add field mem_ref_stats.
(enum noalias_state): Define.
(struct var_ann_d): Add bitfield noalias_state.
(mem_sym_stats, delete_mem_ref_stats, dump_mem_ref_stats,
debug_mem_ref_stats, debug_memory_partitions,
debug_mem_sym_stats): Declare.
* tree-ssa-structalias.c (update_alias_info): Update call
sites, pure/const call sites and asm sites in structure
returned by gimple_mem_ref_stats.
Remove local variable IS_POTENTIAL_DEREF.
Increase NUM_DEREFS if the memory expression is a potential
dereference.
Call update_mem_sym_stats_from_stmt.
If the memory references memory, call
update_mem_sym_stats_from_stmt for all the direct memory
symbol references found.
(intra_create_variable_infos): Set noalias_state field for
pointer arguments according to the value of
flag_argument_noalias.
* tree-ssa-structalias.h (struct alias_info): Remove fields
num_calls_found and num_pure_const_calls_found.
(update_mem_sym_stats_from_stmt): Declare.
* params.def (PARAM_MAX_ALIASED_VOPS): Change description.
Set default value to 100.
(PARAM_AVG_ALIASED_VOPS): Define.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/fortran/options.c
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/params.h
trunk/gcc/tree-dfa.c
trunk/gcc/tree-flow-inline.h
trunk/gcc/tree-flow.h
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-copy.c
trunk/gcc/tree-ssa-operands.c
trunk/gcc/tree-ssa-operands.h
trunk/gcc/tree-ssa-structalias.c
trunk/gcc/tree-ssa-structalias.h
trunk/gcc/tree-ssa.c
trunk/gcc/tree-vrp.c


-- 


http://gcc

[Bug tree-optimization/30735] [4.3 Regression] 50% slow down due to mem-ssa merge

2007-04-11 Thread dnovillo at gcc dot gnu dot org


--- Comment #6 from dnovillo at gcc dot gnu dot org  2007-04-11 17:14 
---
Subject: Bug 30735

Author: dnovillo
Date: Wed Apr 11 17:14:06 2007
New Revision: 123719

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123719
Log:

PR 30735
PR 31090
* doc/invoke.texi: Document --params max-aliased-vops and
avg-aliased-vops.
* tree-ssa-operands.h (get_mpt_for, dump_memory_partitions,
debug_memory_partitions): Move to tree-flow.h
* params.h (AVG_ALIASED_VOPS): Define.
* tree-ssa-alias.c (struct mp_info_def): Remove.  Update all
users.
(mp_info_t): Likewise.
(get_mem_sym_stats_for): New.
(set_memory_partition): Move from tree-flow-inline.h.
(mark_non_addressable): Only clear the set of symbols for the
partition if it exists.
(dump_memory_partitions): Move from tree-ssa-operands.c
(debug_memory_partitions): Likewise.
(need_to_partition_p): New.
(dump_mem_ref_stats): New.
(debug_mem_ref_stats): New.
(dump_mem_sym_stats): New.
(debug_mem_sym_stats): New.
(update_mem_sym_stats_from_stmt): New.
(compare_mp_info_entries): New.
(mp_info_cmp): Call it.
(sort_mp_info): Change argument to a list of mem_sym_stats_t
objects.
(get_mpt_for): Move from tree-ssa-operands.c.
(find_partition_for): New.
(create_partition_for): Remove.
(estimate_vop_reduction): New.
(update_reference_counts): New.
(build_mp_info): New.
(compute_memory_partitions): Refactor.
Document new heuristic.
Call build_mp_info, update_reference_counts,
find_partition_for and estimate_vop_reduction.
(compute_may_aliases): Populate virtual operands before
calling debugging dumps.
(delete_mem_sym_stats): New.
(delete_mem_ref_stats): New.
(init_mem_ref_stats): New.
(init_alias_info): Call it.
(maybe_create_global_var): Remove alias_info argument.
Get number of call sites and number of pure/const call sites
from gimple_mem_ref_stats().
(dump_alias_info): Call dump_memory_partitions first.
(dump_points_to_info_for): Show how many times a pointer has
been dereferenced.
* opts.c (decode_options): For -O2 set --param
max-aliased-vops to 500.
For -O3 set --param max-aliased-vops to 1000 and --param
avg-aliased-vops to 3.
* fortran/options.c (gfc_init_options): Remove assignment to
MAX_ALIASED_VOPS.
* tree-flow-inline.h (gimple_mem_ref_stats): New.
* tree-dfa.c (dump_variable): Dump memory reference
statistics.
Dump NO_ALIAS* settings.
(referenced_var_lookup): Tidy.
(mem_sym_stats): New.
* tree-ssa-copy.c (may_propagate_copy): Return true if DEST
and ORIG are different SSA names for a memory partition.
* tree-ssa.c (delete_tree_ssa): Call delete_mem_ref_stats.
* tree-flow.h (struct mem_sym_stats_d): Define.
(mem_sym_stats_t): Define.
(struct mem_ref_stats_d): Define.
(struct gimple_df): Add field mem_ref_stats.
(enum noalias_state): Define.
(struct var_ann_d): Add bitfield noalias_state.
(mem_sym_stats, delete_mem_ref_stats, dump_mem_ref_stats,
debug_mem_ref_stats, debug_memory_partitions,
debug_mem_sym_stats): Declare.
* tree-ssa-structalias.c (update_alias_info): Update call
sites, pure/const call sites and asm sites in structure
returned by gimple_mem_ref_stats.
Remove local variable IS_POTENTIAL_DEREF.
Increase NUM_DEREFS if the memory expression is a potential
dereference.
Call update_mem_sym_stats_from_stmt.
If the memory references memory, call
update_mem_sym_stats_from_stmt for all the direct memory
symbol references found.
(intra_create_variable_infos): Set noalias_state field for
pointer arguments according to the value of
flag_argument_noalias.
* tree-ssa-structalias.h (struct alias_info): Remove fields
num_calls_found and num_pure_const_calls_found.
(update_mem_sym_stats_from_stmt): Declare.
* params.def (PARAM_MAX_ALIASED_VOPS): Change description.
Set default value to 100.
(PARAM_AVG_ALIASED_VOPS): Define.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/fortran/options.c
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/params.h
trunk/gcc/tree-dfa.c
trunk/gcc/tree-flow-inline.h
trunk/gcc/tree-flow.h
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-copy.c
trunk/gcc/tree-ssa-operands.c
trunk/gcc/tree-ssa-operands.h
trunk/gcc/tree-ssa-structalias.c
trunk/gcc/tree-ssa-structalias.h
trunk/gcc/tree-ssa.c
trunk/gcc/tree-vrp.c


-- 


http://gcc

[Bug middle-end/31543] [4.3 Regression]: gcc.dg/dfp/convert-bfp-fold.c failed

2007-04-11 Thread dnovillo at gcc dot gnu dot org


--- Comment #1 from dnovillo at gcc dot gnu dot org  2007-04-12 00:28 
---

Hmm, I may have triggered this one with the fix for 30735.  I had inadvertently
tested with checking disabled.  Will take a look.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dnovillo at redhat dot com  |
 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-04-12 00:28:15
   date||


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



[Bug tree-optimization/31521] / conversion to >> is not done when the divisor can be zero

2007-08-03 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2007-08-03 13:12 
---

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00174.html.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/31521] / conversion to >> is not done when the divisor can be zero

2007-08-03 Thread dnovillo at gcc dot gnu dot org


--- Comment #4 from dnovillo at gcc dot gnu dot org  2007-08-03 13:08 
---
Subject: Bug 31521

Author: dnovillo
Date: Fri Aug  3 13:08:29 2007
New Revision: 127180

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127180
Log:
2007-08-03  Andrew Pinski  <[EMAIL PROTECTED]>
Diego Novillo  <[EMAIL PROTECTED]>

PR 31521
* tree-vrp.c (simplify_div_or_mod_using_ranges): Also simplify
if the range includes 0.

2007-08-03  Diego Novillo  <[EMAIL PROTECTED]>

PR 31521
* gcc.dg/tree-ssa/pr31521.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr31521.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c


-- 


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



[Bug middle-end/22456] [4.1/4.2/4.3 regression] missing "is used uninitialized" warning

2007-08-16 Thread dnovillo at gcc dot gnu dot org


--- Comment #15 from dnovillo at gcc dot gnu dot org  2007-08-16 15:22 
---

If not an exact duplicate, it's strongly related to 18501.  The code pattern is
slightly different so it may be worth keeping around.  Adding a dependency on
18501.


-- 

dnovillo at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||18501


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



[Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around

2007-08-17 Thread dnovillo at gcc dot gnu dot org
The following test case is miscompiled with GCC 4.2:

extern void abort (void);

volatile int N = 5;

void foo (void)
{
  int i;
  char *p, value[10];

  value[0] = 0x42;
  for (i = 0; i < N; i++)
if (i > 0)
  {
p = (char *)i - 1;
*(value + (int) p) = (char) i;
  }

  if (value[0] != 1)
abort ();
}

main()
{
  foo ();
  return 0;
}

$ gcc --version
gcc (GCC) 4.2.2 20070816 (prerelease)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc -O2 -o a a.c
$ ./a
Aborted (core dumped)

This was originally a C++ program which I converted into this C snippet from
GIMPLE.  I believe it's valid C, but I am not actually sure.  The original C++
code *is* valid, though.

The problem here starts in tree-vrp.c:adjust_range_with_scev() when we ask for
the scalar evolution of p_8 in the loop

:;
  i_24 = ASSERT_EXPR ;
  if (i_24 > 0) goto ; else goto ;
[ ... ]
:;
  i_4 = ASSERT_EXPR  0>;
  i.0_7 = (char *) i_4;
  p_8 = i.0_7 - 1B;

[...]

:;
  i_11 = i_24 + 1;
  # i_1 = PHI <0(2), i_11(5)>;
:;
  if (i_1 < N.1_6) goto ; else goto ;

The call to analyze_scalar_evolution(loop, p_8) returns the chrec {-1B, +, 1B}
which is more or less understandable because the initial value i.0_7 can be
traced all the way back to the start of the loop to 0.

However:

1- SCEV has not realized that there is an ASSERT_EXPR in the path.  The initial
value of i.0_7 is actually 1, not 0.

2- When VRP sees the chrec {-1B, +, 1B} it asks whether it may wrap.  Since we
assumes that pointers never wrap, scev_probably_wraps_p returns false.  Which
is understandable, I guess, but in this case we get burnt by the logic that
follows in adjust_range_with_scev:

  * Since the range we have is VARYING, we take the initial value of the given
chrec and set it as the min value for the range.  So, the minimum value for the
new range is set to -1B.

  * Since the scalar evolution goes forward, we set the maximum value to the
max value for the type (upper_bound_in_type).  Which also happens to be -1B.

  * So, we end up with the range [-1B, -1B] which we later propagate into the
pointer dereference, causing the failure.

This problem does not happen in mainline because of the PTR_PLUS_EXPR cleanup.
Pointer arithmetic uses unsigned types and all this is avoided.

I think that the core problem is that we are tripping over the fact that while
we don't consider pointers to wrap, the instantiation of the chrec is giving
wrapped-around pointer values.  This confuses VRP.

So far, I see the following options for fixing this:

1- Teach SCEV that subtracting pointer values from 0 yields an unkown
chrec.  Similarly, adding to upper_bound_in_type will yield an unkown
chrec.  What's the wording in the standard wrt pointer arithmetic?  Is
the following undefined, implementation defined, or valid?

char *p = 0;
--p;
*p = 'x';

2- Teach SCEV about ASSERT_EXPRs when instantiating chrecs.  Would
benefit both mainline and 4.2.  May hide other bugs that occur when
there are no assertions around. But that's unlikely.

3- Tell VRP to refuse to do anything with pointer chrecs that have a constant
initial value.  This may prove suboptimal in some cases where we could've
gotten a good range, but they should be few and far between.

4- In mainline, the representation of pointer arithmetic has been
cleaned up considerably with the PTR_PLUS_EXPR patches.  Bringing those
in to 4.2 is IMO out of the question because of the sheer invasiveness.
But if the problem was widespread enough maybe we could consider it.  I
don't think it is, though.


-- 
   Summary: Scalar evolutions confusing VRP with pointer values that
wrap around
   Product: gcc
   Version: 4.2.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dnovillo at gcc dot gnu dot org


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



[Bug tree-optimization/33593] tree-outof-ssa moves sources of non-call exceptions past sequence points

2007-09-30 Thread dnovillo at gcc dot gnu dot org


--- Comment #5 from dnovillo at gcc dot gnu dot org  2007-09-30 16:00 
---
Subject: Bug 33593

Author: dnovillo
Date: Sun Sep 30 16:00:36 2007
New Revision: 128893

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128893
Log:

PR 33593
* tree-ssa-ter.c (is_replaceable_p): Return false if STMT may
throw an exception.


testsuite/ChangeLog

PR 33593
* g++.dg/tree-ssa/pr33593.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/pr33593.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ter.c


-- 


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



[Bug c++/33738] New: -Wtype-limits misses a warning when comparing enums

2007-10-11 Thread dnovillo at gcc dot gnu dot org
This was found on GCC 4.2.1.  In this test case, VRP quietly folds a comparison
between an enum type and a constant value that the enum type can never take.
With -Wtype-limits, this should give the warning:

comparison always false due to limited range of data type

extern void link_error (void);

enum Alpha {
 ZERO = 0, ONE, TWO, THREE
};

Alpha a2;

int m1 = -1;
int GetM1() {
 return m1;
}

int main() {
 a2 = static_cast(GetM1());
 if (a2 == -1) {   <-- VRP should warn when folding this.
link_error ();
 }
 return 0;
}

This is not warned by the front end because we promote -1 to the same type as
a2.  But during VRP, we *do* fold the predicate, so warning when -Wtype-limits
is given in this case would be a good QOI feature.

I have a patch in the works to make VRP warn when it linearizes this predicate.


-- 
   Summary: -Wtype-limits misses a warning when comparing enums
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: dnovillo at gcc dot gnu dot org
ReportedBy: dnovillo at gcc dot gnu dot org


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



[Bug middle-end/19865] [4.0 Regression] ice / gnat bug detected.

2005-02-16 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-16 
19:21 ---
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00943.html

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug middle-end/18706] [4.0 Regression] ACATS ce2208b ICE expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:637

2005-02-16 Thread dnovillo at gcc dot gnu dot org


-- 
Bug 18706 depends on bug 19865, which changed state.

Bug 19865 Summary: [4.0 Regression] ice / gnat bug detected.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19865

   What|Old Value   |New Value

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

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


[Bug tree-optimization/18178] Missed opportunity for removing bounds checking

2005-02-18 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-18 
21:44 ---

Fix.  http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01074.html.

The patch allows VRP to eliminate 42% more conditionals on cc1-i-files and 173%
more conditionals on DLV.  But produces little difference in MICO and TRAMP3D.  

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug tree-optimization/19659] GCC does not remove an "if" statement that never triggers.

2005-02-18 Thread dnovillo at gcc dot gnu dot org


-- 
Bug 19659 depends on bug 18178, which changed state.

Bug 18178 Summary: Missed opportunity for removing bounds checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18178

   What|Old Value   |New Value

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

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


[Bug tree-optimization/20100] [4.0 Regression] LIM is pulling out a pure function even though there is something which can modify global memory

2005-02-20 Thread dnovillo at gcc dot gnu dot org


-- 
   What|Removed |Added

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


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


[Bug tree-optimization/20115] [4.0 Regression] Pure functions are mishandled

2005-02-22 Thread dnovillo at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-02-22 07:28:59 |2005-02-22 14:58:42
   date||


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


[Bug tree-optimization/20115] [4.0 Regression] Pure functions are mishandled

2005-02-22 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-22 
18:26 ---

Testing patch.

-- 


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


[Bug tree-optimization/20204] [4.0 regression] miscompilation of asm-declared registers

2005-02-25 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-25 
13:31 ---

Could you show me how to configure a cris-axis-elf target and build a 
simulator?  
Have you tried undoing the tree-into-ssa.c change?  It should be easy with:

$ cvs up -r 2.40 tree-into-ssa.c

If there had been a bug in the tree-into-ssa.c changes we would be seeing
widespread carnage on every target.  And that is just not the case:

http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg01103.html
http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg01100.html
http://gcc.gnu.org/ml/gcc-testresults/2005-02/msg01101.html

Diego.

-- 


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


[Bug tree-optimization/20188] [4.0 Regression] asm and memory operands does not add a V_MAY_DEF

2005-02-25 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-25 
15:04 ---
(In reply to comment #12)

> if (lhs && (TREE_CODE (lhs) == TREE_LIST || EXPR_P (lhs))
> will works for everyone, it works for this testcase too but I have not
> bootstrapped or tested it yet.
>
This is the right fix.  Could you bootstrap and test it?  A test case for this
would need a dg-scan test for two 'if ()' statements (i.e., we should not value
number the second if() out).


Thanks.  Diego.

-- 


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


[Bug tree-optimization/20204] [4.0 regression] miscompilation of asm-declared registers

2005-02-25 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-25 
16:48 ---
(In reply to comment #9)
> I've confirmed on this other machine that the update caused the same breakage.
> 
Ah, yes.  I see it now.  The reorg tickled a bug in the renamer:

# n_21 = V_MUST_DEF 
n = D.1158_28
...
n_48 = PHI 
:
...
# VUSE 
n.5_40 = n;


That's wrong.  The last VUSE should be VUSE .  Virtual operands should
always be in FUD-chain form.

Working on a fix.

-- 
   What|Removed |Added

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


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


[Bug tree-optimization/20204] [4.0/4.1 regression] miscompilation of asm-declared registers

2005-02-25 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-02-25 
21:18 ---
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01625.html

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug c/20284] CCP still doesn't look inside initializers for structures

2005-03-02 Thread dnovillo at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
   Severity|normal  |enhancement
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-03-02 15:20:44
   date||


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


[Bug c/20284] CCP still doesn't look inside initializers for structures

2005-03-02 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-03-02 
15:28 ---

Pasting IRC dialogue to avoid forgetting what this was all about:

 dnovillo: i had a patch to make CCP look in initializers for
structures, but rth and you rejected it, claiming it should not be done in CCP
but in fold.
 stevenb: rth rejected it, actually.
 oh whatever. someone did.
 stevenb: i remember it having some issues, but don't remember what
those were.
 dnovillo: rth said it should not be in ccp, and be more general
 stevenb: in fold?  that sounds more like a job for get_default_value.
 dnovillo: i just took code from expr.c but apparently just replacing
that was not good enough
 It is a job
 anyway, what became of that?
 for get_default_value
 dnovillo: dropped on the floor until 4.1
 dnovillo: and now not interesting anymore
 dnovillo: the primary motivation was IS_EXPR_CODE_CLASS
 stevenb: ok.  do you have your latest draft?
 dnovillo: but that's done without strchr now
 dnovillo: probably floating somewhere in the gcc-patches archives
 stevenb: any date/subject that may help me dig it out?  i'll put it
in my pile.
 dnovillo: RP done
 dnovillo: there is a PR for it that is already assigned to you
 stevenb: you're joking.
 really?
 :)
 sigh
 now 2 PR
 dnovillo: i am not a funny guy.  i never make jokes about it ;)
 stevenb: is this the one you're thinking about? 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14841
 gcc bug #14841: [tree-ssa] const_array[CST] is not folded Product: gcc,
Component: tree-optimization, Severity: enhancement, Assigned to:
[EMAIL PROTECTED], Status: ASSIGNED
 that sounds familiar
 dnovillo: yes that is the one i was thinking of
 dnovillo: there was a better patch that did structs also
 dnovillo: but i think i never posted that because it causes quadratic
behavior
 dnovillo: the problem being that constructors are not sorted
 dnovillo: the patch from that PR also helps the DFA code in
insn-attrtab.c btw
 Ah yes, now i remember this whole discussion
 stevenb: what's that about constructors?
 dnovillo: the problem with initializers for structs is that they are
represented as constructors, but they are not sorted in any way
 dnovillo: so if you go look for what some field is initialized with,
you have to go through the whole constructor
 ah
 dnovillo: and if you have to look for a field initializer for all
fields, that is quadratic

-- 


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


[Bug tree-optimization/20284] CCP still doesn't look inside initializers for structures

2005-03-02 Thread dnovillo at gcc dot gnu dot org


-- 
   What|Removed |Added

  Component|c   |tree-optimization
   Target Milestone|--- |4.1.0
Version|3.4.2   |4.0.0


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


[Bug c++/19476] Missed null checking elimination with new

2005-03-04 Thread dnovillo at gcc dot gnu dot org


-- 
   What|Removed |Added

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


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


[Bug c/20318] RFE: add attribute to specify that a function never returns NULL

2005-03-04 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-03-04 
18:01 ---

Adding some of the early analysis that went on in private mail.


> So is there an __attribute__ that we can use to mark that function to
> always return non-NULL, so the compiler knows that path is not possible?
>
No.  There is __attribute__ ((noreturn)), but the compiler has no way of knowing
that svn_fs_fs__id_parse is guaranteed to return non-NULL.

This is what the compiler sees in the IL:

  root_id_41 = svn_fs_fs__id_parse (node_id_str_39, D.10885_40, pool_5);
  if (root_id_41 == 0B) goto ; else goto ;

:;
  svn_error__locate (...);
  D.10887_45 = dgettext (...);
  svn_err__temp_46 = svn_error_create (160004, 0B, D.10887_45);

  # root_id_257 = PHI ;
:;
  [ ... ]
:;
  *root_id_p_30 = root_id_257;


At L19, it sees two possible values for root_id (root_id_28 and root_id_41). 
root_id_28 is the uninitialized value.

We don't have a "can't return NULL" attribute.  Though it would be useful.  In
this case, you're better off initializing *root_id_p at the start of the 
function.


Diego.


-- 


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


[Bug tree-optimization/20492] [tcb] update_ssa (..., true) places an invalid PHI node.

2005-03-16 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-03-16 
12:08 ---

Thanks Kazu.  I've fixed this one already in my local tree.  Will probably
commit the fix in the next few days.

-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-03-16 12:08:43
   date||


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


[Bug tree-optimization/15524] [4.0 Regression] jump threading on trees is slow with switch statements with large # of cases

2005-04-08 Thread dnovillo at gcc dot gnu dot org

--- Additional Comments From dnovillo at gcc dot gnu dot org  2005-04-08 
21:49 ---
(In reply to comment #18)

> Ugh.  The copy we inserted turned out to be totally useless for determining
> that the condition at the end of BB5 is always false.  Argggh.
> 
> To make this scheme work we'd have to do copy insertions anytime the
> COND_EXPR_COND or SWITCH_EXPR changed.  Worse yet, we'd need to call
> rewrite_ssa_into_ssa to keep things in SSA form.  Double Ugh.
> 
It's a matter of scheduling the passes mostly.  The reason you're having a hard
time here is mostly because some of the scalar cleanups haven't run.  Suppose
that we do this after FRE and copy propagation.  We end up with:

  D.15513_11 = insn_10->code;
  switch (D.15514_11)
{
  case 5: goto ;
  case 6: goto ;
  case 7: goto ;
  case 8: goto ;
  case 9 ... 10: goto ;
  default : goto ;
}
  # SUCC: 22 1 21 3 2 16
[ ... ]

  # BLOCK 3
  # PRED: 0
:;
  if (D.15521_11 != 7) goto ; else goto ;
  # SUCC: 5 (false) 4 (true)

Now, if you insert an assertion of any kind at the start of block #3, you'll get
the elimination you're looking for.

Currently, VRP will not handle this case because of the switch.  That is easily
fixable.  In TCB, the code I get after VRP is this:

  # BLOCK 0
  # PRED: ENTRY (fallthru,exec)
  #   VUSE ;
  D.1144_2 = insn_1->code;
  insn_3 = insn_1;
  switch (D.1144_2)
{
  case 5: goto L17;
  case 6: goto L17;
  case 7: goto L3;
  default : goto L17;
}
  # SUCC: 1 (exec) 3 (exec)

  # BLOCK 1
  # PRED: 0 (exec)
L3:;
  D.1145_6 = D.1144_2;
  if (D.1145_6 != 7) goto ; else goto L17;
  # SUCC: 2 (true,exec) 3 (false,exec)

[ ... ]

So, it would be a matter of choosing the ordering and arranging for VRP to
handle SWITCH_EXPRs.

Now, if what you want is a design where all these actions are done in one
super-pass, well, that's a different can of worms.


Diego.

-- 


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


  1   2   3   4   >