This is the mail archive of the 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: non-local goto optimization

> m68k is using current_function_has_nonlocal_label and now the pic register
> isn't restored anymore during unwind.

Nathan's patch has replaced only 1 set of current_function_has_nonlocal_label, 
with a set of current_function_calls_unwind_init, so you can very likely fix 
the problem by testing current_function_calls_unwind_init (for the PIC reg).

> The condition has become nontrivial and I'd like to avoid simliar problems
> in the future. I wouldn't exactly call it overkill, it's quite cheap and
> makes the dependency that reload wants to save/restore all register
> explicit.

What about renaming calls_unwind_init to saves_all_registers and have the 
following in reload?

   if (current_function_has_nonlocal_label && has_nonexceptional_receiver ())
     current_function_saves_all_registers = 1;

   if (current_function_saves_all_registers)
     for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
       if (!call_used_regs[i] && !fixed_regs[i] && !LOCAL_REGNO (i))
         df_set_regs_ever_live (i, true);

Eric Botcazou

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