2013/11/21 Jeff Law <l...@redhat.com>: > On 11/18/13 03:54, Ilya Enkovich wrote: >> >> Hi, >> >> Here is a patch to support BUILT_IN_CHKP_BNDRET and >> BUILT_IN_CHKP_BIND_BOUNDS in BUILT_IN_STACK_SAVE result uses. >> >> Thanks, >> Ilya >> -- >> 2013-11-15 Ilya Enkovich <ilya.enkov...@intel.com> >> >> * 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 BUILT_IN_CHKP_BIND_BOUNDS result. Thanks, Ilya > > jeff >