On Thu, Nov 6, 2014 at 3:48 AM, Ilya Enkovich <enkovich....@gmail.com> wrote: > Hi, > > This is the first patch in a series to enable builtin function calls > instrumentation by Poitner Bounds Checker. Previously builtins > instrumentation was disabled in checker because it allowed two function calls > with the same function code have different set of arguments. Here I try > another approach where function codes are not reused by instrumented calls. > > Basic idea is to provide each function code with a pair to be used for > instrumented call. It's achieved by additional include of builtins.def into > built_in_class enum. Instrumented builtins shouldn't be visible for users. > Also when checker is disabled we don't need decls for them at all. Therefore > function decls for instrumented function are not created at compiler > initialization, but lazily created on demand. These decls are mainly > requested by checker itslef and by LTO streamer to read instrumented code. > > This patch introduces new builtin codes, functions for builtin clones > creation and modifies LTO streamer. > > Thanks, > Ilya > -- > 2014-11-06 Ilya Enkovich <ilya.enkov...@intel.com> > > * tree-core.h (built_in_class): Add builtin codes to be used > by Pointer Bounds Checker for instrumented builtin functions. > * tree-streamer-in.c: Include ipa-chkp.h. > (streamer_get_builtin_tree): Create instrumented decl if > required. > * ipa-chkp.h (chkp_maybe_clone_builtin_fndecl): New. > * ipa-chkp.c (chkp_build_instrumented_fndecl): Support builtin > function decls. > (chkp_maybe_clone_builtin_fndecl): New. > (chkp_maybe_create_clone): Support builtin function decls. > >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 -- H.J.