Re: [PATCH, combine] Fix host-specific behavior in simplify_compare_const()

2013-04-06 Thread Chung-Ju Wu
2013/3/7 Chung-Ju Wu : > 2013/3/5 Eric Botcazou : >>> In other words, any 32-bit target with 'need_64bit_hwint=yes' in config.gcc >>> is not able to have benefit from this optimization because it never >>> passes the condition test. >>> >>> >>> My solution is to use GET_MODE_MASK(mode) to filter ou

[RFA] [PATCH] Minor improvement to canonicalization of COND_EXPR for gimple

2013-04-06 Thread Jeff Law
The tree combiner/forward propagator is missing opportunities to collapse sequences like this: _15 = _12 ^ _14; if (_15 != 0) Into: if (_12 != _14) The tree combiner/forward propagator builds this tree: x ^ y Then passes it to canonicalize_cond_expr_cond That is not suitable fo

[RFA][PATCH] Improve VRP of COND_EXPR_CONDs

2013-04-06 Thread Jeff Law
Given something like this: : _23 = changed_17 ^ 1; _12 = (_Bool) _23; if (_12 != 0) goto ; else goto ; Assume _23 and changed_17 have integer types wider than a boolean, but VRP has determined they have a range [0..1]. We should be turning that into: : _23 = changed_17 ^

Re: [RFA][PATCH] Improve VRP of COND_EXPR_CONDs

2013-04-06 Thread Steven Bosscher
On Sat, Apr 6, 2013 at 2:48 PM, Jeff Law wrote: > > Given something like this: ...and the other one from earlier today. Nice finds! :-) > + /* If we have a comparison of a SSA_NAME boolean against > + a constant (which obviously must be [0..1]). See if the "...be [0..1]), see if ..." > +

Re: functional and type_traits cleanup

2013-04-06 Thread Jonathan Wakely
On 5 April 2013 21:12, François Dumont wrote: > > In fact my first attempt was a very simple one: > > template > class __is_convertible_helper<_From, _To, false> > { > template > static true_type > __test(_To1); > > template > static false_type > __test(...); >

[committed] Fix PR target/55487: Don't increment label nuses on NOTE_INSN_DELETED_LABEL notes

2013-04-06 Thread John David Anglin
The fix is obvious. Tested on hppa64-hp-hpux11.11 and hppa-unknown- linux-gnu with no observed regressions. Committed to 4.8 and trunk. Dave -- John David Anglin dave.ang...@bell.net 2013-04-06 John David Anglin PR target/55487 * config/pa/pa.c (legitimize_pic_addre

[committed] Fix GCC bootstrap on hppa*-*-hpux* using HP cat

2013-04-06 Thread John David Anglin
The patch fixes PR other/55274 and we now generate a non empty map file. As noted in the PR, this problem causes a hang when bootstrap is done using HP cat. Tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11. Committed to trunk and 4.8. Richard, would it be ok to apply to the 4.7 b

Re: functional and type_traits cleanup

2013-04-06 Thread Daniel Krügler
2013/4/6 Jonathan Wakely > > > But the version with the default template parameter is fine and more > > consistent with the other helpers implementation so, adopted! Here is an > > other version of the patch for validation. > > > > Daniel, I agree that inheritance with integral_constant is no

Re: functional and type_traits cleanup

2013-04-06 Thread Jonathan Wakely
On 6 April 2013 21:03, Daniel Krügler wrote: > 2013/4/6 Jonathan Wakely >> > >> > But the version with the default template parameter is fine and more >> > consistent with the other helpers implementation so, adopted! Here is an >> > other version of the patch for validation. >> > >> > Daniel,

C: Add new warning -Wunprototyped-calls

2013-04-06 Thread Tobias Burnus
This patch comes from Richard's SUSE GCC patch. There, -Wunprototyped-calls is enabled for all RPM builds. -Wunprototyped-calls prints a warning if one calls a function with an argument with is declared without prototype. For instance: gcc.dg/Wunprototyped-calls.c: In function ‘main’: gcc.dg/

Re: C: Add new warning -Wunprototyped-calls

2013-04-06 Thread Andreas Schwab
Tobias Burnus writes: > gcc.dg/Wunprototyped-calls.c:13:3: warning: call to function ‘g’ without a > real prototype [-Wunprototyped-calls] What is a real prototype? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And

[patch] update documentation for SEQUENCE

2013-04-06 Thread Steven Bosscher
Hello, The existing documentation for SEQUENCE still states it is used for DEFINE_EXPAND sequences. I think I wasn't even hacking GCC when that practice was abandoned, and in the mean time some other uses of SEQUENCE have appeared in the compiler. So, a long-overdue documentation update. OK for t

Re: functional and type_traits cleanup

2013-04-06 Thread Paolo Carlini
Hi, On 04/06/2013 10:43 PM, Jonathan Wakely wrote: My response was more like a general comment: My apprehension is that I after these changes not all predicate type traits do satisfy the Library requirement anymore that they still derive from std::integral_constant. But I have not checked that i

[patch] PR middle-end/43631

2013-04-06 Thread Steven Bosscher
Hello, In this PR43631, var-tracking notes are inserted on basic block boundaries and BB_HEAD/BB_END end up pointing to these notes. This breaks verify_flow_info. The problem is actually bigger than just the var-tracking notes. The general problem is that there are no rules for whether or not not

Re: [PATCH, combine] Fix host-specific behavior in simplify_compare_const()

2013-04-06 Thread Jeff Law
On 04/06/2013 01:42 AM, Chung-Ju Wu wrote: The attached patch has passed bootstrap/regression test on x86_64-unknown-linux-gnu with current main trunk. A plaintext gcc/ChangeLog is as below: 2013-04-06 Chung-Ju Wu * combine.c (simplify_compare_const): Use GET_MODE_MASK to filter

Re: [RFA][PATCH] Improve VRP of COND_EXPR_CONDs

2013-04-06 Thread Jeff Law
On 04/06/2013 07:08 AM, Steven Bosscher wrote: + if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (innerop)) + { + value_range_t *vr = get_value_range (innerop); + I don't think the SSA_NAME_OCCURS_IN_ABNORMAL_PHI test is necessary, get_value_range() will simply return a !VR_RANGE. It'

RE: [PATCH GCC]Relax the probability condition in CE pass when optimizing for code size

2013-04-06 Thread Bin Cheng
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On > Behalf Of Bin Cheng > Sent: Tuesday, March 26, 2013 4:33 PM > To: 'Joern Rennecke' > Cc: gcc-patches@gcc.gnu.org; 'Jeff Law' > Subject: RE: [PATCH GCC]Relax the probability condition in

RE: [PATCH GCC/pr56124] Don't prefer memory if the source of load operation has side effect

2013-04-06 Thread Bin Cheng
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org] On > Behalf Of Bin Cheng > Sent: Monday, March 25, 2013 3:15 PM > To: gcc-patches@gcc.gnu.org > Subject: FW: [PATCH GCC/pr56124] Don't prefer memory if the source of load > operation has side