This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [18/25] CCP (Stack store/restore)
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Nov 2013 01:06:16 +0400
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [18/25] CCP (Stack store/restore)
- Authentication-results: sourceware.org; auth=none
- References: <20131118105440 dot GL21297 at msticlxl57 dot ims dot intel dot com> <528D1BFD dot 50705 at redhat dot com>
2013/11/21 Jeff Law <email@example.com>:
> On 11/18/13 03:54, Ilya Enkovich wrote:
>> Here is a patch to support BUILT_IN_CHKP_BNDRET and
>> BUILT_IN_CHKP_BIND_BOUNDS in BUILT_IN_STACK_SAVE result uses.
>> 2013-11-15 Ilya Enkovich <firstname.lastname@example.org>
>> * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Handle
>> BUILT_IN_CHKP_BNDRET and BUILT_IN_CHKP_BIND_BOUNDS calls.
> I've looked at this a few times, but I'm having trouble seeing why you need
> this code. Can you please explain why you're doing this?
> Sample code & dumps are helpful, as always:-)
The code in insert_clobber_before_stack_restore is trying to find
BUILT_IN_STACK_RESTORE call matching given BUILT_IN_STACK_SAVE call.
It does search by analyzing uses of BUILT_IN_STACK_SAVE lhs. It does
not expect any uses except BUILT_IN_STACK_RESTORE call, PHI nodes, SSA
name copy and debug statements.
In instrumented code additional possible users are
BUILT_IN_CHKP_BNDRET and BUILT_IN_CHKP_BIND_BOUNDS calls. The first
one gets bounds returned by BUILT_IN_STACK_RESTORE. The second one
binds these bound with pointer to pass to BUILT_IN_STACK_SAVE. Also to
find BUILT_IN_STACK_SAVE we need to search in uses of