This is the mail archive of the gcc-patches@gcc.gnu.org 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:
Hi,

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

Thanks,
Ilya
--
2014-10-08  Ilya Enkovich  <ilya.enkovich@intel.com>

	* 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
s/construcor/constructor/



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

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

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

jeff


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