Page MenuHomePhabricator

[ARM] Cortex-M4 schedule additions

Authored by dmgreen on Sep 24 2019, 4:40 AM.



This is an attempt to fill in some of the missing instructions from the Cortex-M4 schedule, and make it easier to do the same for other ARM cpus.

  • Some instructions are marked as hasNoSchedulingInfo as they are pseudos or otherwise do not require scheduling info
  • A lot of features have been marked not supported
  • Some WriteRes's have been added for cvt instructions.
  • Some extra instruction latencies have been added, notably by relaxing the regex for dsp instruction to catch more cases, and some fp instructions.

This goes a long way to get the CompleteModel working for this CPU. It does not go as far as to get all scheduling info for all output operands correct.

Diff Detail


Event Timeline

dmgreen created this revision.Sep 24 2019, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2019, 4:40 AM

Looks all like very mechanical changes to me. The only thing I am not a big fan of is this UnsupportedFeatures, but I understood that there is not really a much better alternative.

The only question I have is related to the Predicates=[IsWindows] addition, which is a functional change. Do we need a test for that?

Thanks for taking a look.

I believe that those instructions would only be generated on windows targets from ISelLowering, from functions like LowerDYNAMIC_STACKALLOC. As in, they require IsWindows anyway by the fact that they will not be generated anywhere else, we are just teaching ISel the same thing!

But looking again I think it's simpler to make that hasNoSchedulingInfo as it usesCustomInserter anyway, and the scheduler will not see it in the normal scheduler. They get expanded post-isel into a BL call to __chkstk and a sub.

dmgreen updated this revision to Diff 221694.Sep 25 2019, 2:41 AM

Change WIN__CHKSTK from IsWindows to hasNoSchedulingInfo

SjoerdMeijer accepted this revision.Sep 25 2019, 3:00 AM

Cheers, nice one, LGTM

This revision is now accepted and ready to land.Sep 25 2019, 3:00 AM
This revision was automatically updated to reflect the committed changes.