[PATCH] D43023: [TargetSchedule] Expose sub-units of a ProcResGroup in MCProcResourceDesc.
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 08:54:16 PST 2018
gchatelet requested changes to this revision.
gchatelet added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/llvm/MC/MCSchedule.h:47
+ // If the resource has sub-units, a pointer to the first element of an array
+ // of `NumUnits` elements containing the ProcResourceIdx of the sub units.
----------------
What if the resource has no sub-units?
================
Comment at: utils/TableGen/SubtargetEmitter.cpp:591
+ Record *PRDef = ProcModel.ProcResourceDefs[i];
+ if (PRDef->isSubClassOf("ProcResGroup")) {
+ RecVec ResUnits = PRDef->getValueAsListOfDefs("Resources");
----------------
Do you mind writing the negation:
// skipping non ProcResGroup.
if (!PRDef->isSubClassOf("ProcResGroup")) continue;
Repository:
rL LLVM
https://reviews.llvm.org/D43023
More information about the llvm-commits
mailing list