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]

Scheduler tweaks relating to speculation


I'm working on a patch to allow the scheduler to move more insns
backwards across a jump by using predication. Currently I'm using a
slightly extended form of the speculation support, adding another bit to
TODO_SPEC. The following preliminary patch makes a few changes in that
area in preparation, and also cleans up a few things:

* Remove pointless use of "*ts", replace with computing a local
  variable and storing it in TODO_SPEC when done.
* TODO_SPEC can have only three forms, either it is zero, or
  HARD_DEP, or it contains bits in SPECULATIVE (but not HARD_DEP).
  The current code sometimes goes through logical operations to
  compute a known value, HARD_DEP or zero. I found that hard to
  read and understand initially, so I've changed it.
* New function dep_spec_p which decides which of the lists a dep
  should be on.
* Allow insns to be scheduled before all their dependencies are
  resolved (i.e. don't crash when freeing the deps).
* Using that, don't delete deps for debug insns, resolve them
  instead, and remove the big pointless comment about how we're not
  freeing dependencies during scheduling. This is intended for later
  improving backtracking in the presence of debug insns.
* When not using USE_DEPS_LIST (why aren't we using it always?) or
  DO_SPECULATION, we should use zero to initialize DEP_STATUS, so
  that there aren't any bits in SPECULATIVE.

Bootstrapped and tested on i686-linux. I've also built a cross-compiler
to ia64-linux to verify that generated code is identical (using both -O2
and -O2 -fselective-scheduling -fselective-scheduling2). Ok?


Bernd

Attachment: sched-tweaks.diff
Description: Text document


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