[PATCH][2/n] Always 64bit-HWI cleanups

2014-05-23 Thread Richard Biener
sources (lto-plugin already does that - heh). Thanks, Richard. 2014-05-23 Richard Biener rguent...@suse.de libcpp/ * configure.ac: Remove long long and __int64 type checks, add check for uint64_t and fail if that wasn't found. * include/cpplib.h (cpp_num_part): Use

Re: [COMMITTED 1/2] Just enumerate all GF_OMP_FOR_KIND_* and GF_OMP_TARGET_KIND_*.

2014-05-23 Thread Richard Biener
I think it was supposed to note that it uses two bits in the mask. Did Jakub approve these patches you are committing now? Thanks, Richard. On Fri, May 23, 2014 at 1:32 PM, Thomas Schwinge tho...@codesourcery.com wrote: From: tschwinge tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4

Re: [PATCH] Fix PR rtl-optimization/61278

2014-05-23 Thread Richard Biener
On Fri, May 23, 2014 at 12:33 PM, Zhenqiang Chen zhenqiang.c...@linaro.org wrote: On 23 May 2014 17:05, Richard Biener richard.guent...@gmail.com wrote: On Fri, May 23, 2014 at 9:23 AM, Zhenqiang Chen zhenqiang.c...@linaro.org wrote: Hi, The patch fixes PR rtl-optimization/61278. Root cause

Re: [PATCH] Disable unroll loop that has header count less than iteration count.

2014-05-23 Thread Richard Biener
On May 23, 2014 7:26:04 PM CEST, Jan Hubicka hubi...@ucw.cz wrote: On Thu, May 22, 2014 at 11:36 PM, Dehao Chen de...@google.com wrote: If a loop's header count is less than iteration count, the iteration estimation is apparently incorrect for this loop. Thus disable unrolling of such

Re: Fix broken graph dump

2014-05-26 Thread Richard Biener
On Sat, May 24, 2014 at 6:44 AM, Xinliang David Li davi...@google.com wrote: graph dump is broken in trunk (and gcc-49) -- the subgraph of the last function gets dumped. The patch fixed the problem. Also fixed the function header dump -- the cgraph uid is still used in many places such as

Re: Darwin bootstrap failure following wide int merge (was: we are starting the wide int merge)

2014-05-26 Thread Richard Biener
On Mon, May 26, 2014 at 10:14 AM, FX fxcoud...@gmail.com wrote: .././../gcc-4.10-20140518/gcc/wide-int.cc:1274:23: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions umul_ppmm (val[1], val[0], op1.ulow

[PATCH][4/4] Always 64bit-HWI cleanups

2014-05-26 Thread Richard Biener
in optimizing the two element case inline for them). This moves the relatively new HALF_WIDE_INT stuff to its only user, wide-int.cc, and uses the PRI*64 stuff in the HOST_WIDE_INT_PRINT macros. Bootstrap / testing in progress on x86_64-unknown-linux-gnu. Richard. 2014-05-26 Richard Biener rguent

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-05-26 Thread Richard Biener
On Mon, May 26, 2014 at 12:22 PM, Eric Botcazou ebotca...@adacore.com wrote: Hi, the motivation of this work is to get rid of the range check on Z in: function F (X : Integer; Y : Integer ) return Positive is Z : Integer; begin if X = Y then return 1; end if; Z := Y -

[PATCH] Fix primitive wi::int_traits

2014-05-26 Thread Richard Biener
. Richard. 2014-05-26 Richard Biener rguent...@suse.de * wide-int.h (wi::int_traits long, wi::int_traits unsigned long, wi::int_traits long long, wi::int_traits unsigned long long): Provide specializations. (wi::int_traits HOST_WIDE_INT, wi::int_traits unsigned

Re: [PATCH][4/4] Always 64bit-HWI cleanups

2014-05-27 Thread Richard Biener
On May 27, 2014 3:58:06 AM CEST, David Edelsohn dje@gmail.com wrote: This patch (further) broke bootstrap on AIX. AIX defaults to 32 bit, although it supports 64 bit HWI. /nasfarm/edelsohn/src/src/gcc/bitmap.c: In function 'int print_statistics(bitmap_descriptor_d**, output_info*)':

Re: [PATCH] Warn on and fold NULL checks against inline functions

2014-05-27 Thread Richard Biener
On Mon, May 26, 2014 at 9:01 PM, Patrick Palka patr...@parcs.ath.cx wrote: Hi, This patch teaches the C++ frontend to warn on NULL checks against inline functions and it teaches the middle-end to fold NULL checks against inline functions. These two things are currently done for non-inline

Re: [PATCH] Fix an AARCH64/ARM performance regression

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 10:10 AM, Bernd Edlinger bernd.edlin...@hotmail.de wrote: Hi, I have been informed, that the following check-in may cause a slight performance regression on aarch64 and arm on trunk and gcc-4_9-branch: See https://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=205899

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 11:25 AM, Eric Botcazou ebotca...@adacore.com wrote: + tree new_const + = fold_build2_loc (loc, reverse_op, TREE_TYPE (arg1), const2, const1); /* If the constant operation overflowed this can be simplified as a comparison against

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 11:59 AM, Eric Botcazou ebotca...@adacore.com wrote: I'm asking to merge them (move them to fold_comparison). OK, I'll repost a first patch doing only the fold-const.c massaging. Yeah, it would be nice to see some support. The most interesting cases will be

[PATCH] Try harder for conditional evaluation in VRP

2014-05-27 Thread Richard Biener
Especially for ops with symbolic ranges it may be preferable to compare one range with an op such as in [x + 1, x + 1] x instead of expanding the range of x on the rhs to sth unrelated. So, try harder. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2014-05-27 Richard

Re: [PATCH][4/4] Always 64bit-HWI cleanups

2014-05-27 Thread Richard Biener
On Tue, 27 May 2014, Richard Biener wrote: On May 27, 2014 3:58:06 AM CEST, David Edelsohn dje@gmail.com wrote: This patch (further) broke bootstrap on AIX. AIX defaults to 32 bit, although it supports 64 bit HWI. /nasfarm/edelsohn/src/src/gcc/bitmap.c: In function 'int

Re: [PATCH][4/4] Always 64bit-HWI cleanups

2014-05-27 Thread Richard Biener
On Tue, 27 May 2014, Jakub Jelinek wrote: On Tue, May 27, 2014 at 08:26:35AM +0200, Richard Biener wrote: /nasfarm/edelsohn/src/src/gcc/cfg.c: In function 'void dump_bb_info(FILE*, basic_block, int, int, bool, bool)': /nasfarm/edelsohn/src/src/gcc/cfg.c:737:33: error: expected ')' before

[PATCH] Fix HWI AIX breakage

2014-05-27 Thread Richard Biener
This fixes the AIX breakage by defining __STDC_FORMAT_MACROS earlier, before stdio.h on AIX gets to include inttypes.h. Committed as obvious. Richard. 2014-05-27 Richard Biener rguent...@suse.de * system.h (__STDC_FORMAT_MACROS): Define as very first thing. Index: gcc/system.h

Re: [PATCH] Try harder for conditional evaluation in VRP

2014-05-27 Thread Richard Biener
On Tue, 27 May 2014, Steven Bosscher wrote: On Tue, May 27, 2014 at 12:27 PM, Richard Biener wrote: * tree-vrp.c (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Try using literal operands when comparing value-ranges failed. No test case? Sorry ;) Happens

Re: [PATCH] Try harder for conditional evaluation in VRP

2014-05-27 Thread Richard Biener
On Tue, 27 May 2014, Richard Biener wrote: On Tue, 27 May 2014, Steven Bosscher wrote: On Tue, May 27, 2014 at 12:27 PM, Richard Biener wrote: * tree-vrp.c (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Try using literal operands when comparing value-ranges

Re: [PATCH] Warn on and fold NULL checks against inline functions

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 4:06 PM, Patrick Palka patr...@parcs.ath.cx wrote: On Tue, May 27, 2014 at 8:32 AM, Patrick Palka patr...@parcs.ath.cx wrote: On Tue, May 27, 2014 at 3:33 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, May 26, 2014 at 9:01 PM, Patrick Palka patr

Re: Mark more constants readonly

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 3:13 PM, Bernd Schmidt ber...@codesourcery.com wrote: I noticed that string constants built by the Fortran frontend don't set TREE_READONLY for STRING_CST (and subsequently noticed that nothing seems to set it for COMPLEX_CST). That was confusing the ptx backend I'm

Re: Don't copy constants in build_constant_desc

2014-05-27 Thread Richard Biener
On Tue, May 27, 2014 at 3:26 PM, Bernd Schmidt ber...@codesourcery.com wrote: When putting a constant into the constant pool, we make a copy of the tree in build_constant_desc. This caused me some problems with the ptx backend, which has a pass to modify the address spaces of all variables and

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-05-27 Thread Richard Biener
On May 27, 2014 6:12:58 PM CEST, Eric Botcazou ebotca...@adacore.com wrote: I'm asking to merge them (move them to fold_comparison). Done (in the end the patch removes more lines than it adds :-). That's what I like! Tested on x86_64-suse-linux with no regressions. OK. Thanks, Richard.

Re: Fix old bug in div_and_round_double

2014-05-28 Thread Richard Biener
On Tue, May 27, 2014 at 10:29 PM, Eric Botcazou ebotca...@adacore.com wrote: This is an old bug in div_and_round_double for ROUND_DIV_EXPR: when the code detects that it needs to adjust the quotient, it needs to decide whether it increases or decreases it by 1. This only depends on the

Re: Darwin bootstrap failure following wide int merge (was: we are starting the wide int merge)

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 8:50 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, May 26, 2014 at 08:36:31AM -0700, Mike Stump wrote: On May 26, 2014, at 2:22 AM, FX fxcoud...@gmail.com wrote: This causes GCC bootstrap to fail on Darwin systems (whose system compiler is clang-based). Since PR

[PATCH] Fix PR61335

2014-05-28 Thread Richard Biener
. Richard. 2014-05-28 Richard Biener rguent...@suse.de PR tree-optimization/61335 * tree-vrp.c (vrp_visit_phi_node): If the compare of old and new range fails, drop to varying. * gfortran.dg/pr61335.f90: New testcase. Index: gcc/tree-vrp.c

Re: Darwin bootstrap failure following wide int merge (was: we are starting the wide int merge)

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 10:24 AM, FX fxcoud...@gmail.com wrote: Yeah, a portable (C and C++) static assert would be nice. And also pushing this to gmp then. In the meantime I see nothing wrong in merging from GMP. One question, one comment: 1. can I count your “I see nothing wrong” as an

Re: Darwin bootstrap failure following wide int merge

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 10:24 AM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Biener richard.guent...@gmail.com writes: On Wed, May 28, 2014 at 8:50 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, May 26, 2014 at 08:36:31AM -0700, Mike Stump wrote: On May 26, 2014, at 2:22 AM

Re: Darwin bootstrap failure following wide int merge

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 11:40 AM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 28, 2014 at 10:24 AM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Biener richard.guent...@gmail.com writes: On Wed, May 28, 2014 at 8:50 AM, Jakub Jelinek ja...@redhat.com wrote

Re: [PATCH, V2] Fix an AARCH64/ARM performance regression

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 11:02 AM, Bernd Edlinger bernd.edlin...@hotmail.de wrote: Hi, But the coment previously read /* A constant address in TO_RTX can have VOIDmode, we must not try to call force_reg for that case. Avoid that case. */ and you are removing that check. So I guess you want

Re: Darwin bootstrap failure following wide int merge (was: we are starting the wide int merge)

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 11:48 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, May 28, 2014 at 11:38:55AM +0200, Richard Biener wrote: On Wed, May 28, 2014 at 10:24 AM, FX fxcoud...@gmail.com wrote: Yeah, a portable (C and C++) static assert would be nice. And also pushing this to gmp

Re: Darwin bootstrap failure following wide int merge (was: we are starting the wide int merge)

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 12:03 PM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 28, 2014 at 11:48 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, May 28, 2014 at 11:38:55AM +0200, Richard Biener wrote: On Wed, May 28, 2014 at 10:24 AM, FX fxcoud...@gmail.com wrote: Yeah

Re: Darwin bootstrap failure following wide int merge

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 11:49 AM, Richard Sandiford rsand...@linux.vnet.ibm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Wed, May 28, 2014 at 11:40 AM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 28, 2014 at 10:24 AM, Richard Sandiford rdsandif

Re: Mark more constants readonly

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 12:00 PM, Bernd Schmidt ber...@codesourcery.com wrote: On 05/27/2014 04:57 PM, Richard Biener wrote: On Tue, May 27, 2014 at 3:13 PM, Bernd Schmidt ber...@codesourcery.com wrote: I noticed that string constants built by the Fortran frontend don't set TREE_READONLY

Re: Fix old bug in div_and_round_double

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 12:17 PM, Eric Botcazou ebotca...@adacore.com wrote: I suppose you also install on branches? No plan to do so since this isn't a regression, unless you insist. :-) Well, a wrong-code bug plus a very obvious fix certainly qualifies. Richard. -- Eric Botcazou

Re: Fix old bug in div_and_round_double

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 12:23 PM, Eric Botcazou ebotca...@adacore.com wrote: Well, a wrong-code bug plus a very obvious fix certainly qualifies. Fine with me, onto which branch(es) do you want me to put it? Where you have tested it already, no need to spend extra cycles. Richard. -- Eric

[PATCH] Fix PR61045

2014-05-28 Thread Richard Biener
Richard Biener rguent...@suse.de PR middle-end/61045 * fold-const.c (fold_comparison): When folding X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure the sign of the remaining constant operand stays the same. * gcc.dg/pr61045.c: New testcase. Index

[PATCH] Less noisy VRP dump, improve copy handling

2014-05-28 Thread Richard Biener
(if b_2 has a VR_VARYING range). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2014-05-28 Richard Biener rguent...@suse.de * tree-ssa-propagate.c (add_control_edge): Print less vertical space. * tree-vrp.c (extract_range_from_ssa_name): Also copy

Re: Darwin bootstrap failure following wide int merge

2014-05-28 Thread Richard Biener
On Wed, May 28, 2014 at 3:15 PM, FX fxcoud...@gmail.com wrote: After lengthy IRC discussions, what Richard and I can live with is !defined(__clang__) in this particular case that uses longlong.h in GCC sources, with a comment why. I’ll test this patch and commit if there is no problem. But

[PATCH] Revert HWI printing change

2014-05-28 Thread Richard Biener
I have reverted the following for now. Richard. 2014-05-28 Richard Biener rguent...@suse.de Revert 2014-05-28 Richard Biener rguent...@suse.de * hwint.h (HOST_WIDE_INT_PRINT_*): Define in terms of PRI*64. Index: gcc/hwint.h

Re: [PATCH][2/n] Always 64bit-HWI cleanups

2014-06-02 Thread Richard Biener
On Wed, 28 May 2014, Richard Sandiford wrote: Richard Biener rguent...@suse.de writes: The following changes the configury to insist on [u]int64_t being available and removes the very old __int64 case. Autoconf doesn't check for it, support came in via a big merge in Dec 2002, r60174

[PATCH] Fix PR61378

2014-06-02 Thread Richard Biener
Committed as obvious. Richard. 2014-06-02 Richard Biener rguent...@suse.de PR tree-optimization/61378 * tree-ssa-sccvn.c (vn_reference_lookup_3): Initialize valueized_anything. Index: gcc/tree-ssa-sccvn.c

GCC 4.7.4 Status Report, branch frozen for release (candidate)

2014-06-02 Thread Richard Biener
Status == The GCC 4.7 branch is now frozen as I am preparing a first release candidate for GCC 4.7.4. All changes from now on require release manager approval. After GCC 4.7.4 is released the branch will be closed. Previous Report ===

[PATCH] Testcase for PR61346

2014-06-02 Thread Richard Biener
Committed. Richard. 2014-06-02 Richard Biener rguent...@suse.de PR tree-optimization/61346 * gcc.dg/torture/pr61346.c: New testcase. Index: gcc/testsuite/gcc.dg/torture/pr61346.c === --- gcc/testsuite/gcc.dg

Re: [PATCH][2/n] Always 64bit-HWI cleanups

2014-06-02 Thread Richard Biener
On Mon, 2 Jun 2014, Richard Sandiford wrote: Richard Biener rguent...@suse.de writes: On Wed, 28 May 2014, Richard Sandiford wrote: Richard Biener rguent...@suse.de writes: The following changes the configury to insist on [u]int64_t being available and removes the very old __int64

[PATCH] Make HOST_WIDE_INT underlying type match int64_t, adjust printing macros again

2014-06-02 Thread Richard Biener
and if not, provides replacements in hwint.h (like previously), matching int64_t. Built on i586-linux-gnu and x86_64-linux-gnu (to verify both 'long' and 'long long' choices). A bootstrap and regtest on x86_64-unknown-linux-gnu is pending. Ok? Thanks, Richard. 2014-06-02 Richard Biener rguent...@suse.de

Re: Eliminate write-only variables

2014-06-02 Thread Richard Biener
On Sat, May 31, 2014 at 8:21 PM, Sandra Loosemore san...@codesourcery.com wrote: On 05/20/2014 04:56 AM, Richard Biener wrote: On Tue, May 20, 2014 at 6:29 AM, Jan Hubicka hubi...@ucw.cz wrote: On 05/18/2014 08:45 PM, Sandra Loosemore wrote: On 05/18/2014 02:59 PM, Jan Hubicka wrote

Re: [PATCH] Fix PR ipa/61190

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 11:00 AM, Bernd Edlinger bernd.edlin...@hotmail.de wrote: Hi, the test case g++.old-deja/g++.mike/p4736b.C is mis-compiled with with all optimization levels, except -O0 and -Og. This probably started with gcc 4.7.x. The constructor Main::Main() is first inlined and

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-06-02 Thread Richard Biener
On Fri, May 30, 2014 at 10:48 AM, Eric Botcazou ebotca...@adacore.com wrote: I'd say we still handle basic symbolic range ops in extract_range_from_binary_1 but in extract_range_from_binary_expr for a symbolic op0 we try to simplify it with both [op1, op1] and with the value-range of op1 until

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 12:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Fri, May 30, 2014 at 10:48 AM, Eric Botcazou ebotca...@adacore.com wrote: I'd say we still handle basic symbolic range ops in extract_range_from_binary_1 but in extract_range_from_binary_expr for a symbolic

Re: [PATCH] Make HOST_WIDE_INT underlying type match int64_t, adjust printing macros again

2014-06-02 Thread Richard Biener
On Mon, 2 Jun 2014, Jakub Jelinek wrote: On Mon, Jun 02, 2014 at 11:24:23AM +0200, Richard Biener wrote: 2014-06-02 Richard Biener rguent...@suse.de * configure.ac: Check whether the underlying type of int64_t is long or long long. * configure: Regenerate

Re: [PATCH, Pointer Bounds Checker 14/x] Pointer Bounds Checker passes

2014-06-02 Thread Richard Biener
On Fri, May 30, 2014 at 2:25 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adds Pointer Bounds Checker passes. Versioning happens before early local passes. Earply local passes are split into 3 stages to have everything instrumented before any optimization applies. That

Re: [PATCH, i386, Pointer Bounds Checker 10/x] Partitions

2014-06-02 Thread Richard Biener
On Fri, May 30, 2014 at 7:10 PM, Jeff Law l...@redhat.com wrote: On 05/28/14 10:06, Ilya Enkovich wrote: Hi, This patch keeps instrumented and original versions together and preserve tranparent alias chain during symbol name privatization. Bootstrapped and tested on linux-x86_64. Thanks,

Re: [PATCH, Pointer Bounds Checker 13/x] Early versioning

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 12:48 PM, Ilya Enkovich enkovich@gmail.com wrote: On 30 May 10:59, Jeff Law wrote: On 05/29/14 05:05, Ilya Enkovich wrote: Hi, This patch allows to perform function versioning when some structures are not available yet. It is required to make clones for Pointer

Re: [GSoC][match-and-simplify] add bitwise patterns to match.pd

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 1:33 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Hi, I have tried to add few bitwise patterns from tree-ssa-forwprop.c:simplify_bitwise_binary and the patterns mentioned in Simplifications wiki (https://gcc.gnu.org/wiki/Simplifications). How to write a

[PATCH][match-and-simplify]

2014-06-02 Thread Richard Biener
patch I was using was comparing the result from both simplification methods and errors if they don't agree). The patch below (which has been committed) keeps the old path to not regress due to missing patterns. Committed to the branch. Richard. 2014-06-02 Richard Biener rguent...@suse.de

Re: [GSoC][match-and-simplify] add bitwise patterns to match.pd

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 2:53 PM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Jun 2, 2014 at 1:33 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Hi, I have tried to add few bitwise patterns from tree-ssa-forwprop.c:simplify_bitwise_binary and the patterns mentioned

Re: [PATCH, Pointer Bounds Checker 14/x] Pointer Bounds Checker passes

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 2:44 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-02 15:35 GMT+04:00 Richard Biener richard.guent...@gmail.com: On Fri, May 30, 2014 at 2:25 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adds Pointer Bounds Checker passes. Versioning

[PATCH] Fix part of PR61383

2014-06-02 Thread Richard Biener
In comment #3 it's noted that ifcombine happily hoists possibly trapping stmts ... oops. Fixed like the following, bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2014-06-02 Richard Biener rguent...@suse.de PR tree-optimization/61383 * tree-ssa

Re: Eliminate write-only variables

2014-06-02 Thread Richard Biener
On June 2, 2014 5:44:13 PM CEST, Jan Hubicka hubi...@ucw.cz wrote: Well, I'm hesitant to add a new pass just to optimize a (irrelevant in practice) benchmark. I'm ok with strengthening existing infrastructure or enhancing existing passes. The issue with these mini-passes is that they are

Re: [PATCH] Fix PR61328: fully initialize symbolic number before using it

2014-06-03 Thread Richard Biener
On June 3, 2014 9:18:29 AM CEST, Thomas Preud'homme thomas.preudho...@arm.com wrote: When a bitwise OR gimple statement has for operands SSA_NAME initialized directly from memory source (no cast or other unary statement intervening), a symbolic number will be used only partly initialized. This

Re: [PATCH][match-and-simplify]

2014-06-03 Thread Richard Biener
); }) Why not just: (match_and_simplify (plus @0 (bit_not @0)) { build_all_ones_cst (TREE_TYPE (@0)); }) ? Works for vector/complex, I don't know what type a bit_not_expr can have where the simplification wouldn't be true. Sure. Richard. 2014-06-03 Richard Biener rguent...@suse.de

Re: [PATCH, i386, Pointer Bounds Checker 18/x] Expand instrumented builtin function calls

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 4:51 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adds support for normal builtin function calls (target ones are not instrumented). The basic idea of the patch is to make call expr copy with no bounds and expand it instead. If expr is going to be

Re: [PATCH, Pointer Bounds Checker 14/x] Pointer Bounds Checker passes

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 5:13 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-02 17:37 GMT+04:00 Richard Biener richard.guent...@gmail.com: On Mon, Jun 2, 2014 at 2:44 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-02 15:35 GMT+04:00 Richard Biener richard.guent...@gmail.com

Re: [PATCH, Pointer Bounds Checker 20/x] Follow transparent alias chains

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 5:15 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, In the most case we follow transparent alias chains wne assemble names. But in some cases it is not performed. For instrumented functions it is critical and following patch fixes that. It also adds a

Re: [PATCH, Pointer Bounds Checker 21/x] Weakrefs output

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 5:22 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch prevents output of both instrumented and not instrumented weakref variants. Shouldn't one of them be reclaimed instead at some point? Richard. Thanks, Ilya -- gcc/ 2014-06-02 Ilya Enkovich

Re: [PATCH, Pointer Bounds Checker 22/x] Inline

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 5:56 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adds support for inlining instrumented calls. Changes are mostly to support returned bounds. Also generated mem-to-mem assignments are registered to be later instrumented with appropriate bounds

Re: Eliminate write-only variables

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 8:59 PM, Jan Hubicka hubi...@ucw.cz wrote: Yeah, I discussed this with martin today on irc. For aliasing we'd like to know whether a decl possibly has its address taken. Currently we only trust TREE_ADDRESSABLE for statics - and lto might change those to hidden

Re: [PATCH] Fix ICE due to memory corruption in SRA

2014-06-03 Thread Richard Biener
On Mon, Jun 2, 2014 at 11:21 PM, Teresa Johnson tejohn...@google.com wrote: This patch fixes an ICE due to memory corruption discovered while building a large application with FDO and LIPO on the google branch. I don't have a small reproducer, but the same code appears on trunk, and I believe

Re: RFA: PATCH to ctor_for_folding for c++/61020 (ICE with typeid)

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 3:39 AM, Jason Merrill ja...@redhat.com wrote: The C++ front end wants to be able to build up objects of the various typeinfo derived classes (such as __si_class_type_info) without needing to see the full definition of the class. As part of this we build a VAR_DECL for

Re: [PATCH, Pointer Bounds Checker 13/x] Early versioning

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 7:55 AM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-02 21:27 GMT+04:00 Jeff Law l...@redhat.com: On 06/02/14 04:48, Ilya Enkovich wrote: Hmm, so if I understand things correctly, src_fun has no loop structures attached, thus there's nothing to copy. Presumably

Re: [PATCH, Pointer Bounds Checker 24/x] PRE

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 9:13 AM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch preserves CALL_WITH_BOUNDS flag for calls during PRE. Ok. Richard. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich ilya.enkov...@intel.com *

Re: [PATCH, Pointer Bounds Checker 25/x] DCE

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 9:23 AM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adjusts alloc-free removal algorithm in DCE to take into account BUILT_IN_CHKP_BNDRET call returning bounds of allocated memory. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/

Re: [PATCH][match-and-simplify]

2014-06-03 Thread Richard Biener
On Tue, 3 Jun 2014, Marc Glisse wrote: On Tue, 3 Jun 2014, Richard Biener wrote: On Mon, 2 Jun 2014, Marc Glisse wrote: (plus (bit_not @0) @0) if (INTEGRAL_TYPE_P (TREE_TYPE (@0))) { build_int_cst (TREE_TYPE (@0), -1); }) +(match_and_simplify + (plus @0

Re: [PATCH, Pointer Bounds Checker 26/x] CCP

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 9:38 AM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch allows BUILT_IN_CHKP_BNDRET as a consumer of a result of BUILT_IN_STACK_SAVE call. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich

Re: [RFC] optimize x - y cmp 0 with undefined overflow

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 10:11 AM, Eric Botcazou ebotca...@adacore.com wrote: Looks mostly ok. Any reason why you are not re-creating MINUS_EXPR in build_symbolic_expr? That is, build inv - t (for non-pointers, of course)? It's more uniform and compare_values expects an INTEGER_CST on the

Re: [PATCH, Pointer Bounds Checker 25/x] DCE

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 1:36 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-03 13:45 GMT+04:00 Richard Biener richard.guent...@gmail.com: On Tue, Jun 3, 2014 at 9:23 AM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch adjusts alloc-free removal algorithm in DCE to take

[PATCH][match-and-simplify] Get rid of some stmt expressions

2014-06-03 Thread Richard Biener
for querying the largest capture number as well. Richard. 2014-06-03 Richard Biener rguent...@suse.de * genmatch.c (c_expr): Record cpp_tokens, the number of stmts seen and a function identifier. (c_expr::gen_gimple_transform): Generate textual form from the token

Re: [PATCH, Pointer Bounds Checker 25/x] DCE

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 3:27 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-03 15:56 GMT+04:00 Richard Biener richard.guent...@gmail.com: On Tue, Jun 3, 2014 at 1:36 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-03 13:45 GMT+04:00 Richard Biener richard.guent...@gmail.com

Re: PR61385: phiopt drops some PHIs

2014-06-03 Thread Richard Biener
On Tue, Jun 3, 2014 at 3:48 PM, Marc Glisse marc.gli...@inria.fr wrote: Hello, apparently it is possible to have a PHI in the middle basic block of value_replacement, so I need to move it as well when I move the statement and remove the block. Bootstrap and testsuite on x86_64-linux-gnu

Re: Eliminate write-only variables

2014-06-04 Thread Richard Biener
On Tue, Jun 3, 2014 at 6:19 PM, Jan Hubicka hubi...@ucw.cz wrote: On Mon, Jun 2, 2014 at 8:59 PM, Jan Hubicka hubi...@ucw.cz wrote: Yeah, I discussed this with martin today on irc. For aliasing we'd like to know whether a decl possibly has its address taken. Currently we only trust

Re: [PATCH] Fix PR61306: improve handling of sign and cast in bswap

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 7:59 AM, Thomas Preud'homme thomas.preudho...@arm.com wrote: When bswap replace a bitwise expression involving a memory source by a load possibly followed by a bswap, it is possible that the load has a size smaller than that of the target expression where the bitwise

Re: [PATCH] Fix PR61320: disable bswap for unaligned access on SLOW_UNALIGNED_ACCESS targets

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 8:07 AM, Thomas Preud'homme thomas.preudho...@arm.com wrote: Hi there, It seems from PR61320 that the bswap pass causes some problems when it replaces an OR expression by an unaligned access. Although it's not clear yet why the unaligned load does not go through the

Re: [PATCH, i386, Pointer Bounds Checker 10/x] Partitions

2014-06-04 Thread Richard Biener
On Tue, Jun 3, 2014 at 11:24 PM, Jeff Law l...@redhat.com wrote: On 06/02/14 05:41, Richard Biener wrote: this should be all moved to the symbol table level. (and IDENTIFIER_NODE shouldn't have to have tree_common.chain and thus become smaller). Which ought to be independent of the pointer

Re: [PATCH] Fix PR54733 Optimize endian independent load/store

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 9:04 AM, Thomas Preud'homme thomas.preudho...@arm.com wrote: From: Christophe Lyon [mailto:christophe.l...@linaro.org] On 29 May 2014 11:58, Thomas Preud'homme thomas.preudho...@arm.com wrote: Does the patch solve the problem you had? What about you Christophe?

Re: [PATCH, Pointer Bounds Checker 6/x] New static constructor types

2014-06-04 Thread Richard Biener
On Wed, Apr 16, 2014 at 2:33 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch add new static constructor types used by Pointer Bounds Checker. It was approved earlier for 4.9 and I'll assume patch is OK for trunk if no objections arise. Patch was bootstrapped and tested for

Re: [PATCH, Pointer Bounds Checker 13/x] Early versioning

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 8:46 AM, Jeff Law l...@redhat.com wrote: On 06/03/14 03:29, Richard Biener wrote: On Tue, Jun 3, 2014 at 7:55 AM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-02 21:27 GMT+04:00 Jeff Law l...@redhat.com: On 06/02/14 04:48, Ilya Enkovich wrote: Hmm, so if I

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 9:59 AM, Jeff Law l...@redhat.com wrote: On 06/04/14 01:46, Marc Glisse wrote: On Tue, 3 Jun 2014, Jeff Law wrote: On 06/03/14 08:08, Richard Biener wrote: All arguments get the same value (and the PHI in middle-bb is surely a singleton?), so it's way better to re

[PATCH][1/2] Improve DSE

2014-06-04 Thread Richard Biener
This first patch improves DSE by improving the handling of references with non-invariant addresses such as a-b[i].c in stmt_kills_ref_p_1. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2014-06-04 Richard Biener rguent...@suse.de * tree-ssa-alias.c

[PATCH][2/2] Improve DSE

2014-06-04 Thread Richard Biener
, but the walking is limited thus it's O(1) anyway (haha)). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2014-06-04 Richard Biener rguent...@suse.de PR tree-optimization/60098 * tree-ssa-dse.c (dse_possible_dead_store_p): Walk until we hit a kill

Re: [PATCH] Fix PR61306: improve handling of sign and cast in bswap

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 12:42 PM, Thomas Preud'homme thomas.preudho...@arm.com wrote: From: Richard Biener [mailto:richard.guent...@gmail.com] I'd rather change the comparisons - if (n-size (int)sizeof (int64_t)) -n-n = ((uint64_t)1 (n-size * BITS_PER_UNIT)) - 1; + if (bitsize

Re: [PATCH] Fix PR61306: improve handling of sign and cast in bswap

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 1:15 PM, Thomas Preud'homme thomas.preudho...@arm.com wrote: From: Richard Biener [mailto:richard.guent...@gmail.com] Err, but if you zero-extend directly to the target type you have the correct result, too. Yep but in some case we need sign extend (32 bit bitwise

Re: PR61385: phiopt drops some PHIs

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 1:20 PM, Marc Glisse marc.gli...@inria.fr wrote: On Wed, 4 Jun 2014, Richard Biener wrote: So I'd say we should instead simply bail out if the middle-bb has a PHI node. Sounds good to me, so I am testing the mini-patch I had originally posted to bugzilla: Ok

[PATCH][match-and-simplify] Restore bootstrap somewhat

2014-06-04 Thread Richard Biener
The following patche is necessary to get to stage2 target library building. Bootstrapped until that point, applied. Richard. 2014-06-04 Richard Biener rguent...@suse.de * genmatch.c (error_cb, fatal_at): Annotate with printf format attribute to silence warning

[PATCH][match-and-simplify] Fix cutpaste error

2014-06-04 Thread Richard Biener
Committed. Hopefully that restores bootstrap ... Richard. 2014-06-04 Richard Biener rguent...@suse.de * gimple-match-head.c (gimple_match_and_simplify): Fix cutpaste error. Index: gcc/gimple-match-head.c

Re: [patch, mips, tree] align microMIPS functions to 16 bits with -Os

2014-06-04 Thread Richard Biener
On Tue, 3 Jun 2014, Richard Sandiford wrote: Sandra Loosemore san...@codesourcery.com writes: Catherine included an earlier version of this patch with the microMIPS submission a couple years ago: https://gcc.gnu.org/ml/gcc-patches/2012-07/msg00972.html Richard's response was:

Re: [PATCH, Pointer Bounds Checker 6/x] New static constructor types

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 3:13 PM, Ilya Enkovich enkovich@gmail.com wrote: 2014-06-04 13:58 GMT+04:00 Richard Biener richard.guent...@gmail.com: On Wed, Apr 16, 2014 at 2:33 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch add new static constructor types used by Pointer

Re: [PATCH, PR 61391]

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 3:17 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi All, Here is a simple fix for 61391 - missed a check that statement basic block is inside loop. With this fix test-case from bug is compiled successfully. Bootstrap and regression testing did not show any new

Re: [PATCH, PR 61391]

2014-06-04 Thread Richard Biener
On Wed, Jun 4, 2014 at 3:37 PM, Richard Biener richard.guent...@gmail.com wrote: On Wed, Jun 4, 2014 at 3:17 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi All, Here is a simple fix for 61391 - missed a check that statement basic block is inside loop. With this fix test-case from bug

<    6   7   8   9   10   11   12   13   14   15   >