[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 01:36:18 PST 2015
hfinkel added a comment.
In http://reviews.llvm.org/D14928#296362, @jonpa wrote:
> I want to add a scheduling pass after all else - that is as the last pass added in addPreEmitPass(). The motivation is that the decoder needs special grouping of instructions which other optimizations in PreEmitPass() would otherwise disrupt. SystemZ currently runs 3 optimization passes in pre-emit with the motivation that they should be subordinate to other optimizations.
I think that you should move SystemZShortenInstPass and SystemZElimComparePass into addPreSched2 instead of having them in addPreEmitPass. That should fix your problem. Doing that might require that you teach your implementations of AnalyzeBranch, ReverseBranchCondition, RemoveBranch, and InsertBranch about BRCT(G). That seems like the right solution.
> It seems that currently PostMachineScheduler is a pass that is only intended to replace the PostRAScheduler pass. An alternative then - if you would rather not see this new (ugly?) subtarget hook -
> would be that Targets wanting a custom scheduler some place else would also insert its own pass to run it.
No, we'd just make a better API for it.
http://reviews.llvm.org/D14928
More information about the llvm-commits
mailing list