[PATCH] D89458: [ARM][SchedModels] Convert IsPredicatedPred to MCSchedPredicate
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 15:23:34 PDT 2020
andreadb added inline comments.
================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp:183-186
+bool ARM_MC::isPredicated(const MCInst &MI) {
+ int PredOpIdx = MI.getDesc()->findFirstPredOperandIdx();
+ return PredOpIdx != -1 && MI.getOperand(PredOpIdx).getImm() != ARMCC::AL;
+}
----------------
It is unfortunate that the MCSchedPredicate framework is not expressive enough to let users define predicates on MCInstrDesc.
Your idea of adding an extra field (a MCInstrDesc pointer) to MCInst does solve the issue.
To be honest, at the moment I don't think that there are other ways to fix this issue. The only alternative is to expand/improve the MCSchedPredicate framework. However, it is not a simple task, and it would requires modifications to the SubtargetEmitter, the InstructionInfoEmitter and the PredicateExpander.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89458/new/
https://reviews.llvm.org/D89458
More information about the llvm-commits
mailing list