This is the mail archive of the gcc@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: Cannot modify jumps after sched2


Paulo Matos schrieb:
Hi,

Is there any good way to define TARGET_CANNOT_MODIFY_JUMPS_P such
that jumps are not modified after sched2?

Or in other words, is there a way to recognize if sched2 has already
been ran (sched2_completed, maybe)?

Such flags would be really helpful, but unfortunately there is nothing like that. In an ideal world, such flags are not needed, but there are situations with the complexity of real-world hardware where such flags were really appreciated.


I came across a similar situation where a flag like combine_completed or split1_completed or ira_in_progress would have been very handy, see

http://gcc.gnu.org/ml/gcc/2011-07/msg00146.html
http://gcc.gnu.org/ml/gcc/2011-07/msg00154.html

In that case I thought about something like

#include "tree-pass.h"

bool
avr_gate_split1 (void)
{
  if (current_pass->static_pass_number
      < pass_match_asm_constraints.pass.static_pass_number)
    return true;

  return false;
}

What happened is that I did not use this. Instead, the code does not use pass meta-information and produced sub-optimal code for that reason.

Johann


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