Re: [PATCH, i386, MPX, 2/X] Pointers Checker [21/25] Size relocation

2013-11-20 Thread Ilya Enkovich
On 20 Nov 09:49, Uros Bizjak wrote: > On Tue, Nov 19, 2013 at 9:43 PM, Ilya Enkovich wrote: > > >> > Here is a patch to add size relocation and instruction to obtain > >> > object's size in i386 target. > >> > >> +(define_insn &q

Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support

2013-11-20 Thread Ilya Enkovich
On 20 Nov 10:59, Richard Biener wrote: > On Tue, Nov 19, 2013 at 9:29 PM, Ilya Enkovich wrote: > > On 19 Nov 12:33, Jeff Law wrote: > >> On 11/19/13 05:13, Ilya Enkovich wrote: > >> >On 19 Nov 13:00, Richard Biener wrote: > >> >>I'd say not in

Re: [PATCH, i386, MPX, 2/X] Pointers Checker [21/25] Size relocation

2013-11-20 Thread Ilya Enkovich
2013/11/20 Uros Bizjak : > On Wed, Nov 20, 2013 at 1:32 PM, Ilya Enkovich wrote: > >>> >> > Here is a patch to add size relocation and instruction to obtain >>> >> > object's size in i386 target. >>> >> >>> >

Re: [PATCH, i386, MPX, 2/X] Pointers Checker [21/25] Size relocation

2013-11-20 Thread Ilya Enkovich
2013/11/20 Uros Bizjak : > On Wed, Nov 20, 2013 at 5:11 PM, Ilya Enkovich wrote: >> 2013/11/20 Uros Bizjak : >>> On Wed, Nov 20, 2013 at 1:32 PM, Ilya Enkovich >>> wrote: >>> >>>>> >> > Here is a patch to add size relocation and in

Re: [PATCH, i386, MPX, 2/X] Pointers Checker [21/25] Size relocation

2013-11-20 Thread Ilya Enkovich
2013/11/20 Ilya Enkovich : > 2013/11/20 Uros Bizjak : >> On Wed, Nov 20, 2013 at 5:11 PM, Ilya Enkovich >> wrote: >>> 2013/11/20 Uros Bizjak : >>>> On Wed, Nov 20, 2013 at 1:32 PM, Ilya Enkovich >>>> wrote: >>>> >>>>

Re: [PATCH, MPX, 2/X] Pointers Checker [18/25] CCP (Stack store/restore)

2013-11-20 Thread Ilya Enkovich
2013/11/21 Jeff Law : > On 11/18/13 03:54, Ilya Enkovich wrote: >> >> Hi, >> >> Here is a patch to support BUILT_IN_CHKP_BNDRET and >> BUILT_IN_CHKP_BIND_BOUNDS in BUILT_IN_STACK_SAVE result uses. >> >> Thanks, >> Ilya >> -- >

Re: [PATCH, MPX, 2/X] Pointers Checker [14/25] Function splitting

2013-11-21 Thread Ilya Enkovich
2013/11/20 Richard Biener : > On Wed, Nov 20, 2013 at 10:57 AM, Richard Biener > wrote: >> On Tue, Nov 19, 2013 at 9:18 PM, Ilya Enkovich >> wrote: >>> 2013/11/19 Jeff Law : >>>> On 11/19/13 05:20, Ilya Enkovich wrote: >>>>> >>>&g

Re: [PATCH, MPX, 2/X] Pointers Checker [14/25] Function splitting

2013-11-25 Thread Ilya Enkovich
2013/11/21 Richard Biener : > On Wed, Nov 20, 2013 at 7:54 PM, Jeff Law wrote: >> On 11/20/13 03:02, Richard Biener wrote: >>> >>> >>> Note that this, the intrusiveness of the feature and the questionable >>> gain makes me question whether GCC should have support for this >>> feature (and whether

Re: [PATCH, MPX, 2/X] Pointers Checker [14/25] Function splitting

2013-11-26 Thread Ilya Enkovich
2013/11/25 Jeff Law : > On 11/25/13 04:12, Ilya Enkovich wrote: >> >> >> I'll prepare a patch to remove committed patches. But the first part >> of series added new ISA extension support. It is independent from the >> checker. Should it be OK to keep ISA

Re: [PATCH, MPX, 2/X] Pointers Checker [14/25] Function splitting

2013-11-26 Thread Ilya Enkovich
2013/11/26 Ilya Enkovich : > 2013/11/25 Jeff Law : >> On 11/25/13 04:12, Ilya Enkovich wrote: >>> >>> >>> I'll prepare a patch to remove committed patches. But the first part >>> of series added new ISA extension support. It is independent fro

Re: [PATCH, i386, MPX, 2/X] Pointers Checker [21/25] Size relocation

2013-11-26 Thread Ilya Enkovich
2013/11/21 Uros Bizjak : > On Wed, Nov 20, 2013 at 5:33 PM, Ilya Enkovich wrote: >>>> CM_MEDIUM has unlimited data size. >>>> >>>> i386-opts.h: CM_MEDIUM,/* Assumes code fits in the low 31 >>>> bits; data unlimited. */ >>>>

Re: [PATCH, MPX, 2/X] Pointers Checker [14/25] Function splitting

2013-11-26 Thread Ilya Enkovich
2013/11/26 Richard Biener : > On Tue, Nov 26, 2013 at 12:18 PM, Ilya Enkovich > wrote: >> 2013/11/26 Ilya Enkovich : >>> 2013/11/25 Jeff Law : >>>> On 11/25/13 04:12, Ilya Enkovich wrote: >>>>> >>>>> >>>>> I'

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

2014-10-07 Thread Ilya Enkovich
2014-10-03 23:59 GMT+04:00 Jeff Law : > On 10/03/14 02:50, Ilya Enkovich wrote: >> >> Attached is an updated version of the patch. It has disabled >> instrumenttation for builtin calls. >> >> Thanks, >> Ilya >> -- >> gcc/ >> >

[PATCH, Pointer Bounds Checker 14/x] Passes [1/n] Expand interfaces

2014-10-08 Thread Ilya Enkovich
Hi, This patch starts a series which is a result of split of Pointer Bounds Checker patch #14 (Pointer Bounds Checker passes). This patch introduces compiler flags used by checker and helper functions mostly used by expand pass. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree

[PATCH, Pointer Bounds Checker 14/x] Passes [2/n] IPA passes

2014-10-08 Thread Ilya Enkovich
Hi, This patch introduces two IPA passes used by Pointer Bounds Checker. One pass creates clones for instrumentation. The other one transforms unneeded functions into thunks. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * ipa-chkp.c: New. * ipa-chkp.h: New

[PATCH, Pointer Bounds Checker 14/x] Passes [3/n] Helper functions

2014-10-08 Thread Ilya Enkovich
Hi, This patch introduces helper functions used by instrumentation. These helpers are used to access local structures, generate typical expressions, vars and statements. I also included local data initializer into this patch. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c

[PATCH, Pointer Bounds Checker 14/x] Passes [4/n] Memory accesses instrumentation

2014-10-08 Thread Ilya Enkovich
Hi, This is the main chunk of instrumentation codes. This patch introduces instrumentation pass which instruments memory accesses. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_may_complete_phi_bounds): New. (chkp_may_finish_incomplete_bounds): New

[PATCH, Pointer Bounds Checker 14/x] Passes [5/n] Replace function pointers

2014-10-08 Thread Ilya Enkovich
Hi, This patch add function pointers replacement into instrumentation pass. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c: Include ipa-chkp.h. (chkp_replace_function_pointer): New. (chkp_replace_function_pointers): New. (chkp_instrument_function

[PATCH, Pointer Bounds Checker 14/x] Passes [6/n] Instrument calls and returns

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds intrumentation of calls and returns into instrumentation pass. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_add_bounds_to_ret_stmt): New. (chkp_replace_address_check_builtin): New. (chkp_replace_extract_builtin): New

[PATCH, Pointer Bounds Checker 14/x] Passes [7/n] Instrument params

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds bounds initialization for address taken input arguments. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_instrument_function): Store bounds for address taken args. diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c index 6bbceb0..5443950 100644

[PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds removal of user calls to chkp builtins which become useless after instrumentation. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_remove_useless_builtins): New. (chkp_execute): Remove useless calls to Pointer Bounds Checker builtins

[PATCH, Pointer Bounds Checker 14/x] Passes [9/n] Static constructors

2014-10-08 Thread Ilya Enkovich
Hi, This patch introduces functions to handle static pointers and static bounds. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (MAX_STMTS_IN_STATIC_CHKP_CTOR): New. (chkp_ctor_stmt_list): New. (chkp_register_var_initializer): New

[PATCH, Pointer Bounds Checker 14/x] Passes [10/n] Stores handler

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds an assignment processing function which is used by lnliner for newly generated stores. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_copy_bounds_for_assign): New. * tree-chkp.h (chkp_copy_bounds_for_assign): New. diff --git a/gcc/tree

[PATCH, Pointer Bounds Checker 14/x] Passes [11/n] Optimization helpers

2014-10-08 Thread Ilya Enkovich
Hi, This patch introduces structures and manipulation functions used by simple checker optimizations. Structures are used to hold checks information - type of check and checked address in a polinomial form. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (check_type): New

[PATCH, Pointer Bounds Checker 14/x] Passes [12/n] Optimize string functions

2014-10-08 Thread Ilya Enkovich
Hi, This patch introduces simple optimization of string function calls using variants with no checks and/or bounds copy when possible. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (check_infos): New. (chkp_get_nobnd_fndecl): New. (chkp_get_nochk_fndecl

[PATCH, Pointer Bounds Checker 14/x] Passes [13/n] Optimize bounds intersections

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds removal of unnecessary intersections into checker optimizations. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_release_check_info): New. (chkp_init_check_info): New. (chkp_gather_checks_info): New. (chkp_get_check_result

[PATCH, Pointer Bounds Checker 14/x] Passes [14/n] Optimize constant checks

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds a removal of checks known to always pass into checker optimization. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_remove_check_if_pass): New. (chkp_remove_constant_checks): New. (chkp_opt_execute): Run constant check removal

[PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds removal of redundant (covered by other) checks into checker optimization. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_compare_checks): New. (chkp_remove_redundant_checks): New. (chkp_opt_execute): Run redundant checks removal

[PATCH, Pointer Bounds Checker 14/x] Passes [16/n] Reduce bounds lifetime

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds a bounds lifetime reduction into checker optimization. Thanks, Ilya -- 2014-10-08 Ilya Enkovich * tree-chkp.c (chkp_reduce_bounds_lifetime): New. (chkp_opt_execute): Run bounds lifetime reduction algorithm. diff --git a/gcc/tree-chkp.c b/gcc/tree

[PATCH, Pointer Bounds Checker 14/x] Passes [17/n] Add checker passes into passes list

2014-10-08 Thread Ilya Enkovich
Hi, This patch adds instrumentation passes into passes list. Thanks, Ilya -- gcc/ 2014-10-08 Ilya Enkovich * passes.def (pass_ipa_chkp_versioning): New. (pass_early_local_passes): Renamed to pass_build_ssa_passes. (pass_fixup_cfg): Moved to

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [2/n] IPA passes

2014-10-08 Thread Ilya Enkovich
2014-10-08 23:41 GMT+04:00 Jan Hubicka : >> +/* Pointer Bounds Checker has two IPA passes to support code >> instrumentation. >> + >> +In instrumented code each pointer is provided with bounds. For input >> +pointer parameters it means we also have bounds passed. For calls it >> +me

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [2/n] IPA passes

2014-10-09 Thread Ilya Enkovich
2014-10-09 2:40 GMT+04:00 Jan Hubicka : >> >> I prevent clone's body from removal and therefore original should call >> clone (otherwise clone may have no callers and be removed). I think >> call edge may work (need to recall other cases when reference do its >> work) but is it OK to have call wit

Re: [PATCH, i386, Pointer Bounds Checker 31/x] Pointer Bounds Checker builtins for i386 target

2014-10-09 Thread Ilya Enkovich
It appeared I changed a semantics of BNDMK expand when replaced tree operations with rtl ones. Original code: + op1 = expand_normal (fold_build2 (PLUS_EXPR, TREE_TYPE (arg1), + arg1, integer_minus_one_node)); + op1 = force_reg (Pmode, op1); Modifi

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [12/n] Optimize string functions

2014-10-10 Thread Ilya Enkovich
On 09 Oct 11:02, Jeff Law wrote: > On 10/08/14 13:18, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces simple optimization of string function calls using > >variants with no checks and/or bounds copy when possible. > > > >Thanks, >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [11/n] Optimization helpers

2014-10-10 Thread Ilya Enkovich
On 09 Oct 12:09, Jeff Law wrote: > On 10/08/14 13:16, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces structures and manipulation functions used by simple > >checker optimizations. Structures are used to hold checks information - > >type of check an

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-10 Thread Ilya Enkovich
On 09 Oct 15:03, Jeff Law wrote: > On 10/08/14 13:08, Ilya Enkovich wrote: > >Hi, > > > >This patch adds removal of user calls to chkp builtins which become useless > >after instrumentation. > > > >Thanks, > >Ilya > >-- >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks

2014-10-10 Thread Ilya Enkovich
2014-10-09 21:41 GMT+04:00 Jeff Law : > On 10/08/14 13:22, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds removal of redundant (covered by other) checks into >> checker optimization. >> >> Thanks, >> Ilya >> -- >> 2014-10-08 I

Re: [PATCH, i386, Pointer Bounds Checker 31/x] Pointer Bounds Checker builtins for i386 target

2014-10-10 Thread Ilya Enkovich
2014-10-10 20:45 GMT+04:00 Jeff Law : > On 10/09/14 10:54, Uros Bizjak wrote: >> >> On Thu, Oct 9, 2014 at 4:07 PM, Ilya Enkovich >> wrote: >>> >>> It appeared I changed a semantics of BNDMK expand when replaced tree >>> operations with rtl

Re: [PATCH, i386, Pointer Bounds Checker 33/x] MPX ABI

2014-10-10 Thread Ilya Enkovich
2014-10-10 21:10 GMT+04:00 Uros Bizjak : > On Wed, Oct 1, 2014 at 8:57 PM, Vladimir Makarov wrote: > >> The problem is in code introduced by Bernd in IRA and caller-saves.c in >> 2012. It is basically an optimization for functions returning always the >> same result as one argument (e.g. memcpy r

Re: [PATCH, i386, Pointer Bounds Checker 33/x] MPX ABI

2014-10-10 Thread Ilya Enkovich
2014-10-10 21:35 GMT+04:00 Jeff Law : > On 10/10/14 11:33, Uros Bizjak wrote: >> >> On Fri, Oct 10, 2014 at 7:29 PM, Ilya Enkovich >> wrote: >>> >>> 2014-10-10 21:10 GMT+04:00 Uros Bizjak : >>>> >>>> On Wed, Oct 1, 2014 at 8:57 PM,

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [2/n] IPA passes

2014-10-13 Thread Ilya Enkovich
On 10 Oct 13:14, Jeff Law wrote: > On 10/08/14 12:55, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces two IPA passes used by Pointer Bounds Checker. One > >pass creates clones for instrumentation. The other one transforms unneeded > >functions in

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [6/n] Instrument calls and returns

2014-10-13 Thread Ilya Enkovich
On 10 Oct 12:50, Jeff Law wrote: > On 10/08/14 13:04, Ilya Enkovich wrote: > >Hi, > > > >This patch adds intrumentation of calls and returns into instrumentation > >pass. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [7/n] Instrument params

2014-10-13 Thread Ilya Enkovich
On 10 Oct 12:10, Jeff Law wrote: > On 10/08/14 13:06, Ilya Enkovich wrote: > >Hi, > > > >This patch adds bounds initialization for address taken input arguments. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich > > > >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [10/n] Stores handler

2014-10-13 Thread Ilya Enkovich
2014-10-09 22:51 GMT+04:00 Jeff Law : > On 10/08/14 13:12, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds an assignment processing function which is used by lnliner >> for newly generated stores. >> >> Thanks, >> Ilya >> -- &

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [9/n] Static constructors

2014-10-13 Thread Ilya Enkovich
On 09 Oct 13:04, Jeff Law wrote: > On 10/08/14 13:10, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces functions to handle static pointers and static bounds. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich > > &

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [11/n] Optimization helpers

2014-10-13 Thread Ilya Enkovich
On 10 Oct 10:14, Jeff Law wrote: > On 10/10/14 08:24, Ilya Enkovich wrote: > >On 09 Oct 12:09, Jeff Law wrote: > >>On 10/08/14 13:16, Ilya Enkovich wrote: > >>>Hi, > >>> > >>>This patch introduces structures and manipulation functions used

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [8/n] Remove useless builtin calls

2014-10-13 Thread Ilya Enkovich
On 10 Oct 10:11, Jeff Law wrote: > On 10/10/14 08:52, Ilya Enkovich wrote: > >> > >>THanks, Jeff > > > >With this code we remove user builtins calls coming from source code. > >E.g.: > > > >p2 = (int *)__bnd_init_ptr_bounds (p1); *p2 = 0; &g

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [12/n] Optimize string functions

2014-10-13 Thread Ilya Enkovich
On 10 Oct 10:25, Jeff Law wrote: > On 10/10/14 08:19, Ilya Enkovich wrote: > >>So is the purpose here to expose the checks that would normally be > >>done in the mem* routines to their caller in the hopes that doing > >>so will expose redundant checks? Or is there s

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks

2014-10-13 Thread Ilya Enkovich
2014-10-10 20:56 GMT+04:00 Jeff Law : > On 10/10/14 09:50, Ilya Enkovich wrote: >> >> Checks and and intersection removal code was added as a simple pass >> catching trivial cases. I'm sure there are optimizations having >> common elements with what checker o

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [14/n] Optimize constant checks

2014-10-13 Thread Ilya Enkovich
On 09 Oct 11:13, Jeff Law wrote: > On 10/08/14 13:21, Ilya Enkovich wrote: > >Hi, > > > >This patch adds a removal of checks known to always pass into checker > >optimization. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich &

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [13/n] Optimize bounds intersections

2014-10-13 Thread Ilya Enkovich
On 09 Oct 12:05, Jeff Law wrote: > On 10/08/14 13:19, Ilya Enkovich wrote: > >Hi, > > > >This patch adds removal of unnecessary intersections into checker > >optimizations. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [3/n] Helper functions

2014-10-13 Thread Ilya Enkovich
2014-10-14 1:05 GMT+04:00 Jeff Law : > On 10/08/14 12:57, Ilya Enkovich wrote: >> >> Hi, >> >> This patch introduces helper functions used by instrumentation. These >> helpers are used to access local structures, generate typical expressions, >> vars and

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [4/n] Memory accesses instrumentation

2014-10-14 Thread Ilya Enkovich
On 13 Oct 14:52, Jeff Law wrote: > On 10/08/14 13:01, Ilya Enkovich wrote: > >Hi, > > > >This is the main chunk of instrumentation codes. This patch introduces > >instrumentation pass which instruments memory accesses. > > > >Thanks, > >Ilya > >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [6/n] Instrument calls and returns

2014-10-14 Thread Ilya Enkovich
On 13 Oct 14:49, Ilya Enkovich wrote: > On 10 Oct 12:50, Jeff Law wrote: > > On 10/08/14 13:04, Ilya Enkovich wrote: > > >Hi, > > > > > >This patch adds intrumentation of calls and returns into instrumentation > > >pass. > > > > &g

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [3/n] Helper functions

2014-10-14 Thread Ilya Enkovich
On 14 Oct 01:13, Ilya Enkovich wrote: > 2014-10-14 1:05 GMT+04:00 Jeff Law : > > > > Where does chkp_can_be_shared get used?Normally the thing to do would > > just be to call unshare_expr. It'll create copies as needed. If it's > > something that is supp

Re: [PATCH, i386, Pointer Bounds Checker 31/x] Pointer Bounds Checker builtins for i386 target

2014-10-14 Thread Ilya Enkovich
On 10 Oct 21:20, Ilya Enkovich wrote: > 2014-10-10 20:45 GMT+04:00 Jeff Law : > > On 10/09/14 10:54, Uros Bizjak wrote: > >> > >> On Thu, Oct 9, 2014 at 4:07 PM, Ilya Enkovich > >> wrote: > >>> > >>> It appeared I changed a semantics

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [16/n] Reduce bounds lifetime

2014-10-14 Thread Ilya Enkovich
On 09 Oct 11:32, Jeff Law wrote: > On 10/08/14 13:24, Ilya Enkovich wrote: > >Hi, > > > >This patch adds a bounds lifetime reduction into checker optimization. > > > >Thanks, > >Ilya > >-- > >2014-10-08 Ilya Enkovich > >

Re: [PATCH, Pointer Bounds Checker 29/x] Debug info

2014-10-15 Thread Ilya Enkovich
2014-06-18 0:56 GMT+04:00 Jeff Law : > On 06/11/14 02:50, Ilya Enkovich wrote: >> >> Hi, >> >> This patch skips all bounds during debug info generation. >> >> Bootstrapped and tested on linux-x86_64. >> >> Thanks, >> Ilya >> -- >

Re: [PATCH, Pointer Bounds Checker 14/x] Passes [1/n] Expand interfaces

2014-10-15 Thread Ilya Enkovich
2014-10-14 1:11 GMT+04:00 Jeff Law : > On 10/08/14 12:50, Ilya Enkovich wrote: >> >> Hi, >> >> This patch starts a series which is a result of split of Pointer Bounds >> Checker patch #14 (Pointer Bounds Checker passes). >> >> This patch introdu

[PATCH, i386, Pointer Bounds Checker 17/x] Pointer bounds constants support

2014-06-02 Thread Ilya Enkovich
Hi, This patch adds support for pointer bounds constants to be used as DECL_INITIAL for constant bounds (like zero bounds). Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-05-30 Ilya Enkovich * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS

Re: [PATCH, i386, Pointer Bounds Checker 11/x] Keep bounds initial values

2014-06-02 Thread Ilya Enkovich
On 30 May 10:45, Jeff Law wrote: > On 05/29/14 04:53, Ilya Enkovich wrote: > >Hi, > > > >This patch tries to keep bounds initial values when it may be needed. Even > >if initial value is not fully known (e.g. we know only low bound) it still > >may hel

Re: [PATCH, i386, Pointer Bounds Checker 12/x] Recognize instrumented special functions

2014-06-02 Thread Ilya Enkovich
On 30 May 10:46, Jeff Law wrote: > On 05/29/14 05:00, Ilya Enkovich wrote: > >Hi, > > > >This patch allows to recognize instrumented call to special function by > >using the original function name for recognition. > > > >Bootstrapped and tested on linux-x86_

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

2014-06-02 Thread Ilya Enkovich
On 30 May 10:59, Jeff Law wrote: > On 05/29/14 05:05, Ilya Enkovich wrote: > >Hi, > > > >This patch allows to perform function versioning when some structures are > >not available yet. It is required to make clones for Pointer Bounds Checker > >right after S

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

2014-06-02 Thread Ilya Enkovich
On 30 May 11:10, Jeff Law wrote: > On 05/28/14 10:06, Ilya Enkovich wrote: > >Hi, > > > >This patch keeps instrumented and original versions together and preserve > >tranparent alias chain during symbol name privatization. > > > >Bootstrapped and tested

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

2014-06-02 Thread Ilya Enkovich
2014-06-02 15:56 GMT+04:00 Richard Biener : > On Mon, Jun 2, 2014 at 12:48 PM, Ilya Enkovich wrote: >> On 30 May 10:59, Jeff Law wrote: >>> On 05/29/14 05:05, Ilya Enkovich wrote: >>> >Hi, >>> > >>> >This patch allows to perform function versi

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

2014-06-02 Thread Ilya Enkovich
2014-06-02 15:35 GMT+04:00 Richard Biener : > On Fri, May 30, 2014 at 2:25 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch adds Pointer Bounds Checker passes. Versioning happens before >> early local passes. Earply local passes are split into 3 stages to have

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

2014-06-02 Thread Ilya Enkovich
string function separately because they are of high interest for the checker. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-02 Ilya Enkovich * builtins.c: Include rtl-chkp.h, tree-chkp.h. (expand_builtin_mempcpy_args): Add orig exp as argument

[PATCH, Pointer Bounds Checker 19/x] Support bounds in expand

2014-06-02 Thread Ilya Enkovich
Hi, This patch adds support for input bounds, call bounds args and returned bounds in expand pass. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-02 Ilya Enkovich * calls.c: Include tree-chkp.h, rtl-chkp.h. (arg_data): Add fields special_slot

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

2014-06-02 Thread Ilya Enkovich
2014-06-02 17:37 GMT+04:00 Richard Biener : > On Mon, Jun 2, 2014 at 2:44 PM, Ilya Enkovich wrote: >> 2014-06-02 15:35 GMT+04:00 Richard Biener : >>> On Fri, May 30, 2014 at 2:25 PM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>>> Thi

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

2014-06-02 Thread Ilya Enkovich
-x86_64. Thanks, Ilya -- gcc/ 2014-06-02 Ilya Enkovich * varasm.c: Include tree-chkp.h. (ultimate_transparent_alias_target): Move up. (make_decl_rtl): For instrumented function use name of the original decl. (assemble_start_function): Mark function as

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

2014-06-02 Thread Ilya Enkovich
Hi, This patch prevents output of both instrumented and not instrumented weakref variants. Thanks, Ilya -- gcc/ 2014-06-02 Ilya Enkovich * cgraphunit.c (output_weakrefs): If there are both instrumented and original versions, output only one of them. diff --git a

Re: [PATCH, Pointer Bounds Checker 19/x] Support bounds in expand

2014-06-02 Thread Ilya Enkovich
2014-06-02 19:28 GMT+04:00 Michael Matz : > Hi, > > On Mon, 2 Jun 2014, Ilya Enkovich wrote: > >> This patch adds support for input bounds, call bounds args and returned >> bounds in expand pass. >> >> * expr.h (store_expr): Add param for bounds target. &g

[PATCH, Pointer Bounds Checker 22/x] Inline

2014-06-02 Thread Ilya Enkovich
Ilya Enkovich * ipa-inline.c (early_inliner): Check edge has summary allocated. * tree-inline.c: Include tree-chkp.h. (declare_return_variable): Add arg holding returned bounds slot. Create and initialize returned bounds var. (remap_gimple_stmt): Handle

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

2014-06-02 Thread Ilya Enkovich
2014-06-02 21:27 GMT+04:00 Jeff Law : > On 06/02/14 04:48, Ilya Enkovich wrote: >>> >>> Hmm, so if I understand things correctly, src_fun has no loop >>> structures attached, thus there's nothing to copy. Presumably at >>> some later point we bui

[PATCH, Pointer Bounds Checker 23/x] Function split

2014-06-03 Thread Ilya Enkovich
Hi, This patch does not allow splitting in case bounds are returned until retutrned bounds are supported. It also propagates instrumentation marks for generated call and function. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich * ipa

[PATCH, Pointer Bounds Checker 24/x] PRE

2014-06-03 Thread Ilya Enkovich
Hi, This patch preserves CALL_WITH_BOUNDS flag for calls during PRE. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich * tree-ssa-pre.c (create_component_ref_by_pieces_1): Store CALL_WITH_BOUNDS_P for calls

[PATCH, Pointer Bounds Checker 25/x] DCE

2014-06-03 Thread Ilya Enkovich
Hi, This patch adjusts alloc-free removal algorithm in DCE to take into account BUILT_IN_CHKP_BNDRET call returning bounds of allocated memory. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich * tree-ssa-dce.c: Include target.h

[PATCH, Pointer Bounds Checker 26/x] CCP

2014-06-03 Thread Ilya Enkovich
Hi, This patch allows BUILT_IN_CHKP_BNDRET as a consumer of a result of BUILT_IN_STACK_SAVE call. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-03 Ilya Enkovich * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Handle BUILT_IN_CHKP_BNDRET

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

2014-06-03 Thread Ilya Enkovich
2014-06-03 13:02 GMT+04:00 Richard Biener : > On Mon, Jun 2, 2014 at 5:22 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch prevents output of both instrumented and not instrumented weakref >> variants. > > Shouldn't one of them be reclaimed instead at som

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

2014-06-03 Thread Ilya Enkovich
2014-06-03 13:45 GMT+04:00 Richard Biener : > On Tue, Jun 3, 2014 at 9:23 AM, Ilya Enkovich wrote: >> Hi, >> >> This patch adjusts alloc-free removal algorithm in DCE to take into account >> BUILT_IN_CHKP_BNDRET call returning bounds of allocated memory. >> &g

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

2014-06-03 Thread Ilya Enkovich
2014-06-03 15:56 GMT+04:00 Richard Biener : > On Tue, Jun 3, 2014 at 1:36 PM, Ilya Enkovich wrote: >> 2014-06-03 13:45 GMT+04:00 Richard Biener : >>> On Tue, Jun 3, 2014 at 9:23 AM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>>> This

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

2014-06-03 Thread Ilya Enkovich
2014-06-03 17:41 GMT+04:00 Richard Biener : > On Tue, Jun 3, 2014 at 3:27 PM, Ilya Enkovich wrote: >> 2014-06-03 15:56 GMT+04:00 Richard Biener : >>> On Tue, Jun 3, 2014 at 1:36 PM, Ilya Enkovich >>> wrote: >>>> 2014-06-03 13:45 GMT+04:00 Richard Biener

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

2014-06-04 Thread Ilya Enkovich
2014-06-04 10:46 GMT+04:00 Jeff Law : > On 06/03/14 03:29, Richard Biener wrote: >> >> On Tue, Jun 3, 2014 at 7:55 AM, Ilya Enkovich >> wrote: >>> >>> 2014-06-02 21:27 GMT+04:00 Jeff Law : >>>> >>>> On 06/02/14 04:48, Ilya Enko

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

2014-06-04 Thread Ilya Enkovich
2014-06-04 13:58 GMT+04:00 Richard Biener : > On Wed, Apr 16, 2014 at 2:33 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch add new static constructor types used by Pointer Bounds Checker. >> It was approved earlier for 4.9 and I'll assume patch is OK for

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

2014-06-05 Thread Ilya Enkovich
2014-06-04 17:35 GMT+04:00 Richard Biener : > On Wed, Jun 4, 2014 at 3:13 PM, Ilya Enkovich wrote: >> 2014-06-04 13:58 GMT+04:00 Richard Biener : >>> On Wed, Apr 16, 2014 at 2:33 PM, Ilya Enkovich >>> wrote: >>>> Hi, >>>> >>>> Thi

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

2014-06-05 Thread Ilya Enkovich
On 04 Jun 11:59, Richard Biener wrote: > On Wed, Jun 4, 2014 at 8:46 AM, Jeff Law wrote: > > On 06/03/14 03:29, Richard Biener wrote: > >> > >> On Tue, Jun 3, 2014 at 7:55 AM, Ilya Enkovich > >> wrote: > >>> > >>> 2014-06-02 21:2

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

2014-06-05 Thread Ilya Enkovich
2014-06-05 15:58 GMT+04:00 Richard Biener : > On Thu, Jun 5, 2014 at 1:18 PM, Ilya Enkovich wrote: >> On 04 Jun 11:59, Richard Biener wrote: >>> On Wed, Jun 4, 2014 at 8:46 AM, Jeff Law wrote: >>> > On 06/03/14 03:29, Richard Biener wrote: >>> >>

Re: [PATCH, Pointer Bounds Checker 19/x] Support bounds in expand

2014-06-05 Thread Ilya Enkovich
On 04 Jun 16:36, Michael Matz wrote: > Hi, > > On Mon, 2 Jun 2014, Ilya Enkovich wrote: > > > > There is exactly one place (except for the self-recursive ones) where > > > you call the new store_expr with a non-null argument for bounds > > > target, and

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

2014-06-06 Thread Ilya Enkovich
On 03 Jun 17:27, Ilya Enkovich wrote: > 2014-06-03 15:56 GMT+04:00 Richard Biener : > > On Tue, Jun 3, 2014 at 1:36 PM, Ilya Enkovich > > wrote: > >> 2014-06-03 13:45 GMT+04:00 Richard Biener : > >>> On Tue, Jun 3, 2014 at 9:23 AM, Ilya Enkovich > >>

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

2014-06-06 Thread Ilya Enkovich
On 03 Jun 11:54, Richard Biener wrote: > On Tue, Jun 3, 2014 at 9:38 AM, Ilya Enkovich wrote: > > Hi, > > > > This patch allows BUILT_IN_CHKP_BNDRET as a consumer of a result of > > BUILT_IN_STACK_SAVE call. > > > > Bootstrapped and tested on linux-x86_64.

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

2014-06-06 Thread Ilya Enkovich
2014-06-03 13:07 GMT+04:00 Richard Biener : > On Mon, Jun 2, 2014 at 5:56 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch adds support for inlining instrumented calls. Changes are mostly >> to support returned bounds. Also generated mem-to-mem assignments are

Re: [PATCH, i386, Pointer Bounds Checker 17/x] Pointer bounds constants support

2014-06-06 Thread Ilya Enkovich
2014-06-04 10:58 GMT+04:00 Jeff Law : > On 06/02/14 04:25, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds support for pointer bounds constants to be used as >> DECL_INITIAL for constant bounds (like zero bounds). >> >> Bootstrapped and

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

2014-06-06 Thread Ilya Enkovich
2014-06-03 12:46 GMT+04:00 Richard Biener : > On Mon, Jun 2, 2014 at 4:51 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch adds support for normal builtin function calls (target ones are >> not instrumented). The basic idea of the patch is to make call expr copy >

Re: [PATCH, Pointer Bounds Checker 23/x] Function split

2014-06-06 Thread Ilya Enkovich
2014-06-04 11:15 GMT+04:00 Jeff Law : > On 06/03/14 01:10, Ilya Enkovich wrote: >> >> Hi, >> >> This patch does not allow splitting in case bounds are returned until >> retutrned bounds are supported. It also propagates instrumentation marks >> for generate

[PATCH, PR61446] Fix mode for register copy in REE pass

2014-06-10 Thread Ilya Enkovich
on linux-x86_64. Does it look OK? Thanks, Ilya -- 2014-06-09 Ilya Enkovich PR 61446 * ree.c (find_and_remove_re): Narrow mode for register copy if required. diff --git a/gcc/ChangeLog.pr61446 b/gcc/ChangeLog.pr61446 new file mode 100644 index 000..b9e2148 --- /dev

[PATCH, Pointer Bounds Checker 27/x] Strlen

2014-06-11 Thread Ilya Enkovich
Hi, This patch adds instrumented code support for strlen optimization. Bootstrapped and tested on linux-x86_64. Does it look OK? Thanks, Ilya -- gcc/ 2014-06-09 Ilya Enkovich * tree-ssa-strlen.c: include tree-chkp.h. (get_string_length): Handle calls with bounds

[PATCH, Pointer Bounds Checker 28/x] IPA CP

2014-06-11 Thread Ilya Enkovich
Hi, This patch fixes IPA CP pass to handle instrumented code correctly. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-11 Ilya Enkovich * ipa-cp.c (initialize_node_lattices): Check original version locality for instrumentation clones

Re: [PATCH, Pointer Bounds Checker 27/x] Strlen

2014-06-11 Thread Ilya Enkovich
2014-06-11 12:22 GMT+04:00 Jakub Jelinek : > On Wed, Jun 11, 2014 at 12:14:14PM +0400, Ilya Enkovich wrote: >> This patch adds instrumented code support for strlen optimization. >> >> Bootstrapped and tested on linux-x86_64. >> >> Does it look OK? > > Ugh

[PATCH, Pointer Bounds Checker 29/x] Debug info

2014-06-11 Thread Ilya Enkovich
Hi, This patch skips all bounds during debug info generation. Bootstrapped and tested on linux-x86_64. Thanks, Ilya -- gcc/ 2014-06-11 Ilya Enkovich * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args

[PATCH, i386, Pointer Bounds Checker 30/x] Size relocation

2014-06-11 Thread Ilya Enkovich
Hi, This patch adds size relocation support for i386 target. Relocation is used to compute bounds for static objects with incomplete type. Thanks, Ilya -- gcc/ 2014-06-11 Ilya Enkovich * config/i386/i386.md (UNSPEC_SIZEOF): New. (move_size_reloc_si): New

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