[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
Thu Nov 26 07:20:22 PST 2015


hfinkel added a comment.

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

> updates as requested, however some new concerns:
>
> I guess it would make sense to also allow the PostRAScheduler pass to be run at a later point. I tried to do this, but it became very weird to try to override the options.
>
> It is very confusing that these passes are always inserted into the pass list, and then controlled by an option to 'not run'. To then in turn override that option


IIRC, this is done because whether or not to run post-RA scheduling is subtarget-dependent on many architectures, and so the pass needs to be always scheduled and then turn itself on or off depending on the TM object associated with the currently-compiled function.

> - like this patch is doing - only gives the expected behaviour (the scheduler running once at the point specified by the target), as long as the *other* scheding pass is inserted at the standard point. Otherwise, it would run twice! This doesn't seem acceptable.

> 

>   It would also be nice to use the same command line options regardless of where the pass is run, which is not possible as long as the options are needed to 'not run' the pass.


To which options are you referring?

> Perhaps one way would be to let TargetMachine specify to TargetPassConfig to disable the standard insertion of post-ra scheduler pass? That would work for SystemZ, at least. This would work as long as all subtargets follow the same behaviour.  What do you think?


Yes, this makes sense.


http://reviews.llvm.org/D14928





More information about the llvm-commits mailing list