This is an archive of the discontinued LLVM Phabricator instance.

[ARM][SchedModels] Convert IsCPSRDefinedPred to MCSchedPredicate
ClosedPublic

Authored by evgeny777 on Oct 15 2020, 6:27 AM.

Diff Detail

Event Timeline

evgeny777 created this revision.Oct 15 2020, 6:27 AM
evgeny777 requested review of this revision.Oct 15 2020, 6:27 AM
dmgreen added inline comments.Oct 19 2020, 2:21 AM
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
193

It's not possible to check this is a Def?

I see a mvneq is not changed though. I'm guessing that predicate info is not added to MCInsts?

andreadb added inline comments.Oct 19 2020, 3:02 AM
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
193

To check if a machine operand is a definition you need the MCInstrDesc.
But then, to obtain the MCInstrDesc you need to query the MCInstrInfo (method get()).

I think that it should be possible to use the new predicate introduced by D89553 to define functions that also check if operands are definitons.

evgeny777 updated this revision to Diff 299015.Oct 19 2020, 5:13 AM

Addressed.
@dmgreen There is no predicate for basic (w/o shift) moves in A57 model, that's why mvneq is not touched.

Alright. I hadn't seen that the variant for IsCPSRDefinedAndPredicatedPred == IsPredicatedPred for MVN's too.

Thanks for adding the def check. LGTM.

dmgreen accepted this revision.Oct 19 2020, 10:09 AM
This revision is now accepted and ready to land.Oct 19 2020, 10:09 AM