This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Pointer Bounds Checker 14/x] Passes [14/n] Optimize constant checks
- From: Jeff Law <law at redhat dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 09 Oct 2014 11:13:35 -0600
- Subject: Re: [PATCH, Pointer Bounds Checker 14/x] Passes [14/n] Optimize constant checks
- Authentication-results: sourceware.org; auth=none
- References: <20141008192106 dot GN13454 at msticlxl57 dot ims dot intel dot com>
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