Re: [PATCH] Do not instrument void variables with MPX (PR tree-opt/79987).

2017-08-10 Thread Ilya Enkovich
2017-08-10 10:40 GMT+03:00 Martin Liška : > Hello. > > In order to prevent the ICE, CHKP should not isntrument variables of void > type. Hi, There was another thread for this PR where I proposed a way to handle such vars via size relocations. But there was no feedback in that thread for two mont

Re: [PATCH] Fix UB in tree-chkp.c

2017-06-19 Thread Ilya Enkovich
2017-06-19 20:43 GMT+03:00 Jakub Jelinek : > Hi! > > bootstrap-ubsan shows a couple of: > ../../gcc/tree-chkp.c:694:37: runtime error: shift exponent 63 is too large > for 32-bit type 'int' > errors. > > 1 << (TYPE_PRECISION (ptr_type_node) - 1) > should have been obviously > HOST_WIDE_INT_1U << (

Re: Fix for PR79987

2017-06-09 Thread Ilya Enkovich
pecify that size anyways. What do you > think? I think declaring void var is similar to declaring static array with no size and we should handle these cases similarly. Thanks, Ilya > > Alexander > > > > 2017-05-11 20:37 GMT+02:00 Ilya Enkovich : >> 2017-05-11 0:05 GMT+0

Re: [PATCH] Fix mpx testcases (Re: [CHKP] Fix for PR79990)

2017-06-08 Thread Ilya Enkovich
2017-06-08 22:45 GMT+03:00 Jakub Jelinek : > On Tue, May 09, 2017 at 03:29:40PM +0200, Alexander Ivchenko wrote: >> 2017-05-09 Alexander Ivchenko >> >> * gcc.target/i386/mpx/hard-reg-2-lbv.c: New test. >> * gcc.target/i386/mpx/hard-reg-2-nov.c: New test. >> * gcc.target/i

Re: Fix for PR79987

2017-05-11 Thread Ilya Enkovich
xander > > 2017-05-10 22:51 GMT+02:00 Ilya Enkovich : >> 2017-05-10 22:08 GMT+03:00 Alexander Ivchenko : >>> Hi, >>> >>> something like that: >>> >>> diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c >>> inde

Re: [CHKP] Fix for PR79990

2017-05-10 Thread Ilya Enkovich
2017-05-09 16:29 GMT+03:00 Alexander Ivchenko : > Hi, > > Here is the latest version of the patch with all comments addressed: > > gcc/ChangeLog: > > 2017-05-09 Alexander Ivchenko > > * tree-chkp.c (chkp_get_hard_register_var_fake_base_address): > New function. > (chkp_get_hard_r

Re: [CHKP] Fix for PR79988

2017-04-20 Thread Ilya Enkovich
Hi, Please put comment to code explaining why you don't use gimple_call_builtin_p to avoid similar issues in the future. Also please follow Rainer's comments. OK with these fixes. Thanks, Ilya 2017-04-20 15:27 GMT+03:00 Rainer Orth : > Hi Alexander, > > just a couple of nits: > >> gcc/testsui

Re: [CHKP] Fix for PR79990

2017-04-20 Thread Ilya Enkovich
ibute__ ((vector_size (8))); > + > +struct S2 > +{ > + int* f[2]; > +}; > + > +int foo (int i, int *kp1) > +{ > + register struct S2 b asm ("xmm0"); > + int k2 = 5; > + > + b.f[0] = kp1; > + b.f[1] = &k2; > + > + b.f[0] = b.f[0] + i; > + return *

Re: [CHKP] Fix for PR79990

2017-04-10 Thread Ilya Enkovich
obj; > + > + /* If not - return regular ADDR_EXPR. */ >return TREE_CODE (obj) == TARGET_MEM_REF > ? tree_mem_ref_addr (ptr_type_node, obj) > : build_fold_addr_expr (obj); > @@ -3170,6 +3195,11 @@ chkp_get_bounds_for_decl_addr (tree decl) >gcc_assert

Re: Fix for PR79987

2017-04-08 Thread Ilya Enkovich
2017-04-04 18:34 GMT+03:00 Jeff Law : > On 04/04/2017 09:07 AM, Alexander Ivchenko wrote: >> >> Hi, >> >> When creating static bounds for foo below we end up with: >> >> *((unsigned long *) &__chkp_bounds_of_foo + 8) = >> ~(__builtin_ia32_sizeof (foo) + ((long unsigned int) &foo + >> 18446744073709

Re: [CHKP] Fix for PR79990

2017-03-23 Thread Ilya Enkovich
2017-03-23 17:18 GMT+03:00 Alexander Ivchenko : > Hi, > > The patch below attempts to fix the PR. I checked that it did not > break any of mpx.exp tests, but I did not run the full testing yet. > Would like to know whether this approach is generally correct or not. > > The issue is that we have the

Re: [PATCH] MPX: fix PR middle-end/79753

2017-03-15 Thread Ilya Enkovich
2017-03-15 20:09 GMT+03:00 Jeff Law : > On 03/15/2017 04:15 AM, Martin Liška wrote: >> >> On 03/14/2017 11:27 PM, Ilya Enkovich wrote: >>> >>> 2017-03-10 16:15 GMT+03:00 Martin Liška : >>>> >>>> Hello. >>>> >>>> C

Re: [PATCH] MPX: fix PR middle-end/79753

2017-03-15 Thread Ilya Enkovich
2017-03-15 13:15 GMT+03:00 Martin Liška : > On 03/14/2017 11:27 PM, Ilya Enkovich wrote: >> >> 2017-03-10 16:15 GMT+03:00 Martin Liška : >>> >>> Hello. >>> >>> Currently, __builtin_ia32_bndret is used for all functions that have >>>

Re: [PATCH 1/5] Fix *_CST ICEs connected to MPX.

2017-03-14 Thread Ilya Enkovich
2017-03-13 16:33 GMT+03:00 Martin Liška : > On 03/13/2017 02:07 PM, Richard Biener wrote: >> No, that can't happen. I said that for example for >> >> struct S { ... } s; >> foo (s); >> >> pass_by_reference may be true but on gimple you see a struct s as >> actual argument. I'm not sure >> what ch

Re: [PATCH] MPX: fix PR middle-end/79753

2017-03-14 Thread Ilya Enkovich
2017-03-10 16:15 GMT+03:00 Martin Liška : > Hello. > > Currently, __builtin_ia32_bndret is used for all functions that have non-void > return type. I think the right fix is to return bounds just for a bounded > type. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Re

Re: PR78631 fix

2016-12-23 Thread Ilya Enkovich
Hi, ChangeLog? Otherwise OK. Ilya 2016-12-23 14:02 GMT+03:00 Alexander Ivchenko : > Hi Ilya, > > Would that patch be OK to submit? (it is HJ's one with added testcase) > > diff --git a/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c > b/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c > new file mode 1

Re: Pointer Bounds Checker and trailing arrays (PR68270)

2016-12-21 Thread Ilya Enkovich
TREE_CODE(TREE_TYPE(field)) == ARRAY_TYPE > + && !DECL_CHAIN (field)) > && (!DECL_FIELD_OFFSET (field) > || TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST) > && (!DECL_FIELD_BIT_OFFSET (field) OK. > > 2016-12-21 21:00 GMT+03:00 Ilya Enkovich : >> 2016-1

Re: Pointer Bounds Checker and trailing arrays (PR68270)

2016-12-21 Thread Ilya Enkovich
2016-12-20 17:44 GMT+03:00 Alexander Ivchenko : > 2016-11-26 0:28 GMT+03:00 Ilya Enkovich : >> 2016-11-25 15:47 GMT+03:00 Alexander Ivchenko : >>> Hi, >>> >>> The patch below addresses PR68270. could you please take a look? >>> >>> 2016-11-25

Re: Calling 'abort' on bounds violations in libmpx

2016-12-08 Thread Ilya Enkovich
> --- a/libmpx/mpxrt/mpxrt.c > +++ b/libmpx/mpxrt/mpxrt.c > @@ -252,7 +252,7 @@ handler (int sig __attribute__ ((unused)), >uctxt->uc_mcontext.gregs[REG_IP_IDX] = > (greg_t)get_next_inst_ip ((uint8_t *)ip); >if (__mpxrt_mode () == MPX_RT_STOP) > -exit (255)

Re: Calling 'abort' on bounds violations in libmpx

2016-11-29 Thread Ilya Enkovich
2016-11-29 17:43 GMT+03:00 Alexander Ivchenko : > Hi, > > Attached patch is addressing PR67520. Would that approach work for the > problem? Should I also change the version of the library? Hi! Overall patch is OK. But you need to change version because you change default behavior. How did you tes

Re: Pointer Bounds Checker and trailing arrays (PR68270)

2016-11-25 Thread Ilya Enkovich
2016-11-25 15:47 GMT+03:00 Alexander Ivchenko : > Hi, > > The patch below addresses PR68270. could you please take a look? > > 2016-11-25 Alexander Ivchenko > >* c-family/c.opt (flag_chkp_flexible_struct_trailing_arrays): >Add new option. >* tree-chkp.c (chkp_parse_array_

Re: [MPX] Fix for PR77267

2016-09-05 Thread Ilya Enkovich
2016-09-05 12:56 GMT+03:00 Alexander Ivchenko : > Ok, thanks. The full updated patch is below. I also removed the > '--whole-archive' thing from -static-libmpxwrappers case. This version is OK for trunk with proper ChangeLog and after proper testing. > Would that be possible to backport that patc

Re: [MPX] Fix for PR77267

2016-08-31 Thread Ilya Enkovich
2016-08-31 16:37 GMT+03:00 Alexander Ivchenko : > 2016-08-31 12:18 GMT+03:00 Ilya Enkovich : >> 2016-08-30 21:53 GMT+03:00 Alexander Ivchenko : >>> Would something like that count? >>> >>> I did not do the warning thing, cause the problem only appears when >&

Re: [MPX] Fix for PR77267

2016-08-31 Thread Ilya Enkovich
no > +AC_MSG_CHECKING(linker --push-state/--pop-state options) > +if test x"$ld_is_gold" = xno; then > + if test $in_tree_ld = yes ; then > +if test "$gcc_cv_gld_major_version" -eq 2 -a > "$gcc_cv_gld_minor_version" -ge 25 -o "$gcc_cv_gld_major_version&quo

Re: [MPX] Fix for PR77267

2016-08-29 Thread Ilya Enkovich
2016-08-25 12:27 GMT+03:00 Alexander Ivchenko : > The attached patched fixes the usage of MPX in presence of > "-Wl,-as-needed" option. 'make checked' on MPX-enabled machine. > > "--push-state" and "--pop-state" are not supported by gold at the > moment. But that's OK because using MPX with gold on

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-08-01 Thread Ilya Enkovich
2016-07-26 18:38 GMT+03:00 Ilya Enkovich : > 2016-07-26 18:26 GMT+03:00 Jeff Law : >> On 07/26/2016 03:57 AM, Ilya Enkovich wrote: >>>> >>>> >>>> Ilya, what's the fundamental reason why we need to run >>>> if-conversion again?

Re: [PATCH] Remove special streaming of builtins

2016-07-27 Thread Ilya Enkovich
2016-07-26 22:52 GMT+03:00 Richard Biener : > On July 26, 2016 7:26:46 PM GMT+02:00, "H.J. Lu" wrote: >>On Mon, Jul 25, 2016 at 4:35 AM, Richard Biener >>wrote: >>> >>> So I needed to fix that builtins appearing in BLOCK_VARs and the >>solution >>> I came up with accidentially disabled streaming

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-26 Thread Ilya Enkovich
2016-07-26 18:26 GMT+03:00 Jeff Law : > On 07/26/2016 03:57 AM, Ilya Enkovich wrote: >>> >>> >>> Ilya, what's the fundamental reason why we need to run >>> if-conversion again? Yes, I know you want to if-convert the >>> epilogue, but w

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-26 Thread Ilya Enkovich
2016-07-26 14:51 GMT+03:00 Richard Biener : > On Tue, Jul 26, 2016 at 11:57 AM, Ilya Enkovich > wrote: >> 2016-07-26 0:08 GMT+03:00 Jeff Law : >>> On 07/25/2016 12:32 PM, Richard Biener wrote: >>>> >>>> On July 25, 2016 8:01:17 PM GMT+02:00, Jeff L

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-26 Thread Ilya Enkovich
2016-07-26 0:08 GMT+03:00 Jeff Law : > On 07/25/2016 12:32 PM, Richard Biener wrote: >> >> On July 25, 2016 8:01:17 PM GMT+02:00, Jeff Law wrote: >>> >>> On 07/22/2016 05:36 AM, Richard Biener wrote: The thing that needs work I think is re-running of if-conversion. >>> >>> I wonder if we

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-21 Thread Ilya Enkovich
In my list I see #1, #4, and #5 are not approved. Thanks, Ilya 2016-07-20 19:24 GMT+03:00 Jeff Law : > On 07/20/2016 08:37 AM, Ilya Enkovich wrote: > >> Here is an updated version. >> >> Thanks, >> Ilya >> -- >> gcc/ >> >> 2016-07-20 Ilya En

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-20 Thread Ilya Enkovich
On 14 Jul 16:04, Jeff Law wrote: > On 06/28/2016 06:24 AM, Ilya Enkovich wrote: > > > > >Here is an updated patch version. > > > >Thanks, > >Ilya > >-- > >gcc/ > > > >+/* Function vect_gen_loop_masks. > >+ > >+ Create

Re: [PATCH, vec-tails 10/10] Tests

2016-07-15 Thread Ilya Enkovich
2016-07-14 20:32 GMT+03:00 Jeff Law : > On 07/05/2016 09:44 AM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds several tests to check tails vectorization functionality. >> >> Thanks, >> Ilya >> -- >> gcc/testsuite/ >> >>

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-28 15:24 GMT+03:00 Ilya Enkovich : > On 16 Jun 10:54, Jeff Law wrote: >> On 05/19/2016 01:44 PM, Ilya Enkovich wrote: >> >Hi, >> > >> >This patch introduces support for loop epilogue combining. This includes >> >support in cost estimat

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-23 12:54 GMT+03:00 Ilya Enkovich : > On 22 Jun 11:42, Jeff Law wrote: >> On 06/22/2016 10:09 AM, Ilya Enkovich wrote: >> >> >>Given the common structure & duplication I can't help but wonder if a >> >>single >> >>function

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-24 10:40 GMT+03:00 Ilya Enkovich : > On 17 Jun 10:46, Jeff Law wrote: >> On 06/17/2016 08:33 AM, Ilya Enkovich wrote: >> >> >> >>Hmm, there seems to be a level of indirection I'm missing here. We're >> >>smuggling LOOP_VINF

Re: [PATCH, vec-tails 08/10] Support loop epilogue masking and low trip count loop vectorization

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-24 14:46 GMT+03:00 Ilya Enkovich : > On 16 Jun 18:52, Ilya Enkovich wrote: >> 2016-06-15 15:00 GMT+03:00 Richard Biener : >> > On Thu, May 19, 2016 at 9:46 PM, Ilya Enkovich >> > wrote: >> >> Hi, >> >> >> >> This p

Re: [PATCH, vec-tails 04/10] Add masking cost

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-22 17:13 GMT+03:00 Ilya Enkovich : > On 16 Jun 00:16, Jeff Law wrote: >> On 05/19/2016 01:40 PM, Ilya Enkovich wrote: >> >Hi, >> > >> >This patch extends vectorizer cost model to include masking cost by >> >adding new cost model locatio

Re: [PATCH, vec-tails 01/10] New compiler options

2016-07-11 Thread Ilya Enkovich
Ping 2016-06-16 16:42 GMT+03:00 Ilya Enkovich : > On 20 May 14:40, Ilya Enkovich wrote: >> > Can you make all these --params then? I think to be useful to users we'd >> > want >> > them to be loop pragmas rather than options. >> >> OK, I'll ch

[PATCH, PR ipa/71633] Fix inlining into thunks

2016-07-11 Thread Ilya Enkovich
? Thanks, Ilya -- gcc/ 2016-07-11 Ilya Enkovich PR ipa/71633 * ipa-inline-transform.c (inline_call): Support instrumented thunks. gcc/testsuite/ 2016-07-11 Ilya Enkovich PR ipa/71633 * g++.dg/pr71633.C: New test. diff --git a/gcc/ipa-inline

[PATCH, vec-tails 10/10] Tests

2016-07-05 Thread Ilya Enkovich
Hi, This patch adds several tests to check tails vectorization functionality. Thanks, Ilya -- gcc/testsuite/ 2016-07-05 Ilya Enkovich * lib/target-supports.exp (check_avx2_hw_available): New. (check_effective_target_avx2_runtime): New. * gcc.dg/vect/vect-tail-combine

Re: [PING] Re: [PATCH] Fix MPX tests on systems with MPX disabled

2016-07-05 Thread Ilya Enkovich
2016-07-04 22:58 GMT+03:00 Andi Kleen : > Andi Kleen writes: > > PING! > >> From: Andi Kleen >> >> I have a Skylake system with MPX in the CPU, but MPX is disabled >> in the kernel configuration. >> >> This makes all the MPX tests fail because they assume if MPX >> is in CPUID it works >> >> Chec

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-06-28 Thread Ilya Enkovich
On 28 Jun 15:24, Ilya Enkovich wrote: > On 16 Jun 10:54, Jeff Law wrote: > > > > I don't see anything particularly worrisome here either -- I have a slight > > concern about correctness issues with only masking loads/stores and > > reductions. But I will defer to

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-28 Thread Ilya Enkovich
On 23 Jun 12:54, Ilya Enkovich wrote: > > Here is an updated version with less typos and more comments. > > Thanks, > Ilya > -- Here is an updated version with trapping statements check added to vect_analyze_stmt. Thanks, Ilya -- gcc/ 2016-06-28 Ilya Enkovich

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-06-28 Thread Ilya Enkovich
On 16 Jun 10:54, Jeff Law wrote: > On 05/19/2016 01:44 PM, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces support for loop epilogue combining. This includes > >support in cost estimation and all required changes required to mask > >vectorized loop. &g

[PATCH, PR tree-optimization/71655] Fix LE and LT masks comparison cases

2016-06-28 Thread Ilya Enkovich
Hi, Currently we use operands swap when compare masks using LT and LE codes. Operands swap misses swap for their definition types and this patch fixes it. Testing is in progress. OK for trunk if pass? Thanks, Ilya -- gcc/ 2016-06-28 Ilya Enkovich * tree-vect-stmts.c

Re: [PATCH, PR middle-end/71488] Fix vectorization of comparison of booleans

2016-06-27 Thread Ilya Enkovich
Looks like it caused PR71655 and therefore is not so safe :/ Ilya 2016-06-22 17:00 GMT+03:00 Ilya Enkovich : > 2016-06-21 23:57 GMT+03:00 Jeff Law : >> On 06/16/2016 05:06 AM, Ilya Enkovich wrote: >>> >>> Hi, >>> >>> This patch fixes incorrect c

[PATCH, obvious] Update comments for several vectorizator functions

2016-06-27 Thread Ilya Enkovich
Hi, This patch adds args description for some vectorizer functions. I'm going to commit it to trunk. Thanks, Ilya -- gcc/ 2016-06-27 Ilya Enkovich * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update comment. (vect_update_inits_of_drs): Lik

[PATCH, CHKP, PR ipa/71624] Fix local.can_change_signature computation for instrumentation thunk callees

2016-06-27 Thread Ilya Enkovich
016-06-27 Ilya Enkovich * ipa-inline-analysis.c (compute_inline_parameters): Set local.can_change_signature to false for intrumentation thunk callees. gcc/testsuite/ 2016-06-27 Ilya Enkovich * g++.dg/pr71624.C: New test. diff --git a/gcc/ipa-inline-analysis.c b

Re: [PATCH, vec-tails 08/10] Support loop epilogue masking and low trip count loop vectorization

2016-06-24 Thread Ilya Enkovich
On 16 Jun 18:52, Ilya Enkovich wrote: > 2016-06-15 15:00 GMT+03:00 Richard Biener : > > On Thu, May 19, 2016 at 9:46 PM, Ilya Enkovich > > wrote: > >> Hi, > >> > >> This patch enables vectorization of loop epilogues and low trip count > >> lo

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-24 Thread Ilya Enkovich
On 17 Jun 10:46, Jeff Law wrote: > On 06/17/2016 08:33 AM, Ilya Enkovich wrote: > >> > >>Hmm, there seems to be a level of indirection I'm missing here. We're > >>smuggling LOOP_VINFO_ORIG_LOOP_INFO around in loop->aux. Ewww. I thought > >>

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-23 Thread Ilya Enkovich
On 22 Jun 11:42, Jeff Law wrote: > On 06/22/2016 10:09 AM, Ilya Enkovich wrote: > > >>Given the common structure & duplication I can't help but wonder if a single > >>function should be used for widening/narrowing. Ultimately can't you swap > >>

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Ilya Enkovich
2016-06-16 10:08 GMT+03:00 Jeff Law : > On 05/19/2016 01:42 PM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch introduces analysis to determine if loop can be masked >> (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) >> and compute how mu

Re: [PATCH, vec-tails 05/10] Check if loop can be masked

2016-06-22 Thread Ilya Enkovich
2016-06-16 9:26 GMT+03:00 Jeff Law : > On 06/15/2016 05:22 AM, Richard Biener wrote: >> >> >> You look at TREE_TYPE of LOOP_VINFO_NITERS (loop_vinfo) - I don't think >> this is meaningful (if then only by accident). I think you should look at >> the >> control IV itself, possibly it's value-range,

Re: [PATCH, vec-tails 04/10] Add masking cost

2016-06-22 Thread Ilya Enkovich
On 16 Jun 00:16, Jeff Law wrote: > On 05/19/2016 01:40 PM, Ilya Enkovich wrote: > >Hi, > > > >This patch extends vectorizer cost model to include masking cost by > >adding new cost model locations and new target hook to compute > >masking cost. > > > >

Re: [PATCH, PR middle-end/71488] Fix vectorization of comparison of booleans

2016-06-22 Thread Ilya Enkovich
2016-06-21 23:57 GMT+03:00 Jeff Law : > On 06/16/2016 05:06 AM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch fixes incorrect comparison vectorization for booleans. >> The problem is that regular comparison which works for scalars >> doesn

Re: [PATCH] PR target/71549: Convert V1TImode register to TImode in debug insn

2016-06-21 Thread Ilya Enkovich
2016-06-21 15:48 GMT+03:00 H.J. Lu : > On Mon, Jun 20, 2016 at 11:53 AM, H.J. Lu wrote: >> On Mon, Jun 20, 2016 at 10:31 AM, Ilya Enkovich >> wrote: >>> On 20 Jun 09:45, H.J. Lu wrote: >>>> On Mon, Jun 20, 2016 at 7:30 AM, Ilya Enkovich >>>&g

Re: [PATCH] PR target/71549: Convert V1TImode register to TImode in debug insn

2016-06-20 Thread Ilya Enkovich
On 20 Jun 09:45, H.J. Lu wrote: > On Mon, Jun 20, 2016 at 7:30 AM, Ilya Enkovich wrote: > > 2016-06-20 16:39 GMT+03:00 Uros Bizjak : > >> On Mon, Jun 20, 2016 at 1:55 PM, H.J. Lu wrote: > >>> TImode register referenced in debug insn can be converted to V1TI

Re: [PATCH] PR target/71549: Convert V1TImode register to TImode in debug insn

2016-06-20 Thread Ilya Enkovich
2016-06-20 16:39 GMT+03:00 Uros Bizjak : > On Mon, Jun 20, 2016 at 1:55 PM, H.J. Lu wrote: >> TImode register referenced in debug insn can be converted to V1TImode >> by scalar to vector optimization. We need to convert a debug insn if >> it has a variable in a TImode register. >> >> Tested on x8

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-17 Thread Ilya Enkovich
2016-06-17 17:48 GMT+03:00 Bin.Cheng : > On Fri, Jun 17, 2016 at 3:33 PM, Ilya Enkovich wrote: >> 2016-06-16 9:00 GMT+03:00 Jeff Law : >>> On 05/19/2016 01:39 PM, Ilya Enkovich wrote: >>>> >>>> Hi, >>>> >>>> This patch introduces c

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-17 Thread Ilya Enkovich
2016-06-16 9:00 GMT+03:00 Jeff Law : > On 05/19/2016 01:39 PM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch introduces changes required to run vectorizer on loop epilogue. >> This also enables epilogue vectorization using a vector of smaller size. >> >

Re: [PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-06-17 Thread Ilya Enkovich
2016-06-16 8:22 GMT+03:00 Jeff Law : > On 06/15/2016 05:03 AM, Richard Biener wrote: >> >> On Thu, May 19, 2016 at 9:39 PM, Ilya Enkovich >> wrote: >>> >>> Hi, >>> >>> This patch introduces changes required to run vectorizer on loop >&

Re: [PATCH, vec-tails 01/10] New compiler options

2016-06-17 Thread Ilya Enkovich
2016-06-16 8:06 GMT+03:00 Jeff Law : > On 05/20/2016 05:40 AM, Ilya Enkovich wrote: >> >> 2016-05-20 14:17 GMT+03:00 Richard Biener : >>> >>> On Fri, May 20, 2016 at 11:50 AM, Ilya Enkovich >>> wrote: >>>> >>>> 2016-05-20 12:26 G

Re: [PATCH, vec-tails 02/10] Extend _loop_vec_info structure with epilogue related fields

2016-06-16 Thread Ilya Enkovich
2016-06-16 8:11 GMT+03:00 Jeff Law : > On 05/19/2016 01:38 PM, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds new fields to _loop_vec_info structure to support loop >> epilogue vectorization. >> >> Thanks, >> Ilya >> -- >&

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-06-16 Thread Ilya Enkovich
2016-06-16 18:51 GMT+03:00 Jeff Law : > On 06/16/2016 09:41 AM, Ilya Enkovich wrote: >> >> 2016-06-15 14:44 GMT+03:00 Richard Biener : >>> >>> On Thu, May 19, 2016 at 9:44 PM, Ilya Enkovich >>> wrote: >>>> >>>> Hi, >>

Re: [PATCH, vec-tails 08/10] Support loop epilogue masking and low trip count loop vectorization

2016-06-16 Thread Ilya Enkovich
2016-06-15 15:00 GMT+03:00 Richard Biener : > On Thu, May 19, 2016 at 9:46 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch enables vectorization of loop epilogues and low trip count >> loops using masking. > > I wonder why we have the epilogue masking restricti

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-06-16 Thread Ilya Enkovich
2016-06-15 14:44 GMT+03:00 Richard Biener : > On Thu, May 19, 2016 at 9:44 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch introduces support for loop epilogue combining. This includes >> support in cost estimation and all required changes required to mask >>

Re: [PATCH, vec-tails 01/10] New compiler options

2016-06-16 Thread Ilya Enkovich
On 20 May 14:40, Ilya Enkovich wrote: > > Can you make all these --params then? I think to be useful to users we'd > > want > > them to be loop pragmas rather than options. > > OK, I'll change it to params. I didn't think about control via > pr

[PATCH, PR middle-end/71488] Fix vectorization of comparison of booleans

2016-06-16 Thread Ilya Enkovich
twise operations which work correctly for both vector and scalar masks. Bootstrapped and regtested on x86_64-unknown-linux-gnu. Is it OK for trunk? What should be done for gcc-6-branch? Port this patch or just restrict vectorization for comparison of booleans? Thanks, Ilya -- gcc/ 2016-06-15 Ilya Enk

[PATCH, CHKP, PR middle-end/71529] Fix DECL_CONTEXT for args of instrumentation clones with no body

2016-06-15 Thread Ilya Enkovich
ranch. Thanks, Ilya -- gcc/ 2016-06-15 Ilya Enkovich PR middle-end/71529 * ipa-chkp.c (chkp_build_instrumented_fndecl): Fix DECL_CONTEXT for copied arguments. gcc/testsuite/ 2016-06-15 Ilya Enkovich PR middle-end/71529 * gcc.target/i386/pr71529.C: New

[PATCH, libmpx] Fix overflow bug

2016-06-10 Thread Ilya Enkovich
Hi, Current bounds copy algorithm has a bug which causes overflow in a specific case when there are no bounds to copy. Patch was regtested and bootstrapped for x86_64-unknown-linux-gnu. I'm going to apply it to trunk and gcc-6-branch. Thanks, Ilya -- libmpx/ 2016-06-10 Ilya Enk

Re: [PATCH, vec-tails 01/10] New compiler options

2016-06-09 Thread Ilya Enkovich
Hi Richard, Do you have some comments on other parts of this series? Thanks, Ilya 2016-05-20 14:40 GMT+03:00 Ilya Enkovich : > 2016-05-20 14:17 GMT+03:00 Richard Biener : >> On Fri, May 20, 2016 at 11:50 AM, Ilya Enkovich >> wrote: >>> 2016-05-20 12:26 GMT+03:00 Rich

Re: ]PATCH][RFC] Initial patch for better performance of 64-bit math instructions in 32-bit mode on x86-64

2016-06-01 Thread Ilya Enkovich
2016-06-01 13:06 GMT+03:00 Richard Biener : > On Wed, Jun 1, 2016 at 11:57 AM, Ilya Enkovich wrote: >> 2016-05-31 19:15 GMT+03:00 Uros Bizjak : >>> On Tue, May 31, 2016 at 5:00 PM, Yuri Rumyantsev wrote: >>>> Hi Uros, >>>> >>>> Here is

Re: ]PATCH][RFC] Initial patch for better performance of 64-bit math instructions in 32-bit mode on x86-64

2016-06-01 Thread Ilya Enkovich
2016-05-31 19:15 GMT+03:00 Uros Bizjak : > On Tue, May 31, 2016 at 5:00 PM, Yuri Rumyantsev wrote: >> Hi Uros, >> >> Here is initial patch to improve performance of 64-bit integer >> arithmetic in 32-bit mode. We discovered that gcc is significantly >> behind icc and clang on rsa benchmark from ee

Re: [patch] Fix segfault in vectorizer

2016-05-31 Thread Ilya Enkovich
2016-05-31 12:25 GMT+03:00 Richard Biener : > On Tue, May 31, 2016 at 10:22 AM, Eric Botcazou wrote: >> Hi, >> >> it's a regression present on the mainline and 6 branch: for the attached Ada >> testcase, optab_for_tree_code segfaults because the function is invoked on a >> NULL_TREE vectype_out fr

Re: [PATCH][RFC] Remove ifcvt_repair_bool_pattern, re-do bool patterns

2016-05-30 Thread Ilya Enkovich
2016-05-30 14:04 GMT+03:00 Richard Biener : > > The following patch removes the restriction on seeing a tree of stmts > in vectorizer bool pattern detection (aka single-use). With this > it is no longer necessary to unshare DEFs in ifcvt_repair_bool_pattern > and that compile-time hog can go (it's

[PATCH, PR middle-end/71279] Avoid folding vec_cond_expr into comparison

2016-05-27 Thread Ilya Enkovich
Hi, This patch disable transformation of VEC_COND_EXPR into comparison which became invalid after boolean vectors introduciton. Bootstrapped and regtested for x86_64-pc-linux-gnu. OK for trunk and gcc-6? Thanks, Ilya -- gcc/ 2016-05-27 Ilya Enkovich PR middle-end/71279

Re: [vec-cmp, patch 5/6] Disable bool patterns when possible

2016-05-25 Thread Ilya Enkovich
2016-05-25 14:37 GMT+03:00 Richard Biener : > On Thu, Oct 22, 2015 at 6:04 PM, Ilya Enkovich wrote: >> On 21 Oct 11:45, Jeff Law wrote: >>> On 10/08/2015 09:15 AM, Ilya Enkovich wrote: >>> >Hi, >>> > >>> >This patch disables transformation o

Re: [PATCH, vec-tails 01/10] New compiler options

2016-05-20 Thread Ilya Enkovich
2016-05-20 14:17 GMT+03:00 Richard Biener : > On Fri, May 20, 2016 at 11:50 AM, Ilya Enkovich > wrote: >> 2016-05-20 12:26 GMT+03:00 Richard Biener : >>> On Thu, May 19, 2016 at 9:36 PM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>

Re: [PATCH, vec-tails 04/10] Add masking cost

2016-05-20 Thread Ilya Enkovich
2016-05-20 14:15 GMT+03:00 Richard Biener : > On Fri, May 20, 2016 at 11:44 AM, Ilya Enkovich > wrote: >> 2016-05-20 12:24 GMT+03:00 Richard Biener : >>> On Thu, May 19, 2016 at 9:40 PM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>&g

Re: [PATCH, vec-tails 01/10] New compiler options

2016-05-20 Thread Ilya Enkovich
2016-05-20 12:26 GMT+03:00 Richard Biener : > On Thu, May 19, 2016 at 9:36 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch introduces new options used for loop epilogues vectorization. > > Why's that? This is a bit too much for the casual user and if it is >

Re: [PATCH, vec-tails 04/10] Add masking cost

2016-05-20 Thread Ilya Enkovich
2016-05-20 12:24 GMT+03:00 Richard Biener : > On Thu, May 19, 2016 at 9:40 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch extends vectorizer cost model to include masking cost by >> adding new cost model locations and new target hook to compute >> masking cost.

[PATCH, vec-tails 07/10] Support loop epilogue combining

2016-05-19 Thread Ilya Enkovich
Hi, This patch introduces support for loop epilogue combining. This includes support in cost estimation and all required changes required to mask vectorized loop. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * dbgcnt.def (vect_tail_combine): New. * params.def

[PATCH, vec-tails 09/10] Print more info about vectorized loop

2016-05-19 Thread Ilya Enkovich
Hi, This patch extends dumps for vectorized loops to provide more info about them and also specify used vector size. This is to be used for tests. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vect-loop.c (vect_transform_loop): Print more info about vectorized loop

[PATCH, vec-tails 08/10] Support loop epilogue masking and low trip count loop vectorization

2016-05-19 Thread Ilya Enkovich
Hi, This patch enables vectorization of loop epilogues and low trip count loops using masking. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * dbgcnt.def (vect_tail_mask): New. * tree-vect-loop.c (vect_analyze_loop_2): Support masked loop epilogues and low trip count

[PATCH, vec-tails 06/10] Mark the first vector store generated for a scalar store

2016-05-19 Thread Ilya Enkovich
this new fiels is used to mark a chain start. Also original data reference and vector type are preserved in the first vector statement for masking purposes. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vect-stmts.c (vectorizable_mask_load_store): Mark the first copy of

[PATCH, vec-tails 05/10] Check if loop can be masked

2016-05-19 Thread Ilya Enkovich
Hi, This patch introduces analysis to determine if loop can be masked (compute LOOP_VINFO_CAN_BE_MASKED and LOOP_VINFO_REQUIRED_MASKS) and compute how much masking costs. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vect-loop.c: Include insn-config.h and recog.h

[PATCH, vec-tails 04/10] Add masking cost

2016-05-19 Thread Ilya Enkovich
Hi, This patch extends vectorizer cost model to include masking cost by adding new cost model locations and new target hook to compute masking cost. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * config/i386/i386.c (ix86_init_cost): Extend costs array

[PATCH, vec-tails 03/10] Support epilogues vectorization with no masking

2016-05-19 Thread Ilya Enkovich
Hi, This patch introduces changes required to run vectorizer on loop epilogue. This also enables epilogue vectorization using a vector of smaller size. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-if-conv.c (tree_if_conversion): Make public. * tree-if-conv.h: New

[PATCH, vec-tails 02/10] Extend _loop_vec_info structure with epilogue related fields

2016-05-19 Thread Ilya Enkovich
Hi, This patch adds new fields to _loop_vec_info structure to support loop epilogue vectorization. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * tree-vectorizer.h (struct _loop_vec_info): Add new fields can_be_masked, required_masks, mask_epilogue, combine_epilogue

[PATCH, vec-tails 01/10] New compiler options

2016-05-19 Thread Ilya Enkovich
Hi, This patch introduces new options used for loop epilogues vectorization. Thanks, Ilya -- gcc/ 2016-05-19 Ilya Enkovich * common.opt (flag_tree_vectorize_epilogues): New. (ftree-vectorize-short-loops): New. (ftree-vectorize-epilogues=): New. (fno-tree

[RFC][PATCH, vec-tails 00/10] Support vectorization of loop epilogues

2016-05-19 Thread Ilya Enkovich
for 3 out of 4 vector statements). We will continue search for cases where masking is profitable for Haswell to tune masking costs appropriately. Below are ChangeLogs for whole series. [1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03014.html Thanks, Ilya -- gcc/ 2016-05-19

Re: [PATCH, PR rtl-optimization/71148] Avoid cleanup_cfg called with invalidated dominance info

2016-05-19 Thread Ilya Enkovich
On 19 May 09:57, Richard Biener wrote: > On Wed, May 18, 2016 at 6:17 PM, Ilya Enkovich wrote: > > Hi, > > > > This patch resolves PR71148 by releasing dominance info before > > cleanup_cfg calls to avoid attempts to fixup invalid dominance > > info. > > >

[PATCH, PR rtl-optimization/71148] Avoid cleanup_cfg called with invalidated dominance info

2016-05-18 Thread Ilya Enkovich
with that. Tracker is P1 and this patch may be OK solution for now. Bootstrapped and regtested on x86_64-pc-linux-gnu. Ok for trunk? Thanks, Ilya -- gcc/ 2016-05-18 Ilya Enkovich PR rtl-optimization/71148 * cse.c (rest_of_handle_cse): Free dominance info before

[PATCH, PR target/71114] Fix constants conversion in STV pass

2016-05-17 Thread Ilya Enkovich
K for trunk? Thanks, Ilya -- gcc/ 2016-05-17 Ilya Enkovich PR target/71114 * config/i386/i386.c (dimode_scalar_chain::convert_op): Fix insertion point for instructions generated by validize_mem. gcc/testsuite/ 2016-05-17 Dominique d'Humieres Ily

[PATCH, PR71084] Further improve of CFG change tracking in CSE

2016-05-13 Thread Ilya Enkovich
Hi, This patch improves cse_cfg_altered computation by taking into account cleanup_cfg returned values. This resolves another case of invalidated dominance info. Bootstrapped and regtested on x86_64-unknown-linux-gnu. OK for turnk? Thanks, Ilya -- gcc/ 2016-05-13 Ilya Enkovich

Re: [PATCH, PR tree-optimization/71006] Fix vectype computation for COND_EXPR

2016-05-12 Thread Ilya Enkovich
2016-05-12 13:38 GMT+03:00 Richard Biener : > On Thu, May 12, 2016 at 12:19 PM, Ilya Enkovich > wrote: >> Hi, >> >> Currently we have a code in vect_determine_vectorization_factor to >> compute vectype for mask producers. It wasn't meant to be used for >

[PATCH, PR tree-optimization/71006] Fix vectype computation for COND_EXPR

2016-05-12 Thread Ilya Enkovich
trunk? Thanks, Ilya -- gcc/ 2016-05-12 Ilya Enkovich PR tree-optimization/71006 * tree-vect-loop.c (vect_determine_vectorization_factor): Don't consider COND_EXPR as a mask producer. gcc/testsuite/ 2016-05-12 Ilya Enkovich PR tree-optimiza

Re: [PATCH, PR middle-end/70807] Free dominance info in CSE pass

2016-05-11 Thread Ilya Enkovich
2016-05-11 15:45 GMT+03:00 H.J. Lu : > On Wed, May 11, 2016 at 2:26 AM, Ilya Enkovich wrote: >> 2016-05-10 21:13 GMT+03:00 H.J. Lu : >>> On Tue, May 10, 2016 at 9:19 AM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>>> Curretly C

Re: [PATCH, PR middle-end/70807] Free dominance info in CSE pass

2016-05-11 Thread Ilya Enkovich
2016-05-10 21:13 GMT+03:00 H.J. Lu : > On Tue, May 10, 2016 at 9:19 AM, Ilya Enkovich wrote: >> Hi, >> >> Curretly CSE may modify CFG and leave invalid dominance info. This patch >> improves track of CFG changes by CSE passes and frees dominance info if >>

  1   2   3   4   5   6   7   8   9   10   >