This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Clear out /s field when deleting label


Thank you for your comment.

Richard Henderson wrote:
 > > 	* flow.c (flow_delete_insn_chain): Clear out /s field so that
 > > 	haifa-sched.c:add_dependence doesn't get confused.
 > 
 > Haifa shouldn't have been looking at LABEL_PRESERVE_P to begin with.

Yes.  Please note that code_label changes to note here.  Without this
patch, code_label/s becomes note/s.  Add_dependence looks the /s flag
by SCHED_GROUP_P(insn), and get confused.  With this patch, code_label/s
becomes note.

			*	*	*

 > This isn't going to work.  Once the label is deleted, it is
 > no longer anchored to one spot, and may float around.  When
 > it does, your pc-relative offsets will break.

Umm...

 > I'd suggest something a bit more magic.
 > 
 > 	(parallel [(call (...))
 > 		   (use (const_int 45))])
 > 
 >   emits
 > 
 > 	bsrf $r1
 >     .LPLT45:
 > 	nop
 > 
 > The use in the const pool could be a symbol ref, or whatever,
 > so long as it knows that `45' is the magic number for that call.

Before using code_label, I've taken the approach like above.  It almost
works.  However, when expand_inline_function is used with that constucts, 
it results duplicated labels (say, .LPLT45 is emitted twice or more).

So, I thought that we need some constructs which is generated on copy_rtx.

Is there any rather than code_label?  Or another approach?
-- 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]