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]
Other format: [Raw text]

Re: rtlopt merge part 2 - bb-reorder rewrite (updated)


> > > ! static int
> > > ! get_uncond_jump_length ()
> > > ! {
> > > !   rtx label, jump;
> > > !   int length;
> > > ! 
> > > !   label = emit_label_before (gen_label_rtx (), get_insns ());
> > > !   jump = emit_jump_insn (gen_jump (label));
> > > ! 
> > > !   length = get_attr_length (jump);
> > > ! 
> > > !   delete_insn (jump);
> > > !   delete_insn (label);
> > > !   return length;
> > >   }
> > 
> > It'd be nice to call this only once. 
> > 
> > Have you looked to see that this produces reasonable results
> > for targets for which branch shortening is used?  Mostly I 
> > mean "doesn't crash", since this is only a heuristic, but
> > "returns max size" would be nice.
> 
> It does return minimal size.  get_attr_length is having code to set
> 0 addresses.  PA port does have C function that access addresses
> unconditionally, but I sent patch for that some time ago.
> Minimal size is probably good estimate.

I have found out now that it returns the maximum size (on i386 it
returned 5)

Josef


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