This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [7/25] Suppress BUILT_IN_CHKP_ARG_BND optimizations.
- From: Jeff Law <law at redhat dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 05 Nov 2013 10:12:33 -0700
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [7/25] Suppress BUILT_IN_CHKP_ARG_BND optimizations.
- Authentication-results: sourceware.org; auth=none
- References: <20131031090213 dot GC54327 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3gBc=CHDranqXo49NG6yFMSc3d-N8buFtjSS5G5Nga5w at mail dot gmail dot com> <4115420e-30be-445c-a68a-46168b939c01 at email dot android dot com> <CAMbmDYaQ+2YKDsUXVfUxw3VJ=njiZm6uOTduwi8tS9rNoEoJ2g at mail dot gmail dot com>
On 11/05/13 05:02, Ilya Enkovich wrote:
If I just set abnormal phi flag for SSA_NAME, SSA verifier should fail
because it does not used in abnormal phi, shouldn't it?
Well, we can also change the verifier to not fail when it finds that
flag set on a pointer when bounds checking is enabled.
Also it would
prevent all optimizations for these SSA_NAMEs right? Instrumentation
is performed on the earlier stage, right after we build SSA. I think
using abnormal phi flag and binding pointers with bounds via calls
would prevent some useful optimizations.
It certainly prevents some optimizations, but it's main purpose is to
avoid certain copy propagation and coalescing. If you don't set that
flag, there's probably all kinds places you're going to have to hack up
to keep the properties you desire for bounded pointers.
I would rather be a bit conservative and miss some optimizations by
setting SSA_NAME_OCCURS_IN_ABNORMAL_PHI than be continually hacking up
passes to special case bounded pointers. We can obviously revisit this
decision later.
Jeff