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't try

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

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.

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_CODE

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 (fndecl

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

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

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

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 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

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

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

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

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

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?

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 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

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

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

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

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: 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

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

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 ()) - return real_compare (GT_EXPR, , ) + return

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: 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

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 <bschm...@redhat.com> 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_CS

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] 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. *

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

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

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: [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

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

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.

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: [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

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.

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

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

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: [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: [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

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: [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

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-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 code less

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] 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 need

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.

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

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

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 time er

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] 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

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 workong on the gomp4

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)? Eh

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 shoul

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

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 like "s

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

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

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't you

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

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

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

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

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

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 redundant

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: [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 '-' */ +

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: [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/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: [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: 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

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

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

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: *

Re: [PATCH] New attribute to create target clones

2015-09-22 Thread Bernd Schmidt
On 09/22/2015 09:41 PM, Jeff Law wrote: Essentially it allows us to more easily support per-microarchitecture-optimized versions of functions. You list just have to list the microarchitectures and the compiler handles the rest. Very simple, very easy. I'd think it'd be particularly helpful

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

Re: ifcvt vs. expand_binop

2015-09-22 Thread Bernd Schmidt
On 09/22/2015 03:35 PM, Oleg Endo wrote: On SH, the result of comparisons etc. is stored in the T_REG. It's a 1 bit reg but described as SImode. To get the T_REG into another reg, there's this insn: (define_insn "movt" [(set (match_operand:SI 0 "arith_reg_dest" "=r")

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

2015-09-22 Thread Bernd Schmidt
On 09/22/2015 09:19 AM, Tom de Vries wrote: These two patches: - https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00938.html - https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00940.html add a param parloop-schedule=. The problem I have when trying to review them

Re: [PATCH] shrink-wrap: Handle multiple predecessors of prologue

2015-09-22 Thread Bernd Schmidt
On 09/21/2015 04:01 PM, Segher Boessenkool wrote: On Mon, Sep 21, 2015 at 01:56:28PM +0200, Bernd Schmidt wrote: + basic_block new_bb = create_empty_bb (EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb); + BB_COPY_PARTITION (new_bb, pro); [...] + *entry_edge = make_single_succ_edge (new_bb,

Re: [PATCH] New attribute to create target clones

2015-09-21 Thread Bernd Schmidt
On 08/27/2015 01:18 PM, Evgeny Stupachenko wrote: Based on RFC: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01322.html The patch implement an extension to Function Multiversioning that allows to clone a function for multiple targets. __attribute__((target_clones("avx","arch=slm","default")))

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

2015-09-21 Thread Bernd Schmidt
On 09/18/2015 05:21 PM, Jiong Wang wrote: Current conditional compare (CCMP) support in GCC aim to optimize short circuit for cascade comparision, given a simple conditional compare candidate: if (a == 17 || a == 32) [...] The problem is current implementation always expand t0 first, then

Re: [PATCH] Fix -Wmisleading-indentation false-positive

2015-09-21 Thread Bernd Schmidt
On 09/21/2015 01:23 PM, Patrick Palka wrote: * c-indentation.c (should_warn_for_misleading_indentation): Float out and consolidate the calls to get_visual_column that is passed guard_exploc as an argument. Compare next_stmt_vis_column with guard_line_first_nws

Re: [PATCH] shrink-wrap: Handle multiple predecessors of prologue

2015-09-21 Thread Bernd Schmidt
We might not be able to redirect the jump from the block formerly the predecessor of PRO, to jump over the new block (it was not necessarily a fallthrough edge, could be EDGE_COMPLEX). In most cases we could do it of course. I would prefer not to add special case code (that is not as well

Re: [PATCH] shrink-wrap: Handle multiple predecessors of prologue

2015-09-21 Thread Bernd Schmidt
On 09/18/2015 05:36 PM, Segher Boessenkool wrote: { + while (pro != entry && !can_get_prologue (pro, prologue_clobbered)) + { + gcc_assert (pro != entry); Lose the assert, it's redundant with the loop condition. + basic_block new_bb = create_empty_bb

Re: Openacc launch API

2015-09-18 Thread Bernd Schmidt
On 09/17/2015 04:40 PM, Nathan Sidwell wrote: Added call to gomp_fatal, indicating libgomp is out of date. Also added a default to the switch following with the same effect. The trouble with implementing handling of device_type here now, is difficulty in testing its correctness. If it were

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

2015-09-18 Thread Bernd Schmidt
On 09/17/2015 04:38 PM, Robert Suchanek wrote: We came across a situation for MIPS64 where moves for sign-extension were not converted into a nop because of IRA spilled some of the allocnos and assigned different hard register for the output operand in the move. LRA is not fixing this up as most

Re: Openacc launch API

2015-09-17 Thread Bernd Schmidt
Since Jakub appears to be busy, I'll give my 2 cents. On 08/25/2015 03:29 PM, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill. I've had to

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 11:52 AM, Simon Dardis wrote: The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then

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

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 02:01 PM, Gerald Pfeifer wrote: On Sun, 13 Sep 2015, Mark Wielaard wrote: Slightly adjusted patch attached. Now it is explicit that the warning is enabled by -Wunused-variable for C, but not C++. There are testcases for both C and C++ to check the defaults. And the hardcoded

<    9   10   11   12   13   14   15   16   17   18   >