[PATCH] D14928: [PostRA scheduling] Allow a subtarget to do scheduling when it wants post RA

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 12:57:36 PST 2015


hfinkel added a comment.

In http://reviews.llvm.org/D14928#296525, @jonpa wrote:

> True that those passes could be moved, but I am thinking that there is also the SystemZLongBranch pass. It can split compare&branch instructions, which would then give room for scheduler to put the compare into an empty slot somewhere if possible. (This pass can not be moved before block placement, of course.)
>
> This may or may not be important (perhaps in some loop?), but it couldn't hurt. Considering the comment I quoted before from Passes.cpp, it seems that also others may like to try this.


Okay, I'm convinced. The argument is simple (and should be documented as such), branch relaxation (on some targets) can expose additional post-RA scheduling opportunities. Branch relaxation must happen after block placement. Thus, we want the option of running post-RA scheduling after branch relaxation instead of before it.

I recommend that we name the callback:

  virtual bool targetSchedulesPostRAScheduling() const { return false; }

and update the comment to explain the situation (as I did here).


http://reviews.llvm.org/D14928





More information about the llvm-commits mailing list