[PATCH] D42903: [CodeGenSchedule][NFC] Always emit ProcResourceUnits.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 04:26:34 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324228: [CodeGenSchedule][NFC] Always emit ProcResourceUnits. (authored by courbet, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D42903
Files:
llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
Index: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
@@ -1564,6 +1564,14 @@
if (!is_contained(PM.ProcResourceDefs, PRG))
PM.ProcResourceDefs.push_back(PRG);
}
+ // Add ProcResourceUnits unconditionally.
+ for (Record *PRU : Records.getAllDerivedDefinitions("ProcResourceUnits")) {
+ if (!PRU->getValueInit("SchedModel")->isComplete())
+ continue;
+ CodeGenProcModel &PM = getProcModel(PRU->getValueAsDef("SchedModel"));
+ if (!is_contained(PM.ProcResourceDefs, PRU))
+ PM.ProcResourceDefs.push_back(PRU);
+ }
// Finalize each ProcModel by sorting the record arrays.
for (CodeGenProcModel &PM : ProcModels) {
std::sort(PM.WriteResDefs.begin(), PM.WriteResDefs.end(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42903.132809.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180205/d97ca356/attachment.bin>
More information about the llvm-commits
mailing list