[Bug target/94812] New: ppc incorrect mffs-based emulation of mffsl

2020-04-27 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94812

Bug ID: 94812
   Summary: ppc incorrect mffs-based emulation of mffsl
   Product: gcc
   Version: 10.0
   URL: https://gcc.gnu.org/pipermail/gcc-patches/2020-April/5
44391.html
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aoliva at gcc dot gnu.org
CC: segher at kernel dot crashing.org
  Target Milestone: ---

The emulation of mffsl with mffs does not store the result where requested.

The patch submission starting at this bug's URL has more details.

[Bug target/94812] ppc incorrect mffs-based emulation of mffsl

2020-05-26 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94812

Alexandre Oliva  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Alexandre Oliva  ---
Fixed

[Bug driver/95456] [11 Regression] gcc/gcc.c:6035:16: runtime error: null pointer passed as argument 2, which is declared to never be null

2020-06-04 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95456

Alexandre Oliva  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #1 from Alexandre Oliva  ---
Created attachment 48673
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48673&action=edit
patch I'm testing

Here's the patch I'm testing

[Bug driver/95456] [11 Regression] gcc/gcc.c:6035:16: runtime error: null pointer passed as argument 2, which is declared to never be null

2020-06-05 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95456

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #3 from Alexandre Oliva  ---
fixed

[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined

2020-06-05 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
Bug 63426 depends on bug 95456, which changed state.

Bug 95456 Summary: [11 Regression] gcc/gcc.c:6035:16: runtime error: null 
pointer passed as argument 2, which is declared to never be null
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95456

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug testsuite/95416] Several gcc.misc-tests/outputs.exp tests FAIL

2020-06-08 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95416

Alexandre Oliva  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2020-06-08
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org

--- Comment #2 from Alexandre Oliva  ---
Created attachment 48706
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48706&action=edit
patch that works around the problem

Does this help?

[Bug lto/95224] -flto -save-temps uses very unusual name for resolution file, looks arbitrary

2020-06-08 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95224

--- Comment #2 from Alexandre Oliva  ---
That's not expected, but it seems highly suspicious indeed.  I'll have a look.

[Bug lto/95224] -flto -save-temps uses very unusual name for resolution file, looks arbitrary

2020-06-08 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95224

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Alexandre Oliva  ---
The changes to the handling of '%u' under -save-temps have probably fixed this.
 Previously, we'd use input_basename unconditionally.

[Bug gcov-profile/95365] [11 Regression] Broken gcov since r11-627-g1dedc12d186a1108

2020-06-08 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95365

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #2 from Alexandre Oliva  ---
'fraid the change was intentional.  Different compilations of foo.c, with
different options, now get different gcda files, instead of one stepping on the
other's toes.

You have to separate compilation and linking to get foo.gc{da,no}, or use the
"-dumpbase ''" workaround to restore prior aux output naming conventions.

[Bug testsuite/95538] Unfinished cleanup in the test suite

2020-06-08 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95538

--- Comment #2 from Alexandre Oliva  ---
More likely we've just always missed these lto dump files: IIRC they used to be
created in tmpdir, even during -save-temps builds.

[Bug rtl-optimization/87600] Fix for PRs 86939 and 87479 causes build issues for several targets

2020-06-18 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87600

Alexandre Oliva  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org

--- Comment #8 from Alexandre Oliva  ---
I've noticed regressions caused by make_more_copies, in scenarios that used
subreg s for the low part of promoted incoming parms.  With hard regs, the
substitution into a subreg became a reg, but with a pseudo, it remains a
subreg, which prevents further combines in some cases, as in e.g.
gcc_target/powerpc/20050603-3.c on ppc64.

I thought one way to go about it could be to scan for subregs of pseudos copied
from hard regs before introducing the additional copies, and introduce the
intermediate pseudo with the widest subreg mode if there aren't uses of the
full pseudo.

[Bug testsuite/95577] Tcl error with testsuite/gcc.misc-tests/outputs.exp on darwin

2020-06-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95577

Alexandre Oliva  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org

--- Comment #3 from Alexandre Oliva  ---
Iain,

Do platforms that use dsymutil support -gsplit-dwarf?

I'm thinking of bringing -g into the gsplit_dwarf variable, so it won't be
enable without -gsplit-dwarf, and removing other explicit mentions of -g from
outputs.exp.

Would this be enough to address the dsymutil left-overs?

[Bug testsuite/95577] Tcl error with testsuite/gcc.misc-tests/outputs.exp on darwin

2020-06-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95577

--- Comment #5 from Alexandre Oliva  ---
but is .dSYM ever generated when no -g is present?

[Bug testsuite/95416] Several gcc.misc-tests/outputs.exp tests FAIL

2020-06-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95416

Alexandre Oliva  changed:

   What|Removed |Added

URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2020-June/54
   ||8730.html

--- Comment #3 from Alexandre Oliva  ---
Patch with a fix proper at
https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548730.html

[Bug testsuite/95577] Tcl error with testsuite/gcc.misc-tests/outputs.exp on darwin

2020-06-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95577

Alexandre Oliva  changed:

   What|Removed |Added

URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2020-June/54
   ||8730.html

--- Comment #7 from Alexandre Oliva  ---
Proposed fix at https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548730.html

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-06-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #3 from Alexandre Oliva  ---
akrl, any clue as to where this .out is coming from in your runs?  I get .exe
in my arm test runs; I don't see anything that selects .out, only .exe; and the
driver disregards the .exe suffix in executable output, regardless of platform,
when recognizing that the single source has the same basename as the linker
output.

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-06-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

--- Comment #5 from Alexandre Oliva  ---
that's because of the second input gcc_tg.o

can you tell where that comes from?

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-06-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

--- Comment #6 from Alexandre Oliva  ---
In case that's from some board config file, I suggest prefixing it with -Wl, so
that it doesn't count as an additional input.

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-06-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

--- Comment #7 from Alexandre Oliva  ---
now, if it is from the board config file, maybe it had better be moved to
ldflags or libs; both of them undergo some -Wl, treatment of object files and
libs already.

[Bug testsuite/95416] Several gcc.misc-tests/outputs.exp tests FAIL

2020-06-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95416

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #5 from Alexandre Oliva  ---
Fixed

[Bug testsuite/95577] Tcl error with testsuite/gcc.misc-tests/outputs.exp on darwin

2020-06-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95577

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #10 from Alexandre Oliva  ---
Fixed

[Bug target/95458] Inline strncmp is *much* slower than glibc

2020-07-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95458

Alexandre Oliva  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org

--- Comment #1 from Alexandre Oliva  ---
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-09/msg00701.html seems relevant

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-07-16 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

--- Comment #10 from Alexandre Oliva  ---
Created attachment 48886
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48886&action=edit
patch that hopefully fixes the problem

Does this fix the problem in your testglue-requiring test runs?

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-07-17 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

Alexandre Oliva  changed:

   What|Removed |Added

  Attachment #48886|0   |1
is obsolete||
  Attachment #48889|0   |1
is obsolete||

--- Comment #12 from Alexandre Oliva  ---
Created attachment 48891
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48891&action=edit
another try

Sorry about the bugs in the previous patch.

Besides integrating your s/_1/_list/ fix (thanks), I understood why you needed
the [set $opts], but the intended logic was to have a [set $i] in the previous
line.  I didn't know about this use for "set", though; I would have gone for
"eval set opts \$$i" instead.  I liked set opts [set $i] much better.  Thanks
for cluing me into it!

Would you be so kind as to confirm that this slightly modified version still
works for you, and that I didn't miss any of your changes?

Thanks,

[Bug testsuite/95720] [11 Regression] New dump output filename strategy invalidates tests

2020-07-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95720

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #15 from Alexandre Oliva  ---
Fixed

[Bug driver/96230] driver: ICE in process_command, at gcc.c:5095

2020-07-24 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96230

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #4 from Alexandre Oliva  ---
Fixed

[Bug rtl-optimization/96965] New: combine RMW and flags

2020-09-07 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96965

Bug ID: 96965
   Summary: combine RMW and flags
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: segher at gcc dot gnu.org
  Reporter: aoliva at gcc dot gnu.org
  Target Milestone: ---

Consider:

typedef unsigned char T;
T i[2];
int f() {
  T *p = &i[0], *q = &i[1];
  T c = __builtin_add_overflow(*p, 1, p);
  *q += c;
}

The desired code sequence on x86_64 is:

  addb $1, i(%rip)
  adcb $0, i+1(%rip)

What we get instead of the desired addb are separate load, addb, and store
instructions.  There are two reasons why we don't combine them to form the
addb:

- when we try_combine the 3 of them, the flag-store insn is still present,
between M (add) and W (store), thus can_combine_p fails.  after we combine the
flag-store into adcb, we do not retry

- if I manually force the retry, we break up the M parallel insn into a naked
add in i2, and a flag-setting non-canonical compare in i0.  we substitute R and
M into W, for an add without flag-setting.  finally, we deal with added_sets,
building a new parallel to hold the RMW add and appending the flag-setter as
the second item, after the combined add.  alas, recog won't match them in this
order.  *add3_cc_overflow_1 requires the flag-setter before the
reg-setter.

Here's discussion and combine dumbs from a slightly different testcase that
triggers the same combine behavior:

https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553242.html

[Bug rtl-optimization/96965] combine RMW and flags

2020-09-07 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96965

--- Comment #1 from Alexandre Oliva  ---
One nit: I wrote the flag-setting non-canonical compare ended up in i0, but it
actually becomes i1, with the original i1 (R) moved to i0.

[Bug middle-end/93399] [8/9/10 Regression] Annotate assembler option failure

2020-01-27 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93399

--- Comment #5 from Alexandre Oliva  ---
I suppose it would make sense for str_pattern_slim to quote line breaks
and other active characters when printing out string literals.  And
perhaps to eliminate one more use of str_pattern_slim while at that...

[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-09-11 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54551

--- Comment #1 from Alexandre Oliva  2012-09-11 
21:20:11 UTC ---
I guess we have to somehow local all death points of the pseudo in paths
towards the debug use, and insert debug insns binding the same debug temp to
the pseudo before all of the death points, then replace the debug use with a
use of the debug temp.  I'm not sure how well this fits in the general
structure of the DF machinery.  Presumably we just need to look up a table of
(lists of?) debug temps as we reach death points.


[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-09-23 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-09-23

 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #4 from Alexandre Oliva  2012-09-23 
11:36:13 UTC ---

Mine.  Patch posted at http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01606.html


[Bug debug/54177] [4.8 Regression]: Segfault in cselib_lookup due to NULL_RTX passed from vt_add_function_parameter

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #6 from Alexandre Oliva  2012-10-02 
19:58:41 UTC ---

Author: aoliva

Date: Tue Oct  2 19:58:37 2012

New Revision: 191999



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

Log:

PR debug/54177

* var-tracking.c (vt_add_function_parameter): Bail if

var_lowpart fails.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/var-tracking.c


[Bug debug/53135] [4.7/4.8 Regression] internal compiler error: in value_format, at dwarf2out.c:8010

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #12 from Alexandre Oliva  2012-10-02 
20:05:29 UTC ---

Author: aoliva

Date: Tue Oct  2 20:05:24 2012

New Revision: 192000



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

Log:

PR debug/53135

* dwarf2out.c (value_format): Use block4 for dw_val_class_loc

when needed.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/dwarf2out.c


[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #5 from Alexandre Oliva  2012-10-02 
20:06:13 UTC ---

Author: aoliva

Date: Tue Oct  2 20:06:08 2012

New Revision: 192001



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

Log:

gcc/ChangeLog:

PR debug/54551

* Makefile.in (VALTRACK_H): Add hash-table.h.

* valtrack.h: Include hash-table.h.

(struct dead_debug_global_entry): New.

(struct dead_debug_hash_descr): New.

(struct dead_debug_global): New.

(struct dead_debug): Rename to...

(struct dead_debug_local): ... this.  Adjust all uses.

(dead_debug_global_init, dead_debug_global_finish): New.

(dead_debug_init): Rename to...

(dead_debug_local_init): ... this.  Adjust all callers.

(dead_debug_finish): Rename to...

(dead_debug_local_finish): ... this.  Adjust all callers.

* valtrack.c (dead_debug_global_init): New.

(dead_debug_init): Rename to...

(dead_debug_local_init): ... this.  Take global parameter.

Save it and initialize used bitmap from it.

(dead_debug_global_find, dead_debug_global_insert): New.

(dead_debug_global_replace_temp): New.

(dead_debug_promote_uses): New.

(dead_debug_finish): Rename to...

(dead_debug_local_finish): ... this.  Promote remaining uses.

(dead_debug_global_finish): New.

(dead_debug_add): Try to replace global temps first.

(dead_debug_insert_temp): Support global replacements.

* dce.c (word_dce_process_block, dce_process_block): Add

global_debug parameter.  Pass it on.

(fast_dce): Initialize, pass on and finalize global_debug.

* df-problems.c (df_set_unused_notes_for_mw): Adjusted.

(df_create_unused_notes, df_note_bb_compute): Likewise.

(df_note_compute): Justify local-only dead debug analysis.

gcc/testsuite/ChangeLog:

PR debug/54551

* gcc.dg/guality/pr54551.c: New.



Added:

trunk/gcc/testsuite/gcc.dg/guality/pr54551.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/Makefile.in

trunk/gcc/dce.c

trunk/gcc/df-problems.c

trunk/gcc/testsuite/ChangeLog

trunk/gcc/valtrack.c

trunk/gcc/valtrack.h


[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #6 from Alexandre Oliva  2012-10-02 
20:16:33 UTC ---

Fixed in the trunk.  Backporting to 4.7...


[Bug debug/53135] [4.7/4.8 Regression] internal compiler error: in value_format, at dwarf2out.c:8010

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #13 from Alexandre Oliva  2012-10-02 
20:17:53 UTC ---

The work around is installed in the trunk, and will soon be in the branch as

well, but this should ideally be left open until we figure out a better way to

avoid all the duplication that triggers the size explosion.


[Bug debug/53135] [4.7/4.8 Regression] internal compiler error: in value_format, at dwarf2out.c:8010

2012-10-02 Thread aoliva at gcc dot gnu.org


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



--- Comment #14 from Alexandre Oliva  2012-10-03 
04:02:43 UTC ---

Author: aoliva

Date: Wed Oct  3 04:02:38 2012

New Revision: 192021



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

Log:

PR debug/53135

* dwarf2out.c (value_format): Use block4 for dw_val_class_loc

when needed.



Modified:

branches/gcc-4_7-branch/gcc/ChangeLog

branches/gcc-4_7-branch/gcc/dwarf2out.c


[Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g

2012-10-08 Thread aoliva at gcc dot gnu.org


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



--- Comment #7 from Alexandre Oliva  2012-10-08 
14:10:25 UTC ---

Marek, the patch looks good, thanks.


[Bug debug/54796] [4.8 Regression] Non-addressable stack parameter debug quality regression

2012-10-08 Thread aoliva at gcc dot gnu.org


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



--- Comment #4 from Alexandre Oliva  2012-10-08 
14:37:53 UTC ---

I'm a bit uncomfortable with this approach.  On the one hand, it's quite

simple, which is nice, but if all we get from it is the base term, we'll still

have trouble given multiple sp-based non-overlapping memory regions, won't we? 

The patch in revision 188871 and others in that batch were meant to let alias

analysis within vta figure out the relationship between argp, fp and sp and

disambiguate accesses.  I wonder why it didn't work in this case, with or

without the still-pending patch to canonicalize stack pointer tracking.  I'd

rather go with the latter (even if with additional changes) because it would

enable alias analysis, through more precise sp+offset tracking, to distinguish

not only between argp and sp-based variables, but also between automatic

varying-sized objects.  Assuming my understanding of your patch is correct in

that it adds information on whether some object is at an sp-relative offset but

without making the offset available to alias analysis.  Is that so?


[Bug debug/54693] VTA guality issues with loops

2012-10-14 Thread aoliva at gcc dot gnu.org


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



--- Comment #3 from Alexandre Oliva  2012-10-14 
21:19:00 UTC ---

Created attachment 28447

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28447

Work in progress patch



This patch improves jump threading so that it won't drop debug info on the

floor as often as it does now, copying the debug bind stmts of the

jump-threaded block to the new confluence destination, so that the copies will

be updated so as to bind to the new PHI nodes, if needed.



This preserved variable i longer than before within the compilation, but it was

stll lost in ivopts.



I started looking into the ivopts loss: we need to rewrite at least the PHI

nodes we're removing in terms of the remaining ivs, but even though I wrote all

the needed infrastructure to adjust the debug info bindings, I couldn't figure

out how to express the dropped ivs in terms of the remaining ones.  I suppose

someone more familiar with tree-ivopts might have some idea, so I decided not

to spend more time trying to figure it out.



This is as far as I could get on my own.  I hope this helps.


[Bug debug/54693] VTA guality issues with loops

2012-10-26 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-10-26

 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #6 from Alexandre Oliva  2012-10-26 
07:16:35 UTC ---

Patchset for trunk posted:

http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02379.html


[Bug debug/54953] [4.8 Regression] New sra-1.c FAILs on powerpc

2012-10-26 Thread aoliva at gcc dot gnu.org


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



--- Comment #2 from Alexandre Oliva  2012-10-26 
07:42:07 UTC ---

Without your poposed change, AFTER_WITH_REG is only used while adding

REG_UNUSED marks to REG defs.  That the REG def is unused means it's going to

be discarded and, when it is, either the debug temp will be reset altogether,

or we'll propagate the expression stored in the REG to uses of the REG (e.g.,

the debug use, if we omit the debug temp, or the debug temp, if we needlessly

add it), or we (should?) emit another debug temp BEFORE_WITH_VALUE and use that

instead of the REG (in the orginal debug use or in the needless debug temp). 

In any of these cases, the debug temp is useless.



All that siad, it's probably not a terribly important optimization, so if the

above wouldn't make sense in a comment before the questionable hunk, we might

as well drop it.  Adding REG_FORCE for this new use is probably fine too.


[Bug debug/54693] VTA guality issues with loops

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #7 from Alexandre Oliva  2012-10-29 
19:26:21 UTC ---

Author: aoliva

Date: Mon Oct 29 19:26:16 2012

New Revision: 192957



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

Log:

PR debug/54693

* config/i386/i386.c (add_parameter_dependencies): Stop

backward scan at the insn before the incoming head.

(ix86_dependencies_evaluation_hook): Skip debug insns.  Stop

if first_arg is head.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/i386/i386.c


[Bug debug/54693] VTA guality issues with loops

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #8 from Alexandre Oliva  2012-10-29 
19:27:11 UTC ---

Author: aoliva

Date: Mon Oct 29 19:27:09 2012

New Revision: 192958



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

Log:

PR debug/54693

* loop-unroll.c (loop_exit_at_end_p): Skip debug insns.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/loop-unroll.c


[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #7 from Alexandre Oliva  2012-10-29 
19:27:39 UTC ---

Author: aoliva

Date: Mon Oct 29 19:27:31 2012

New Revision: 192959



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

Log:

PR debug/54551

PR debug/54693

* valtrack.c (dead_debug_global_find): Accept NULL dtemp.

(dead_debug_global_insert): Return new entry.

(dead_debug_global_replace_temp): Return early if REG is no

longer in place, or if dtemp was already substituted.

(dead_debug_promote_uses): Insert for all defs and replace all

debug uses at once.

(dead_debug_local_finish): Release used after promotion.

(dead_debug_insert_temp): Stop if dtemp is NULL.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/valtrack.c


[Bug debug/54693] VTA guality issues with loops

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #9 from Alexandre Oliva  2012-10-29 
19:27:39 UTC ---

Author: aoliva

Date: Mon Oct 29 19:27:31 2012

New Revision: 192959



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

Log:

PR debug/54551

PR debug/54693

* valtrack.c (dead_debug_global_find): Accept NULL dtemp.

(dead_debug_global_insert): Return new entry.

(dead_debug_global_replace_temp): Return early if REG is no

longer in place, or if dtemp was already substituted.

(dead_debug_promote_uses): Insert for all defs and replace all

debug uses at once.

(dead_debug_local_finish): Release used after promotion.

(dead_debug_insert_temp): Stop if dtemp is NULL.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/valtrack.c


[Bug debug/54693] VTA guality issues with loops

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #10 from Alexandre Oliva  2012-10-29 
19:36:52 UTC ---

Author: aoliva

Date: Mon Oct 29 19:36:47 2012

New Revision: 192961



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

Log:

gcc/ChangeLog:

PR debug/54693

* tree-ssa-threadedge.c (thread_around_empty_block): Copy

debug temps from predecessor before threading.

gcc/testsuite/ChangeLog:

PR debug/54693

* gcc.dg/guality/pr54693.c: New.



Added:

trunk/gcc/testsuite/gcc.dg/guality/pr54693.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/testsuite/ChangeLog

trunk/gcc/tree-ssa-threadedge.c


[Bug debug/54693] VTA guality issues with loops

2012-10-29 Thread aoliva at gcc dot gnu.org


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



--- Comment #11 from Alexandre Oliva  2012-10-29 
19:37:31 UTC ---

Author: aoliva

Date: Mon Oct 29 19:37:25 2012

New Revision: 192962



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

Log:

PR debug/54693

* gcc/valtrack.c (dead_debug_insert_temp): Defer rescan of

newly-emitted debug insn.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/valtrack.c


[Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily

2012-10-30 Thread aoliva at gcc dot gnu.org


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



--- Comment #8 from Alexandre Oliva  2012-10-30 
23:47:43 UTC ---

Author: aoliva

Date: Tue Oct 30 23:47:35 2012

New Revision: 193003



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

Log:

PR debug/54551

PR debug/54693

* valtrack.c (dead_debug_promote_uses): Assert-check that

global used bit was clear and initialize entry

unconditionally.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/valtrack.c


[Bug debug/54693] VTA guality issues with loops

2012-10-30 Thread aoliva at gcc dot gnu.org


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



--- Comment #12 from Alexandre Oliva  2012-10-30 
23:47:44 UTC ---

Author: aoliva

Date: Tue Oct 30 23:47:35 2012

New Revision: 193003



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

Log:

PR debug/54551

PR debug/54693

* valtrack.c (dead_debug_promote_uses): Assert-check that

global used bit was clear and initialize entry

unconditionally.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/valtrack.c


[Bug debug/54693] VTA guality issues with loops

2012-11-04 Thread aoliva at gcc dot gnu.org


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



--- Comment #13 from Alexandre Oliva  2012-11-04 
18:44:18 UTC ---

Author: aoliva

Date: Sun Nov  4 18:44:13 2012

New Revision: 193138



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

Log:

PR debug/54693

* tree-ssa-threadedge.c (propagate_threaded_block_debug_into):

New, rewritten from debug stmt copying code...

(thread_around_empty_block): ... removed from here.

(thread_across_edge): Call propagate_threaded_block_debug_into.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/tree-ssa-threadedge.c


[Bug debug/54693] VTA guality issues with loops

2012-11-04 Thread aoliva at gcc dot gnu.org


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



--- Comment #14 from Alexandre Oliva  2012-11-04 
18:44:32 UTC ---

Author: aoliva

Date: Sun Nov  4 18:44:25 2012

New Revision: 193139



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

Log:

PR debug/54693

* tree-ssa-loop-ivopts.c (remove_unused_ivs): Emit debug temps

for dropped IV sets.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/tree-ssa-loop-ivopts.c


[Bug debug/54693] VTA guality issues with loops

2012-11-04 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #15 from Alexandre Oliva  2012-11-04 
22:09:12 UTC ---

Fixed


[Bug debug/54693] VTA guality issues with loops

2012-11-06 Thread aoliva at gcc dot gnu.org


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



--- Comment #17 from Alexandre Oliva  2012-11-06 
17:59:04 UTC ---

Author: aoliva

Date: Tue Nov  6 17:58:52 2012

New Revision: 193251



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

Log:

PR debug/54693

* tree-ssa-threadedge.c (propagate_threaded_block_debug_into):

Use a stack vector before allocating a pointer set.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/tree-ssa-threadedge.c


[Bug debug/49888] VTA: -O2 -g variable value changes, it does not change in the source

2012-11-07 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED



--- Comment #10 from Alexandre Oliva  2012-07-06 
11:37:19 UTC ---

Author: aoliva

Date: Fri Jul  6 11:37:14 2012

New Revision: 189325



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

Log:

PR rtl-optimization/53827

PR debug/53671

PR debug/49888

* alias.c (memrefs_conflict_p): Adjust offset and size by the

same amount for alignment ANDs.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/alias.c



--- Comment #11 from Alexandre Oliva  2012-11-08 
02:57:12 UTC ---

Fixed.  Not backporting.


[Bug debug/47624] FAIL: gcc.dg/guality/pr43077-1.c -O1 line 42 c == 3

2012-11-07 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #10 from Alexandre Oliva  2012-06-28 
07:39:59 UTC ---

Author: aoliva

Date: Thu Jun 28 07:39:51 2012

New Revision: 189037



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

Log:

PR debug/53706

PR debug/47624

* var-tracking.c (vt_emit_notes): Release loc_exp_dep_pool...

(vt_finalize): ... here instead, if needed.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/var-tracking.c



--- Comment #11 from Alexandre Oliva  2012-11-08 
03:01:08 UTC ---

Fixed.  Not backporting.


[Bug debug/51570] [4.7 Regression] FAIL: gcc.dg/guality/pr45003-[23].c

2012-11-07 Thread aoliva at gcc dot gnu.org


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



Alexandre Oliva  changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED



--- Comment #11 from Alexandre Oliva  2012-11-08 
03:06:09 UTC ---

Not backporting.  Fixed.


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

Alexandre Oliva  changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |

--- Comment #5 from Alexandre Oliva  2010-12-17 
06:13:57 UTC ---
Mine


[Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug

2010-12-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46931

Alexandre Oliva  changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |

--- Comment #5 from Alexandre Oliva  2010-12-17 
06:14:40 UTC ---
Mine.  I found out it would indeed drop debug info, and found out a way to
avoid discarding it.


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

--- Comment #6 from Alexandre Oliva  2010-12-17 
06:19:30 UTC ---
Created attachment 22792
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22792
Patch I'm testing that fixes the bug

Here's what I meant.  It does fix the bug at hand, and (surprisingly) we don't
end up emitting debug info for the artificial parameter.  Tracking it is enough
to fix the location info for the variable that maps to the result.  It looks
like this:

.byte   0x8 # uleb128 0x8; (DIE (0x15b) DW_TAG_variable)
.ascii "a2\0"   # DW_AT_name
.byte   0x1 # DW_AT_decl_file
(../../gcc/testsuite/gcc.dg/guality/nrv-1.c)
.byte   0x10# DW_AT_decl_line
.4byte  0xf5# DW_AT_type
.4byte  .LLST1  # DW_AT_location

.LLST1:
.8byte  .LVL0   # Location list begin address (*.LLST1)
.8byte  .LVL1-1 # Location list end address (*.LLST1)
.2byte  0x2 # Location expression size
.byte   0x72# DW_OP_breg2
.byte   0   # sleb128 0
.8byte  0   # Location list terminator begin (*.LLST1)
.8byte  0   # Location list terminator end (*.LLST1)

The range covers the entire function.  I haven't looked into why we don't
reduce the single-entry entire-function location list to a simpler location.


[Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug

2010-12-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46931

--- Comment #6 from Alexandre Oliva  2010-12-17 
06:23:19 UTC ---
Created attachment 22793
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22793
Patch I'm testing that fixes the bug

Instead of just dropping the debug info on the floor, I figured we could
preserve the RHS of the removed DEF, if unchanging, in the debug stmts
themselves, if this wouldn't create invalid RHS for the debug bind, or in debug
temps bound just before the using debug stmts otherwise.


[Bug debug/46782] -fcompare-debug failure (length) with -fvar-tracking

2010-12-17 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46782

--- Comment #4 from Alexandre Oliva  2010-12-18 
06:24:55 UTC ---
Author: aoliva
Date: Sat Dec 18 06:24:52 2010
New Revision: 168013

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168013
Log:
gcc/ChangeLog:
PR debug/46782
* cfgcleanup.c (try_forward_edges): Skip debug insns.
gcc/testsuite/ChangeLog:
PR debug/46782
* gcc.dg/debug/pr46782.c: New.

Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/debug/pr46782.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/cfgcleanup.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug debug/46756] -fcompare-debug failure (length) with ASSIGN

2010-12-17 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46756

--- Comment #4 from Alexandre Oliva  2010-12-18 
06:25:12 UTC ---
Author: aoliva
Date: Sat Dec 18 06:25:09 2010
New Revision: 168014

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168014
Log:
gcc/ChangeLog:
PR debug/46756
* jump.c (mark_all_labels): Skip debug insns.
gcc/testsuite/ChangeLog:
PR debug/46756
* gfortran.dg/debug/pr46756.f: New.

Added:
branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/debug/pr46756.f
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/jump.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug debug/46756] -fcompare-debug failure (length) with ASSIGN

2010-12-17 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46756

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Alexandre Oliva  2010-12-18 
06:27:14 UTC ---
Fixed, trunk (see bug 46576, oops) and 4.5 branch.


[Bug debug/46782] -fcompare-debug failure (length) with -fvar-tracking

2010-12-17 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46782

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Alexandre Oliva  2010-12-18 
06:27:40 UTC ---
Fixed, trunk and 4.5 branch.


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-18 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

Alexandre Oliva  changed:

   What|Removed |Added

  Attachment #22792|0   |1
is obsolete||
  Attachment #22794|0   |1
is obsolete||

--- Comment #9 from Alexandre Oliva  2010-12-18 
08:02:42 UTC ---
Created attachment 22806
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22806
Revised patch

This patch integrates Jakub's proposed changes and fixes a regression in
pr46815.C on x86_64-linux-gnu.  A difference in DECL_BY_REFERENCE in the
RESULT_DECL required different handling in the DEBUG_VALUE_EXPR and in
var-tracking for proper handling.  Regstrapping again after the changes...


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-18 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

Alexandre Oliva  changed:

   What|Removed |Added

  Attachment #22806|0   |1
is obsolete||

--- Comment #10 from Alexandre Oliva  2010-12-18 
08:05:20 UTC ---
Created attachment 22807
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22807
The actual revised patch

Doh, failed to refresh the patch file.


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-21 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

--- Comment #11 from Alexandre Oliva  2010-12-22 
03:49:06 UTC ---
Author: aoliva
Date: Wed Dec 22 03:49:00 2010
New Revision: 168160

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168160
Log:
PR debug/46724
* function.c (assign_parms_augmented_arg_list): Name and mark
DECL of result address as NAMELESS rather than IGNORED.
(assign_parms): Set DECL_VALUE_EXPR for indirect result.
* tree.h (tree_decl_common::decl_flag_2): Document RESULT_DECL.
(DECL_HAS_VALUE_EXPR_P): Accept RESULT_DECL.
* dwarf2out.c (loc_list_from_tree) : Use
DECL_VALUE_EXPR.
* dbxout.c (dbxout_expand_expr) : Likewise.
* var-tracking.c (vt_add_function_parameter): New, split out of...
(vt_add_function_parameters): ... this.  Handle incoming
pointer to hold result.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dbxout.c
trunk/gcc/dwarf2out.c
trunk/gcc/function.c
trunk/gcc/tree.h
trunk/gcc/var-tracking.c


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2010-12-21 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #12 from Alexandre Oliva  2010-12-22 
03:55:54 UTC ---
Fixed


[Bug debug/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug

2010-12-28 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46931

--- Comment #7 from Alexandre Oliva  2010-12-28 
20:20:32 UTC ---
Author: aoliva
Date: Tue Dec 28 20:20:29 2010
New Revision: 168299

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168299
Log:
PR debug/46931
* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Update
SSA before removing dead stmts.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop-manip.c


[Bug debug/47079] [4.6 Regression] FAIL: gcc.dg/guality/nrv-1.c

2010-12-28 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47079

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.12.28 21:30:43
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Alexandre Oliva  2010-12-28 
21:30:43 UTC ---
Mine


[Bug debug/47079] [4.6 Regression] FAIL: gcc.dg/guality/nrv-1.c

2010-12-28 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47079

--- Comment #2 from Alexandre Oliva  2010-12-28 
23:04:39 UTC ---
Created attachment 22863
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22863
Patch that fixes the problem

Here's the patch that I'm testing.


[Bug debug/47106] -fcompare-debug failure (length) with -fpartial-inlining -flto -fconserve-stack

2010-12-30 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47106

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.12.30 20:09:30
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Alexandre Oliva  2010-12-30 
20:09:30 UTC ---
Mine


[Bug debug/47106] -fcompare-debug failure (length) with -fpartial-inlining -flto -fconserve-stack

2010-12-30 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47106

--- Comment #2 from Alexandre Oliva  2010-12-30 
20:15:22 UTC ---
Created attachment 22870
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22870
Patch that fixes the bug, regstrapping

When estimating the stack size of a function, we shouldn't set TREE_USED in the
loop over local decls, for this makes us count every block var that is local
when accounting block vars: since we preserve more block vars for debugging
purposes, we end up counting them all in the latter pass, even if they weren't
marked as TREE_USED before the loop over locals.

Simply removing the set would be enough to fix the bug, but I figured we'd get
more accurate results if we refrained from counting variables twice, so I added
a bitmap.  This fixes the bug, testing a bootstrap with these flags now.


[Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining

2011-01-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46535

Alexandre Oliva  changed:

   What|Removed |Added

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

--- Comment #5 from Alexandre Oliva  2011-01-06 
17:50:25 UTC ---
Mine


[Bug libgcj/44341] [4.6 Regression] libjava cross build fails when configured with --with-gmp=

2011-01-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44341

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.06 21:52:36
 CC||aoliva at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #8 from Alexandre Oliva  2011-01-06 
21:52:36 UTC ---
Taking over, per Jakub's request


[Bug middle-end/46240] [4.6 Regression] ice in maybe_register_def

2011-01-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46240

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |

--- Comment #5 from Alexandre Oliva  2011-01-06 
21:53:42 UTC ---
Mine


[Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining

2011-01-11 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46535

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|WORKSFORME  |FIXED

--- Comment #7 from Alexandre Oliva  2011-01-12 
05:03:37 UTC ---
This was fixed by revision 168271.  If we fail to bring in the vtbl ptr
assignment from the cleanup stmt into the constexpr ctor, the inliner gets
thoroughly confused as expectations as to indirect calls are unmet.  I couldn't
determine exactly why the inliner ends up thinking it inlined a function into
itself, but I've already spend enough time getting acquainted with constexprs
and the cgraph inliner for now, and the fix is definitely good, so I'll leave
it at that.


[Bug middle-end/46240] [4.6 Regression] ice in maybe_register_def

2011-01-12 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46240

--- Comment #6 from Alexandre Oliva  2011-01-13 
07:27:19 UTC ---
Created attachment 22955
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22955
Patch that fixes the bug, testing with enable-build-with-cxx bootstrap-O3

Here's the patch I'm testing.


[Bug libgcj/44341] [4.6 Regression] libjava cross build fails when configured with --with-gmp=

2011-01-13 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44341

--- Comment #9 from Alexandre Oliva  2011-01-13 
09:07:09 UTC ---
Created attachment 22956
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22956
Another approach to fix the problem

Here's another approach that IMHO is more consistent: instead of depending on a
target library to mangle arguments for another target library, get the top
level to distinguish target and host arguments and pass them down, adjusted as
needed.


[Bug rtl-optimization/43494] [4.4/4.5/4.6 Regression] Overlooked dependency causes wrong scheduling, wrong code

2011-01-13 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43494

--- Comment #28 from Alexandre Oliva  2011-01-13 
10:31:21 UTC ---
Created attachment 22957
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22957
Updated patch, still awaiting review

The patch to fix this bug, posted on Sept 21, is still awaiting review :-(

This updated version fixes just a whitespace difference that caused it to fail
to apply.


[Bug libgcj/44341] [4.6 Regression] libjava cross build fails when configured with --with-gmp=

2011-01-14 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44341

--- Comment #11 from Alexandre Oliva  2011-01-14 
09:54:54 UTC ---
Yeah, sorry, the *s were not supposed to be there in the variable names, only
in the help message.  I fixed that shortly after posting the patch here, when I
first noticed the problem.


[Bug c++/46933] [4.6 Regression] Revision 167781 failed g++.dg/other/first-global.C

2011-01-14 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46933

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.14 21:33:47
 CC||aoliva at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Alexandre Oliva  2011-01-14 
21:33:47 UTC ---
Mine


[Bug c++/46933] [4.6 Regression] Revision 167781 failed g++.dg/other/first-global.C

2011-01-14 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46933

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
 AssignedTo|aoliva at gcc dot gnu.org   |hubicka at gcc dot gnu.org

--- Comment #2 from Alexandre Oliva  2011-01-14 
22:29:47 UTC ---
Fixed in revision 167791.


[Bug c++/46977] [4.6 Regression] [C++0x] ICE: SIGSEGV in htab_find_slot_with_hash (hashtab.c:650)

2011-01-14 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46977

Alexandre Oliva  changed:

   What|Removed |Added

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

--- Comment #2 from Alexandre Oliva  2011-01-14 
22:30:38 UTC ---
Mine


[Bug c++/46977] [4.6 Regression] [C++0x] ICE: SIGSEGV in htab_find_slot_with_hash (hashtab.c:650)

2011-01-15 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46977

Alexandre Oliva  changed:

   What|Removed |Added

 AssignedTo|aoliva at gcc dot gnu.org   |jason at gcc dot gnu.org

--- Comment #4 from Alexandre Oliva  2011-01-15 
17:20:12 UTC ---
Yours, then ;-)


[Bug bootstrap/47215] [4.6 Regression] Failed to bootstrap

2011-01-15 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47215

Alexandre Oliva  changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot   |ktietz at gcc dot gnu.org
   |gnu.org |

--- Comment #14 from Alexandre Oliva  2011-01-16 
03:13:32 UTC ---
Kai, Jakub, are you going to act on this, or would you like me to take it over?
 Please reassign it as appropriate, thanks.


[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

2011-01-15 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122

Alexandre Oliva  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |

--- Comment #5 from Alexandre Oliva  2011-01-16 
03:15:35 UTC ---
Looking into it, noncommittal for the time being.


[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122

--- Comment #6 from Alexandre Oliva  2011-01-16 
08:13:44 UTC ---
Created attachment 22978
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22978
Patch that fixes the problem by discarding too unsafe optimizations

When there's more than one exit from the loop, discarding the assumptions for
the trip count to apply might be regarded as a bit too unsafe, as in this
particular case.  This candidate patch disables the assumption entirely, and
disables the -Wunsafe-loop-optimizations warnings the loop exits would produce,
since -funsafe-loop-optimizations wouldn't affect them any longer.


[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122

--- Comment #7 from Alexandre Oliva  2011-01-16 
08:28:36 UTC ---
Created attachment 22979
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22979
Patch that fixes (papers over?) the bug by compensating for the unsafe
assumption

Here's another alternative, that does not discard the unsafe optimization, but
instead attempts to make it safe.  Considering that the computed trip count
should only apply when the counter is exact, and that the other exit is taken
at the next trip, this patch compensates for the too-low trip count by
replacing the exact division by a rounded-up division, which gives us the
correct trip count for this particular loop.

Other cases in which we'd take another exit after more than one iteration would
presumably still fail, but I don't know enough about the loop infrastructure to
tell whether this possibility might arise.


[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122

Alexandre Oliva  changed:

   What|Removed |Added

  Attachment #22978|0   |1
is obsolete||

--- Comment #8 from Alexandre Oliva  2011-01-16 
08:32:33 UTC ---
Created attachment 22980
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22980
Patch that fixes the problem by discarding too unsafe optimizations

Oops, the first attachment was missing a refresh on the correct machine.  This
is the version I meant to post.  The one I posted before was was abandoned
approach that I had already started turning into what I meant to post, but that
would print a different warning for the case of multiple exits, rather than
being silent about the optimization it refused to perform.


[Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #9 from Alexandre Oliva  2011-01-16 
08:35:50 UTC ---
Mine, but expecting comments on which approach is preferrable before completing
a patch with a testcase, a ChangeLog and a full regression testing cycle.


[Bug tree-optimization/43657] [4.3/4.4/4.5/4.6 Regression] -ftree-loop-linear causes FAIL: gcc.dg/vect/vect-cond-5.c execution test

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43657

Alexandre Oliva  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.16 11:50:32
 CC||aoliva at gcc dot gnu.org
  Known to work||
 AssignedTo|unassigned at gcc dot   |aoliva at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1
  Known to fail||

--- Comment #5 from Alexandre Oliva  2011-01-16 
11:50:32 UTC ---
Been looking into this.  There doesn't seem to be anything to prevent the loop
from being transformed when an SSA DEF escapes the loop.  Trying to fix.


[Bug tree-optimization/43657] [4.3/4.4/4.5/4.6 Regression] -ftree-loop-linear causes FAIL: gcc.dg/vect/vect-cond-5.c execution test

2011-01-16 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43657

--- Comment #6 from Alexandre Oliva  2011-01-16 
12:29:18 UTC ---
Created attachment 22982
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22982
Proposed patch

This avoids the transformation, but...  Is the test too strict?  My reasoning
is that, since we're in closed form (right?), the exit block will only have
PHIs for stuff that is changed wthin the loop and is used outside the loop. 
Does that sound sound? :-)


[Bug debug/47079] [4.6 Regression] FAIL: gcc.dg/guality/nrv-1.c

2011-01-19 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47079

--- Comment #3 from Alexandre Oliva  2011-01-19 
22:00:08 UTC ---
Author: aoliva
Date: Wed Jan 19 22:00:00 2011
New Revision: 169034

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169034
Log:
PR debug/47079
PR debug/46724
* function.c (instantiate_expr): Instantiate incoming rtl of
implicit arguments, and recurse on VALUE_EXPRs.
(instantiate_decls): Instantiate rtl and VALUE_EXPR of result.
* var-tracking.c (adjust_mems): Reject virtual_incoming_args_rtx.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c
trunk/gcc/var-tracking.c


[Bug debug/46724] [4.6 Regression] Wrong debug info: Invalid variable location

2011-01-19 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46724

--- Comment #13 from Alexandre Oliva  2011-01-19 
22:00:09 UTC ---
Author: aoliva
Date: Wed Jan 19 22:00:00 2011
New Revision: 169034

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169034
Log:
PR debug/47079
PR debug/46724
* function.c (instantiate_expr): Instantiate incoming rtl of
implicit arguments, and recurse on VALUE_EXPRs.
(instantiate_decls): Instantiate rtl and VALUE_EXPR of result.
* var-tracking.c (adjust_mems): Reject virtual_incoming_args_rtx.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c
trunk/gcc/var-tracking.c


[Bug debug/47079] [4.6 Regression] FAIL: gcc.dg/guality/nrv-1.c

2011-01-19 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47079

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Alexandre Oliva  2011-01-19 
22:06:35 UTC ---
Fixed


[Bug debug/46240] [4.6 Regression] ice in maybe_register_def

2011-01-19 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46240

--- Comment #7 from Alexandre Oliva  2011-01-19 
22:07:16 UTC ---
Author: aoliva
Date: Wed Jan 19 22:07:14 2011
New Revision: 169035

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169035
Log:
gcc/ChangeLog:
PR debug/46240
* tree-into-ssa.c (maybe_register_def): Do not attempt to add
debug bind stmt on merge edges.
gcc/testsuite/ChangeLog:
PR debug/46240
* g++.dg/debug/pr46240.cc: New.

Added:
trunk/gcc/testsuite/g++.dg/debug/pr46240.cc
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-into-ssa.c


[Bug debug/46240] [4.6 Regression] ice in maybe_register_def

2011-01-19 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46240

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Alexandre Oliva  2011-01-19 
22:11:33 UTC ---
Fixed


[Bug tree-optimization/46583] [4.6 Regression] -fcompare-debug failure with -O -fno-inline -fipa-cp -fipa-cp-clone

2011-01-20 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46583

--- Comment #8 from Alexandre Oliva  2011-01-20 
16:56:30 UTC ---
Author: aoliva
Date: Thu Jan 20 16:56:25 2011
New Revision: 169058

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169058
Log:
gcc/ChangeLog:
PR debug/46583
* tree-ssa-live.c (remove_unused_scope_block_p): Keep type decls.
gcc/testsuite/ChangeLog:
PR debug/46583
* g++.dg/debug/pr46583.C: New.

Added:
trunk/gcc/testsuite/g++.dg/debug/pr46583.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-live.c


  1   2   3   4   5   6   7   8   9   10   >