Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jeff Law
On 5/28/19 9:48 AM, Jakub Jelinek wrote: > On Tue, May 28, 2019 at 08:30:59AM -0700, H.J. Lu wrote: >>> We shouldn't generate ENDBR in that case, nothing can goto to bar (otherwise >>> it would remain a normal label, not a deleted label). >>> >> >> But return value of func () may be used with indir

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Tue, May 28, 2019 at 08:30:59AM -0700, H.J. Lu wrote: > > We shouldn't generate ENDBR in that case, nothing can goto to bar (otherwise > > it would remain a normal label, not a deleted label). > > > > But return value of func () may be used with indirect jump. No, it may be used say to print t

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread H.J. Lu
On Tue, May 28, 2019 at 8:16 AM Jakub Jelinek wrote: > > On Tue, May 28, 2019 at 08:10:19AM -0700, H.J. Lu wrote: > > On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > > > > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > > > For NOTE_INSN_DELETED_LABEL, we should check if

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Tue, May 28, 2019 at 08:10:19AM -0700, H.J. Lu wrote: > On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > > > if its address is taken. Also ix86_

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread H.J. Lu
On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > > if its address is taken. Also ix86_init_large_pic_reg shouldn't set > > > LABEL_PRESERVE_P (in_struct)

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > if its address is taken. Also ix86_init_large_pic_reg shouldn't set > > LABEL_PRESERVE_P (in_struct) since NOTE_INSN_DELETED_LABEL is suffcient > > to keep the labe