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, MPX, 2/X] Pointers Checker [6/25] Instrumentation pass


On 05 Nov 15:05, Joseph S. Myers wrote:
> On Tue, 5 Nov 2013, Ilya Enkovich wrote:
> 
> > > So the next question is why this file includes expr.h.  It's a tree-*
> > > file.  The presumption is that it should not need anything to do with RTL
> > > and so shouldn't need to include expr.h, rtl.h or tm.h, directly or
> > > indirectly.
> > >
> > > If there are just a few bits of RTL-related code for this functionality,
> > > but most of it works on GIMPLE, I'd suggest separating the RTL pieces out
> > > into a separate file.
> > 
> > It exports some functions manipulating with RTL and used by expand and
> > target.  Iface macros DECL_BOUNDS_RTL and SET_DECL_BOUNDS_RTL also use
> > rtx type.  Should I make two separate .h and .c files or include RTL
> > part into something existent?
> 
> I'd suggest separate files.
> 
> -- 
> Joseph S. Myers
> joseph@codesourcery.com

Here is a new split.  I still include rtl.h into tree-chkp.c for MEM_P usage.  Is it OK?

Thanks,
Ilya
--
gcc/

2013-11-06  Ilya Enkovich  <ilya.enkovich@intel.com>

	* tree-chkp.c: New.
	* tree-chkp.h: New.
	* rtl-chkp.c: New.
	* rtl-chkp.h: New.
	* Makefile.in (OBJS): Add tree-chkp.o, rtl-chkp.o.
	(GTFILES): Add tree-chkp.c.
	* c-family/c.opt (fchkp-check-incomplete-type): New.
	(fchkp-zero-input-bounds-for-main): New.
	(fchkp-first-field-has-own-bounds): New.
	(fchkp-narrow-to-innermost-array): New.
	(fchkp-optimize): New.
	(fchkp-use-fast-string-functions): New.
	(fchkp-use-nochk-string-functions): New.
	(fchkp-use-static-bounds): New.
	(fchkp-use-static-const-bounds): New.
	(fchkp-treat-zero-dynamic-size-as-infinite): New.
	(fchkp-check-read): New.
	(fchkp-check-write): New.
	* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
	__CHKP__ macro when Pointer Bounds Checker is on.
	* passes.def (pass_chkp): New.
	(pass_chkp_opt): New.
	* toplev.c: include tree-chkp.h.
	(compile_file): Add chkp_finish_file call.
	* tree-pass.h (make_pass_chkp): New.
	(make_pass_chkp_opt): New.

Attachment: mpx-pass-6-pass.patch
Description: Text document


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