llvm.org GIT mirror llvm / 703a63c
[CodeGenSchedule][NFC] Always emit ProcResourceUnits. Summary: Right now only the ProcResourceUnits that are directly referenced by instructions are emitted. This change emits all of them, so that analysis passes can use the information. This has no functional impact. It typically adds a few entries (e.g. 4 for X86/haswell) to the generated ProcRes table. Reviewers: gchatelet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42903 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324228 91177308-0d34-0410-b5e6-96231b3b80d8 Clement Courbet 2 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
15631563 if (!is_contained(PM.ProcResourceDefs, PRG))
15641564 PM.ProcResourceDefs.push_back(PRG);
15651565 }
1566 // Add ProcResourceUnits unconditionally.
1567 for (Record *PRU : Records.getAllDerivedDefinitions("ProcResourceUnits")) {
1568 if (!PRU->getValueInit("SchedModel")->isComplete())
1569 continue;
1570 CodeGenProcModel &PM = getProcModel(PRU->getValueAsDef("SchedModel"));
1571 if (!is_contained(PM.ProcResourceDefs, PRU))
1572 PM.ProcResourceDefs.push_back(PRU);
1573 }
15661574 // Finalize each ProcModel by sorting the record arrays.
15671575 for (CodeGenProcModel &PM : ProcModels) {
15681576 std::sort(PM.WriteResDefs.begin(), PM.WriteResDefs.end(),