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 [2/n] IPA passes


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 into thunks.

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

	* ipa-chkp.c: New.
	* ipa-chkp.h: New.
	* Makefile.in (OBJS): Add ipa-chkp.o.


+    when linker reolution files are used.  Linker has no info about
s/reolution/???


+    connection between original and instrumented function and
+    therefore we may wrongly decide (due to difference in assember
s/assember/assembler/


+
+  /* We want called_as_built_in recall instrumented calls
+     to instrumented built-in functions.
Sorry, I simply can't parse that sentence... Can you rewrite/revise it to be clearer?




+
+  /* If function type has attribute with arg indexes then
+     we have to copy it fixing attribute ops.  Map for
+     fixing is in indexes array.  */
+  attrs = TYPE_ATTRIBUTES (type);
+  if (lookup_attribute ("nonnull", attrs)
+      || lookup_attribute ("format", attrs)
+      || lookup_attribute ("format_arg", attrs))
So you need to adjust the indices in those attributes so that they refer to the right argument. I get that. My concern is how do we keep the list of attributes that must be fixed up-to-date.

I can easily see someone adding a new argument attribute and folks forgetting to update this code.

Seems to me we need to document the attribute code with a reference back to these ipa-chkp bits. It's not foolproof, but it's better than depending on my memory to catch this stuff during reviews.

OK with the nits above fixed and a suitable comment that folks adding new attributes with parameter indices are likely to see to refer them back to the index adjustment code in ipa-chkp.c.

Thanks,
Jeff


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