Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling

2015-09-22 Thread Bernd Schmidt
On 09/22/2015 02:02 PM, Thomas Schwinge wrote: gcc/ * gcc.c (handle_foffload_option): Don't lose the trailing NUL character when appending to offload_targets. gcc/ * configure.ac (offload_targets, OFFLOAD_TARGETS): Separate offload targets by comm

Re: [PATCH] Fix a -Wmisleading-indentation false-negative

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 03:37 AM, Patrick Palka wrote: gcc/c-family/ChangeLog: * c-indentation.c (should_warn_for_misleading_indentation): Compare next_stmt_vis_column with guard_line_first_nws instead of with guard_line_vis_column. gcc/testsuite/ChangeLog: * c-c++-commo

Re: [Patch/ccmp] Cost instruction sequences to choose better expand order

2015-09-23 Thread Bernd Schmidt
No. Please see NOTE part of the description. AArch64 doesn't cost ccmp currently. It will be fixed by a seperate patch later. The testcase is thus marked as XFAIL. I'd prefer to do things in the right order. Your patch is approved, but please commit only after you can remove the xfail from the

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 05:16 PM, Nathan Sidwell wrote: + if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time for +constant arguments. */ + { + oacc_xform_on_device (call); + rescan = true; +

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 05:11 PM, Marek Polacek wrote: diff --git gcc/c-family/c-ubsan.c gcc/c-family/c-ubsan.c index e0cce84..d2bc264 100644 --- gcc/c-family/c-ubsan.c +++ gcc/c-family/c-ubsan.c @@ -104,6 +104,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) } } t =

Re: [PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 08:08 PM, Manuel López-Ibáñez wrote: Use find_opt instead of linear search through options in handle_pragma_diagnostic (PR 49654) and reject non-warning options and options not valid for the current language (PR 49655). + /* option_string + 1 to skip the initial '-' */ + unsign

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 02:14 PM, Nathan Sidwell wrote: On 09/23/15 06:59, Bernd Schmidt wrote: On 09/22/2015 05:16 PM, Nathan Sidwell wrote: +if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time for + constant arguments

Re: Refactor omp_reduction_init: omp_reduction_init_op

2015-09-23 Thread Bernd Schmidt
gcc/ * omp-low.h (omp_reduction_init_op): Declare. * omp-low.c (omp_reduction_init_op): New, broken out of ... (omp_reduction_init): ... here. Call it. * tree-parloops.c (initialize_reductions): Use omp_reduction_init_op. That looks ok. Bernd

Re: [gomp4 0/8] NVPTX: initial OpenMP offloading

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 07:22 PM, Alexander Monakov wrote: This patch series implements some minimally required changes to have OpenMP offloading working for NVPTX target on the gomp4 branch. '#pragma omp target' and data updates should work, but all parallel execution functionality remains stubbed out (u

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 08:42 PM, Nathan Sidwell wrote: As I feared, builtin folding occurs in several places. In particular its first call is very early on in the host compiler, which is far too soon. We have to defer folding until we know whether we're doing host or device compilation. Doesn't somet

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 06:07 PM, Marek Polacek wrote: Given that the code above seems to be useless now, I think let's put this patch in as-is, backport it to gcc-5, then remove those redundant hunks on trunk and add the testcase above. Do you agree? Sounds reasonable. If you can find a point in the hi

Re: Openacc launch API

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 10:40 AM, Jakub Jelinek wrote: Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback anyway because of the incompatible PTX version, then why don't you just do goacc_save_and_set_bind (acc_device_host); fn (hostaddrs); goacc_restore_bind (); and nothing

Re: [PATCH 0/4] bb-reorder: Add the "simple" algorithm

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 12:06 AM, Segher Boessenkool wrote: The current basic block reordering always uses the "software trace cache" algorithm. That has a few problems: 1) It increases code size substantially; this makes it not suitable for -O1 or -Os, and not at all for some architectures; 2) but it is

Re: Openacc launch API

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 11:56 AM, Jakub Jelinek wrote: On Thu, Sep 24, 2015 at 11:50:56AM +0200, Bernd Schmidt wrote: On 09/24/2015 10:40 AM, Jakub Jelinek wrote: Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback anyway because of the incompatible PTX version, then why don'

Re: [PATCH 3/4] bb-reorder: Add -freorder-blocks-algorithm= and wire it up

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 12:06 AM, Segher Boessenkool wrote: This adds an -freorder-blocks-algorithm=[simple|stc] flag, with "simple" as default. For -O2 and up (except -Os) it is switched to "stc" instead. Targets that never want STC can override this. This changes -freorder-blocks to be on at -O1 and up

Re: [PATCH 2/4] bb-reorder: Add the "simple" algorithm

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 12:06 AM, Segher Boessenkool wrote: This is the meat of this series: a new algorithm to do basic block reordering. It uses the simple greedy approach to maximum weighted matching, where the weights are the predicted execution frequency of the edges. This always finds a solution th

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-09-24 Thread Bernd Schmidt
On 09/23/2015 04:48 PM, Dominik Vogt wrote: On Tue, Sep 22, 2015 at 01:56:15PM -0600, Jeff Law wrote: > Is there some good reason these aren't hooks? No, that was just inobservance. New version attached. Would it be preferrable to initialize the hooks with a NULL pointer and test the pointer b

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 01:53 PM, Mark Wielaard wrote: Even if there are such constructs in header files and they aren't actually bugs or people are unwilling to fix the issue with something that is more idiomatic C then there are various ways to suppress the warning. Either just don't use -Wunused-variabl

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 11:32 AM, Marek Polacek wrote: On Wed, Sep 23, 2015 at 08:55:53PM +0200, Bernd Schmidt wrote: On 09/23/2015 06:07 PM, Marek Polacek wrote: Given that the code above seems to be useless now, I think let's put this patch in as-is, backport it to gcc-5, then remove those redu

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 06:11 PM, Steve Ellcey wrote: At least one of the warnings in glibc is not justified (in my opinion). The header file timezone/private.h defines time_t_min and time_t_max. These are not used in any of the timezone files built by glibc but if you look at the complete tz package they

Re: New post-LTO OpenACC pass

2015-09-25 Thread Bernd Schmidt
On 09/25/2015 12:38 AM, Nathan Sidwell wrote: On 09/23/15 14:58, Nathan Sidwell wrote: On 09/23/15 14:51, Bernd Schmidt wrote: On 09/23/2015 08:42 PM, Nathan Sidwell wrote: We have to defer folding until we know whether we're doing host or device compilation. Doesn't something li

Re: New post-LTO OpenACC pass

2015-09-25 Thread Bernd Schmidt
On 09/25/2015 12:56 PM, Nathan Sidwell wrote: On 09/25/15 06:28, Bernd Schmidt wrote: Can you send me the patch you tried (and possibly a testcase you expect to be handled), I'll see if I can find out what's going on. Thanks! When things didn't work, I tried getting it worko

Re: New post-LTO OpenACC pass

2015-09-25 Thread Bernd Schmidt
On 09/25/2015 02:30 PM, Bernd Schmidt wrote: (gdb) p result $1 = (gdb) pge warning: Expression is not an assignment (and might have no effect) 2 == 4 || 2 == 5 I'm not really sure about the logic, but are the results maybe switched (returning false on the device and true on the host)?

Re: New post-LTO OpenACC pass

2015-09-25 Thread Bernd Schmidt
On 09/25/2015 03:03 PM, Bernd Schmidt wrote: 182 else if (acc_device_type (acc_dev->type) == acc_device_host) (gdb) p acc_dev->type $1 = OFFLOAD_TARGET_TYPE_HOST (gdb) next 184 fn (hostaddrs); It's not running the offloaded version, so the testcase I think should fail

Re: [PATCH] Disable -fno-reorder-blocks-and-partition if no -fprofile-use to avoid unnecessary overhead

2015-09-25 Thread Bernd Schmidt
On 09/24/2015 07:16 PM, Teresa Johnson wrote: This patch unsets -freorder-blocks-and-partition when -fprofile-use is not specified. Function splitting was not actually being performed in that case, as probably_never_executed_bb_p does not distinguish any basic blocks as being cold vs hot when the

Re: [PATCH] Disable -fno-reorder-blocks-and-partition if no -fprofile-use to avoid unnecessary overhead

2015-09-25 Thread Bernd Schmidt
On 09/25/2015 04:14 PM, Teresa Johnson wrote: Nothing has changed - splitting effectively never kicked in without a profile. Honza and I had discussed the idea that static profile heuristics could eventually be used to distinguish hot vs cold bbs, but that hasn't happened. What I didn't notice un

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-09-25 Thread Bernd Schmidt
On 09/24/2015 03:48 PM, Dominik Vogt wrote: Hm, I wonder whether wrapping all these section switches in assemble_start/end_function in ".machine" pseudoops (that's what we need the hooks for; similar to .arch for ix86) has any real effect. I don't think I follow what you're trying to say here?

Dead code in move_stmt_r

2015-09-25 Thread Bernd Schmidt
I noticed this a while ago while trying to defer parts of omp expansion until after LTO. move_tree_r, which is used when moving code into omp child functions, has code not to remap variables inside an OMP directive. However, by the time we get here, these directives should all have been expande

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 10:26 AM, Thomas Schwinge wrote: - objcopy_argv[8] = NULL; + objcopy_argv[objcopy_argc++] = NULL; + gcc_checking_assert (objcopy_argc <= OBJCOPY_ARGC_MAX); On its own this is not an improvement - you're trading a compile time error for a runtime error. So, what is the other ch

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 12:03 PM, Bernd Schmidt wrote: On 09/28/2015 10:26 AM, Thomas Schwinge wrote: - objcopy_argv[8] = NULL; + objcopy_argv[objcopy_argc++] = NULL; + gcc_checking_assert (objcopy_argc <= OBJCOPY_ARGC_MAX); On its own this is not an improvement - you're trading a compile ti

Re: Use gcc/coretypes.h:enum offload_abi in mkoffloads

2015-09-28 Thread Bernd Schmidt
Hi Thomas, Your patch submissions are sometimes very verbose which makes them hard to follow. commit de4d7cbcf979edc095a48dff5b38d12846bdab6f Author: Thomas Schwinge Date: Tue Aug 4 13:12:36 2015 +0200 Cut unnecessary information such as this. git headers are uninteresting. Use gc

Re: lto wrapper verboseness

2015-09-28 Thread Bernd Schmidt
We need to pass on the verbose flag. I once came up with the following patch (depends on "Refactor intelmic-mkoffload.c argv building", ); OK for trunk? /* Run objcopy. */ @@ -457,6 +465,8 @@

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 01:25 PM, Ilya Verbin wrote: On Mon, Sep 28, 2015 at 12:09:19 +0200, Bernd Schmidt wrote: On 09/28/2015 12:03 PM, Bernd Schmidt wrote: On 09/28/2015 10:26 AM, Thomas Schwinge wrote: - objcopy_argv[8] = NULL; + objcopy_argv[objcopy_argc++] = NULL; + gcc_checking_assert

Re: [PATCH GCC]Improve rtl loop inv cost by checking if the inv can be propagated to address uses

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 11:43 AM, Bin Cheng wrote: Bootstrap and test on x86_64 and x86_32. Will test it on aarch64. So any comments? Thanks, bin 2015-09-28 Bin Cheng * loop-invariant.c (struct def): New field cant_fwprop_to_addr_uses. (inv_cant_fwprop_to_addr_use): New function.

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 11:44 AM, Dominik Vogt wrote: On Fri, Sep 25, 2015 at 03:33:56PM +0200, Bernd Schmidt wrote: On 09/24/2015 03:48 PM, Dominik Vogt wrote: Hm, I wonder whether wrapping all these section switches in assemble_start/end_function in ".machine" pseudoops (that's what we

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 02:00 PM, Jakub Jelinek wrote: On Mon, Sep 28, 2015 at 01:27:32PM +0200, Bernd Schmidt wrote: I've removed obstack_ptr_grow for arrays with known sizes after this review: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02210.html That's unfortunate, I think that made the

Re: [PATCH] Remove restriction for remote testing

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 02:35 PM, James Norris wrote: The attached patch fixes a problem when doing remote testing. Specifically, testing of the atomic tests found in gcc/atomic. The code in atomic_init precludes the setting of the variable 'link_flags' when doing remote testing. The conditional test can b

Re: [RFC] Dump function attributes

2015-09-28 Thread Bernd Schmidt
On 09/28/2015 04:32 PM, Tom de Vries wrote: patch below prints the function attributes in the dump file. foo () [ noclone , noinline ] { ... Good idea? If so, do we want one attribute per line? Only for really long ones I'd think. Patch is ok for now. Bernd

Re: [PATCH 1/4] Add mkoffload for Intel MIC

2015-09-29 Thread Bernd Schmidt
On 09/29/2015 12:29 PM, Richard Biener wrote: I agree that obstacks are better here. Efficiency shouldn't matter here. But we're in C++ now so can't we statically construct the array with sth like const char *new_argv[] = { "objcopy", ... }; ? Thus have the compiler figure out the number of a

Re: [PATCH 2/4 v2] bb-reorder: Add the "simple" algorithm

2015-09-29 Thread Bernd Schmidt
On 09/25/2015 04:16 PM, Segher Boessenkool wrote: v2 changes: - Add a file header comment; - Use "for" loop initial declarations; - Handle asm goto. Testing this on x86_64-linux; okay if it succeeds? No objections from me. Let's give Steven another day or so to comment. Bernd

Re: Fold acc_on_device

2015-09-29 Thread Bernd Schmidt
On 09/29/2015 08:21 PM, Nathan Sidwell wrote: This patch folds acc_on_device as a regular builtin, but postponed until we know which compiler we're in. As suggested by Bernd, we use the existing builtin folding machinery. Trunk is still using the older PTX runtime scheme (Thomas is working on

Re: Fold acc_on_device

2015-09-30 Thread Bernd Schmidt
On 09/30/2015 02:18 PM, Nathan Sidwell wrote: On 09/30/15 04:07, Richard Biener wrote: Please don't add any new GENERIC based builtin folders. Instead add to gimple-fold.c:gimple_fold_builtin Otherwise you're just generating more work for us who move foldings from builtins.c to gimple-fold.c.

Re: Openacc launch API

2015-09-30 Thread Bernd Schmidt
On 09/30/2015 02:37 PM, Matthias Klose wrote: this broke the jit build. The following patch fixes the build for me. Ok to commit? Matthias 2015-09-30 Matthias Klose * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11. * jit-builti

Re: [RFA][PATCH] Fix building cr16-elf with trunk compiler

2015-09-30 Thread Bernd Schmidt
On 09/29/2015 11:49 PM, Jeff Law wrote: This code from builtins.c: /* If we don't need too much alignment, we'll have been guaranteed proper alignment by get_trampoline_type. */ if (TRAMPOLINE_ALIGNMENT <= STACK_BOUNDARY) return tramp; It's entirely conceivable that TRAMPOLI

Re: New OpenACC pass and Target Hook

2015-09-30 Thread Bernd Schmidt
On 09/29/2015 08:36 PM, Nathan Sidwell wrote: This patch implements an openacc device-specific lowering pass, and an openacc target hook for validating compute dimensions. The pass 'oaccdevlow' is inserted early after LTO readback. It is active for offloaded openacc functions, and openacc routi

Re: [PATCH] Fix default_binds_local_p_2 for extern protected data

2015-09-30 Thread Bernd Schmidt
On 09/17/2015 11:15 AM, Szabolcs Nagy wrote: ping 2. this patch is needed for working visibility ("protected") attribute for extern data on targets using default_binds_local_p_2. https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html I hesitate to review this one since I don't think I unders

Re: New OpenACC pass and Target Hook

2015-09-30 Thread Bernd Schmidt
For avoidance of doubt, is this approval, or 'LGTM, but needs Jakub's approval'? Go ahead and commit. Bernd

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 08:30 AM, Dominik Vogt wrote: However, you probably should add a sentence or two to the documentation to specify ordering wrt other parts of the header of a function. Any suggestions where that information should be placed in the documentation? Just in the hook definition. Be

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-01 Thread Bernd Schmidt
On 09/29/2015 04:31 PM, James Greenhalgh wrote: On the other side of the equation, we want a cost for the converted sequence. We can build a cost of the generated rtl sequence, but for targets like AArch64 this is going to be wildly off. AArch64 will expand (a > b) ? x : y; as a set to the CC reg

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread Bernd Schmidt
Do we have other ports with local labels in define_insns? I see some in darwin.md as well which your patch doesn't handle btw., otherwise suspicious %0: also appears (only) in h8300.md. arc.md also has a suspicious case in its doloop_end_i pattern. It is reasonably common, and defining cannot

Re: Add a build_real_truncate helper function

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 03:48 PM, Richard Sandiford wrote: ...which simplifies the match.pd patterns I'm about to add. Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Ok. Bernd

Re: Cache reals for 1/4, 1/6 and 1/9

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 03:51 PM, Richard Sandiford wrote: We have a global 1/2 and a cached 1/3, but recalculate 1/4, 1/6 and 1/9 each time we need them. That seems a bit arbitrary and makes the folding code more noisy (especially once it's moved to match.pd). This patch caches the other three constants

Re: [PATCH][RTL ifcvt] PR 67786, 67787: Check that intermediate instructions in the basic block don't clobber a reg used in condition

2015-10-01 Thread Bernd Schmidt
This patch fixes the two wrong-code PRs. The problem is related to the way the noce_emit_cmove helper function emits conditional moves. For some targets it re-emits the comparison from the condition block and then the conditional move after we have emitted the two basic blocks. Later passes always

Re: [PATCH] Introduce ROUND_UP and ROUND_DOWN macros

2015-10-02 Thread Bernd Schmidt
On 10/02/2015 06:42 PM, Uros Bizjak wrote: Attached patch introduces ROUND_UP and ROUND_DOWN global macros. These come handy to round and align various values, as shown by the usage in config/i386/ files. * system.h (ROUND_UP): New macro definition. (ROUND_DOWN): Ditto. * ggc-page

Re: RFC: Patch to allow spill slot alignment greater than the stack alignment

2015-10-05 Thread Bernd Schmidt
On 10/02/2015 10:57 PM, Steve Ellcey wrote: I have spent some time trying to do dynamic stack alignment on MIPS and had considerable trouble. The problems are mainly due to the dwarf based stack unwinding and setjmp/longjmp usages where the code does not go through the normal function prologue a

Re: [PATCH 0/4] gimple accessor const correctness fixes

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 02:25 AM, tbsaunde+...@tbsaunde.org wrote: the first patch is just some cleanup I ran into along the way, but the rest of this series fixes const correctness for all of the gimple_x_ptr () functions. I was able to just remove a couple of them, but unfortunately most ar needed for e

Re: using scratchpads to enhance RTL-level if-conversion: the new patch now passes bootstrap with the default BUILD_CONFIG [i.e. no stage2-to-stage3 comparison errors even with debugging info off in s

2015-10-05 Thread Bernd Schmidt
This is currently not really reviewable due to broken indentation, possibly due to whitespace damage from your mailer or not following coding guidelines. Please ensure your code is formatted the same way as all other code in gcc. I'll point out some of the problems, but please investigate ht

Re: [PR other/65021] mkoffloads -save-temps handling, and cleanup cleanup

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 12:04 PM, Thomas Schwinge wrote: In a similar vein to the earlier patch to "Pass on the verbose flag "-v" to/in the mkoffloads", here is a patch to make the mkoffloads handle "-save-temps", and this patch also happens to address , "nvptx mkoffload doesn'

Re: [PATCH] Remove restriction for remote testing

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 02:00 PM, James Norris wrote: Ping. As I said previously, I think appending "-latomic" unconditionally in atomic_init is probably a better solution because I'm not convinced that the things atomic_link_flags does are appropriate in a remote host situation. Bernd

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-05 Thread Bernd Schmidt
+ /* For aggregates compare only the size and mode. Accesses to fields do have + a type information by themselves and thus we only care if we can i.e. + use the types in move operations. */ else if (AGGREGATE_TYPE_P (inner_type) && TREE_CODE (inner_type) == TREE_CODE (out

Re: [patch 0/3] Header file reduction.

2015-10-05 Thread Bernd Schmidt
On 10/02/2015 04:22 AM, Andrew MacLeod wrote: The patches are generated by a pair of tools. * gcc-order-includes goes through the headers and canonically reorders some of our more common/troublesome headers and removes any duplicates. This includes headers which are included by other headers.

Re: Cache reals for 1/4, 1/6 and 1/9

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 04:47 PM, Richard Sandiford wrote: @@ -9536,7 +9520,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index) { r = TREE_REAL_CST (arg); if (real_isinf (&r)) - return real_compare (GT_EXPR, &r, &dconst0) +

Re: using scratchpads to enhance RTL-level if-conversion: the new patch now passes bootstrap with the default BUILD_CONFIG [i.e. no stage2-to-stage3 comparison errors even with debugging info off in s

2015-10-05 Thread Bernd Schmidt
Oh, one other thing. To be able to include your code we need to have a copyright assignment to the FSF from you. I see one previous commit from you, but only a trivial one and with a corporate email address. Have you gone through the copyright assignment process? Bernd

Re: Cache reals for 1/4, 1/6 and 1/9

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 05:22 PM, Richard Sandiford wrote: Bernd Schmidt writes: On 10/05/2015 04:47 PM, Richard Sandiford wrote: @@ -9536,7 +9520,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index) { r = TREE_REAL_CST (arg); if (real_isinf

Re: RFC: Patch to allow spill slot alignment greater than the stack alignment

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 06:46 PM, Steve Ellcey wrote: One example of an issue I have run into is with the DWARF unwind generation and 'Rule 16' in dwarf2cfi.c. It assumes the AND instruction has an integer constant argument but MIPS can't do an AND with a constant like -16 so it has to put it in a regist

Re: Cache reals for 1/4, 1/6 and 1/9

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 07:00 PM, Richard Sandiford wrote: If my original patch isn't acceptable, I thought I'd approved it. another old-school way of doing it would be to have a .def file of all the constants that we want. They could then all be global variables, rather than having some that are and

Re: [patch 0/3] Header file reduction.

2015-10-05 Thread Bernd Schmidt
On 10/05/2015 10:10 PM, Andrew MacLeod wrote: Its just an example of the sort of redundant includes the tool removes. And your assertion turns out to be incorrect... bitmap.h is barely used outside the backend, thus it is included in the backend.h aggregator (This is the only header now which inc

Re: [PING][PR67476] Add param parloops-schedule

2015-10-06 Thread Bernd Schmidt
On 10/04/2015 05:36 PM, Tom de Vries wrote: I'll try to give a bit of context: The omp-expand machinery is used in two contexts: 1. when omp annotations are added to the source. In that case, omp-expand is used in non-ssa gimple context. 2. when parloops annotates a loop with omp annotations

Re: [patch 4/3] Header file reduction - Tools for contrib

2015-10-06 Thread Bernd Schmidt
On 10/05/2015 11:18 PM, Andrew MacLeod wrote: Here's the patch to add all the tools to contrib/headers. Small patches should not be sent in compressed form, it makes reading and quoting them harder. This message is only intended to contain the patch in plain text so that I can quote it in fur

Re: [patch 4/3] Header file reduction - Tools for contrib

2015-10-06 Thread Bernd Schmidt
There are 9 tools I used over the run of the project. They were developed in various stages and iterations, but I tried to at least have some common interface things, and I tried some cleaning up and documentation. I'll probably have to make multiple passes over this. A disclaimer first, I h

Re: [PATCH 2/9] ENABLE_CHECKING refactoring: libcpp

2015-10-06 Thread Bernd Schmidt
I'm not entirely sure what to make of this series. There seem to be good bits in there but also some things I find questionable. I'll add some comments on things that occur to me. On 10/06/2015 01:28 AM, Mikhail Maltsev wrote: * include/line-map.h: Fix use of ENABLE_CHECKING. Fix ho

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 01:32 AM, Mikhail Maltsev wrote: gcc/ChangeLog: 2015-10-05 Mikhail Maltsev * alloc-pool.h (base_pool_allocator::initialize, ::allocate, ::remove): Adjust to use CHECKING_P. Why CHECKING_P for these and not flag_checking as elsewhere? Bernd

Re: [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 01:39 AM, Mikhail Maltsev wrote: void verify_insn_chain (void); +static inline void checking_verify_insn_chain (); static void fixup_fallthru_exit_predecessor (void); static int can_delete_note_p (const rtx_note *); static int can_delete_label_p (const rtx_code_label *); [.

Re: [PATCH 8/9] ENABLE_CHECKING refactoring: target-specific parts

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 01:40 AM, Mikhail Maltsev wrote: -#ifdef ENABLE_CHECKING +#if CHECKING_P /* Check that the addresses are consecutive. */ e = XEXP (SET_DEST (e), 0); if (GET_CODE (e) == PLUS) diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index a131053..e53fe6

Re: [PATCH] reorg.c: use vec instead of rtx_insn_list for the delay insn list

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 03:37 PM, tbsaunde+...@tbsaunde.org wrote: This seems a bit cleaner, and should involve less allocation. I agree this is good. rtx_insn_list should die. I tested there was no regressions for sh-sim with all languages accept ada,lto,fortran, ok? Could you please also build a fe

Re: [patch 4/3] Header file reduction - Tools for contrib

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 04:04 PM, Andrew MacLeod wrote: I primarily submitted it early because you wanted to look at the tools before the code patch, which is the one I care about since the longer it goes, the more effort it is to update the patch to mainline. The problem is that the generated patch is

Re: [PATCH] reorg.c: use vec instead of rtx_insn_list for the delay insn list

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 04:50 PM, Oleg Endo wrote: On Tue, 2015-10-06 at 15:59 +0200, Bernd Schmidt wrote: On 10/06/2015 03:37 PM, tbsaunde+...@tbsaunde.org wrote: This seems a bit cleaner, and should involve less allocation. I agree this is good. rtx_insn_list should die. I tested there was no

Re: RFC: Patch to allow spill slot alignment greater than the stack alignment

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 05:30 PM, Steve Ellcey wrote: On Mon, 2015-10-05 at 09:57 -0700, H.J. Lu wrote: The problem is understanding what the 'proper' unwind info is and figuring out what is wrong about it when it doesn't work. I used Bernd's comment about Rule #6 to handle the sp = sp AND reg issue, but

Re: [patch 4/3] Header file reduction - Tools for contrib

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 09:19 PM, Andrew MacLeod wrote: I dont get your fear. I could have created that patch by hand, it would just take a long time, and would likely be less complete, but just as large. I'm not changing functionality. ALL the tool is doing is removing header files which aren't needed

Re: RFC: Patch to allow spill slot alignment greater than the stack alignment

2015-10-06 Thread Bernd Schmidt
On 10/06/2015 08:02 PM, Steve Ellcey wrote: If I remove that and I change Rule #16 to handle an AND with a register I get odd looking .cfi stuff. The AND instruction (which is marked with RTX_FRAME_RELATED) seems to generate these cfi_escape macros: .cfi_escape 0x10,0x1f,0x2,0x8e,0x7c

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-07 Thread Bernd Schmidt
On 10/07/2015 09:04 AM, Christian Bruel wrote: + /* Similarly, relayout function's alignment if not forced. */ + if (!DECL_USER_ALIGN (fndecl) + && (TREE_CODE (fntype) != METHOD_TYPE + || TARGET_PTRMEMFUNC_VBIT_LOCATION != ptrmemfunc_vbit_in_pfn)) +

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-10-07 Thread Bernd Schmidt
On 10/07/2015 12:44 AM, Steve Ellcey wrote: So, is there any consensus on this issue? If I understood Jakub correctly he agreed with my reasoning. So for the moment we'll leave things as they are and revisit the issue if and when other cases pop up. I cannot build top-of-tree glibc with t

Re: PING: [PATCH] PR bootstrap/67385: READELF_FOR_TARGET isn't used in gcc configure

2015-10-07 Thread Bernd Schmidt
On Fri, Aug 28, 2015 at 8:50 AM, H.J. Lu wrote: Similar to as, ld, nm and objdump, gcc configure should check $READELF_FOR_TARGET for readelf. OK for trunk? H.J. --- PR bootstrap/67385 * configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET. * configure: Regenerat

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-07 Thread Bernd Schmidt
On 10/07/2015 12:45 PM, Christian Bruel wrote: On 10/07/2015 12:18 PM, Bernd Schmidt wrote: On 10/07/2015 09:04 AM, Christian Bruel wrote: + /* Similarly, relayout function's alignment if not forced. */ + if (!DECL_USER_ALIGN (fndecl) + && (TREE

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-07 Thread Bernd Schmidt
On 10/07/2015 07:37 PM, Bernd Schmidt wrote: On 10/07/2015 12:45 PM, Christian Bruel wrote: On 10/07/2015 12:18 PM, Bernd Schmidt wrote: On 10/07/2015 09:04 AM, Christian Bruel wrote: + /* Similarly, relayout function's alignment if not forced. */ + if (!DECL_USER_ALIGN (f

Re: [PATCH] A tweak for debug_ops_vector

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 10:57 AM, Marek Polacek wrote: I've been playing with reassoc recently and what bothers me is that dump_ops_vector doesn't print a newline after each element, so it prints e.g. "Op 0 -> rank: 5, tree: a_1(D)Op 1 -> rank: 4, tree: c_3(D)" which isn't really all that readable to me.

Re: [PATCH 9/9] Fix PR 66768

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 07:17 AM, Bin.Cheng wrote: On Thu, Oct 8, 2015 at 12:59 PM, Richard Henderson wrote: This is the patch that richi includes in the PR. There will need to be an additional patch to solve an ICE for the AVR backend, as noted in the PR, but this is good enough to solve the bad-code g

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 03:14 PM, Christian Bruel wrote: Probably at the time of start_decl, because DECL_ALIGN will have the boundary given by the global target_flags at that time. But this shouldn't be a problem since what matters is the DECL_ALIGN recomputed with the definition when there is something

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Bernd Schmidt
+ /* We must copy the insns between the start of the THEN block + and the set of 'a', if they exist, since they may be needed + for the converted code as well, but we must not copy a + start-of-BB note if one is present, nor debug "insn"s. */ + + for (rtx_insn* insn = BB_HEAD (then_bb); ins

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 01:29 AM, Abe wrote: Attached please find my revised patch to the RTL if converter. This patch enables the if-conversion of half-hammocks with a store in them that the internal GCC machinery otherwise considers too hazardous to if-convert. This is made safe by using the "scratchpa

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 04:01 PM, Christian Bruel wrote: OK, Similar pattern occurs at many other places, that changed also in the attached proposal. Not fully tested (in particular the java part) and no ChangeLog. Just to make sure that we agree on the interface first. That looks like a plain diff rath

Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 03:50 PM, Christian Bruel wrote: Humm, I don't know what kind of alignment optimization for functions we have based on a declaration only. greping DECL_ALIGN on functions there are some bits in the ipa-icf code that seems to merge code using this information, but I think we have a d

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Bernd Schmidt
On 10/07/2015 11:54 AM, Hurugalawadi, Naveen wrote: Move Fold X & (X ^ Y) as X & ~Y to match.pd. Move Fold X & (Y ^ X) as ~Y & X to match.pd. I wonder if we shouldn't try to autogenerate patterns such as these. I did something like that for a different project a long time ago.

Re: Move some bit and binary optimizations in simplify and match

2015-10-08 Thread Bernd Schmidt
On 10/08/2015 08:03 PM, Joseph Myers wrote: On Thu, 8 Oct 2015, Bernd Schmidt wrote: On 10/07/2015 11:54 AM, Hurugalawadi, Naveen wrote: Move Fold X & (X ^ Y) as X & ~Y to match.pd. Move Fold X & (Y ^ X) as ~Y & X to match.pd. I wonder if we shouldn'

Re: [nvptx] fix some c++ tests

2015-10-09 Thread Bernd Schmidt
On 10/09/2015 07:55 AM, Thomas Schwinge wrote: Hi Nathan! Thanks for looking into this. When I reported this, , quite a lot of testcases had been failing -- with recent GCC trunk, the number is smaller (because

Re: [PATCH] bb-reorder: Improve the simple algorithm for -Os (PR67864)

2015-10-09 Thread Bernd Schmidt
On 10/08/2015 06:57 PM, Segher Boessenkool wrote: As the PR points out, the "simple" reorder algorithm makes bigger code than the STC algorithm did, for -Os, for x86. I now tested it for many different targets and it turns out to be worse everywhere. That's somewhat disappointing. Wasn't it su

Re: [PATCH 1/9] Change default of non-overlapping address space conversion

2015-10-09 Thread Bernd Schmidt
On 10/08/2015 06:59 AM, Richard Henderson wrote: The current default of making all undefined coversions being set to null is not useful. It has caused all users to lie and say that spaces are subsets when they are not, just so that they can override the conversion. * expr.c (expand_exp

Re: [RFC][PATCH] Preferred rename register in regrename pass

2015-10-09 Thread Bernd Schmidt
Hi Robert, gcc/ * regrename.c (create_new_chain): Initialize terminated_dead, renamed and tied_chain. (find_best_rename_reg): Pick and check register from the tied chain. (regrename_do_replace): Mark head as renamed. (scan_rtx_reg): Tie chains in move insns

Re: PING: [PATCH] PR target/35514: Gcc shoud generate symbol type for undefined symbol

2015-10-09 Thread Bernd Schmidt
On 10/08/2015 01:10 PM, H.J. Lu wrote: On Wed, Jul 8, 2015 at 1:35 PM, H.J. Lu wrote: On Sun, Jul 5, 2015 at 2:54 PM, H.J. Lu wrote: On Sun, Jul 5, 2015 at 11:14 AM, H.J. Lu wrote: Update default_elf_asm_output_external to also output symbol type to help ELF linker to properly issue diagnos

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-09 Thread Bernd Schmidt
On 10/01/2015 11:37 AM, Bernd Schmidt wrote: On 09/29/2015 04:31 PM, James Greenhalgh wrote: On the other side of the equation, we want a cost for the converted sequence. We can build a cost of the generated rtl sequence, but for targets like AArch64 this is going to be wildly off. AArch64 will

<    1   2   3   4   5   6   7   8   9   10   >