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 [14/n] Optimize constant checks


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

This patch adds a removal of checks known to always pass into checker optimization.

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

	* tree-chkp.c (chkp_remove_check_if_pass): New.
	(chkp_remove_constant_checks): New.
	(chkp_opt_execute): Run constant check removal
	algorithm.
So again, I'd like to see all the optimization stuff pulled into its own file and and basic tests that we can use for smoke testing now and in the future.




+  else if (result == -1)
+    {
+      if (dump_file && (dump_flags & TDF_DETAILS))
+	fprintf (dump_file, "  action: keep check (always fail)\n");
+    }
ISTM this case should generate a compile-time warning. We've just determined statically that this test is always going to fail, right?

+      /* Iterate throw all found checks in BB.  */
s/throw/through/

With the changes above, this will be OK for the trunk.


Jeff


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