Page MenuHomePhabricator

[Schedule] Add a MultiHazardRecognizer

Authored by dmgreen on Jan 17 2020, 11:07 AM.



This adds a MultiHazardRecognizer and starts to make use of it in the ARM backend. The idea of the class is to allow multiple independent hazard recognizers to be added to a single base MultiHazardRecognizer, allowing them to all work in parallel without requiring them to be chained into subclasses. They can then be added or not based on cpu or subtarget features, which will become useful in the ARM backend once more hazard recognizers are being used for various things.

This also renames ARMHazardRecognizer to ARMHazardRecognizerFPMLx in the process, to more clearly explain what that recognizer is designed for.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 17 2020, 11:07 AM
dmgreen updated this revision to Diff 299768.Oct 21 2020, 11:53 AM
dmgreen added reviewers: SjoerdMeijer, samtebbs.


Hazard recognisers is not really my area, but this looks like a straightforward refactoring to me. Two nits: one is a style issue inlined, the other is just a quick question if you plan to use this extra flexibility any time soon?


No need for the curly brackets. Same for all the other loops below.

arsenm added inline comments.Oct 22 2020, 6:32 AM

No virtual + override


These should just be unique_ptr to begin with and avoid the explicit deletes here

dmgreen updated this revision to Diff 300042.Oct 22 2020, 10:49 AM

Thanks for the suggestions. Changed to use unique_ptr's and cleaned up the brackets/virtuals.

just a quick question if you plan to use this extra flexibility any time soon?

Yep. Plan is to make use of it some Cortex-M7 scheduling we are aiming to upstream soon, along with hopefully more in the future.

SjoerdMeijer accepted this revision.Oct 22 2020, 12:30 PM

LGTM, but please wait a day in case @arsenm has more comments.

This revision is now accepted and ready to land.Oct 22 2020, 12:30 PM
This revision was automatically updated to reflect the committed changes.