This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On 10/08/14 13:10, Ilya Enkovich wrote:

This patch introduces functions to handle static pointers and static bounds.

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.
	(chkp_add_modification_to_stmt_list): New.
	(chkp_output_static_bounds): New.
	(chkp_finish_file): New.
	(chkp_instrument_function): Remove useless statements
	from static bounds constructors.
	* tree-chkp.h (chkp_register_var_initializer): New.
	(chkp_finish_file): New.
Thanks for clarifying on the testcase. I misunderstood the testing methodology and hence the results made no sense to me :-)

Make the maximum statements a PARAM

diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index b424af8..4b5a773 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -394,6 +394,27 @@ static bool in_chkp_pass;
  #define CHKP_ZERO_BOUNDS_VAR_NAME "__chkp_zero_bounds"
  #define CHKP_NONE_BOUNDS_VAR_NAME "__chkp_none_bounds"

+/* Static checker constructors may become very large and their
+   compilation with optimization may take too much time.
+   Therefore we put a limit to number of statements in one
+   construcor.  Tests with 100 000 statically initialized

+   static bounds initilization.  If VAR is added into
+   bounds initlization list then 1 is returned. Otherwise

+   into list of static initilizer statementes (passed in ARG).

This will be fine with the change to a PARAM and the nit spelling stuff fixed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]