[PATCH] D95692: [Pipeliner] Fixed optimization remarks and debug dumps Initiation Interval value
Marianne Mailhot-Sarrasin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 11:46:45 PST 2021
mamai updated this revision to Diff 324069.
mamai added a comment.
Updated patch with the cleaner approach of creating a getInitiationInterval() function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95692/new/
https://reviews.llvm.org/D95692
Files:
llvm/include/llvm/CodeGen/MachinePipeliner.h
llvm/lib/CodeGen/MachinePipeliner.cpp
Index: llvm/lib/CodeGen/MachinePipeliner.cpp
===================================================================
--- llvm/lib/CodeGen/MachinePipeliner.cpp
+++ llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -2049,9 +2049,8 @@
}
bool scheduleFound = false;
- unsigned II = 0;
// Keep increasing II until a valid schedule is found.
- for (II = MII; II <= MAX_II && !scheduleFound; ++II) {
+ for (unsigned II = MII; II <= MAX_II && !scheduleFound; ++II) {
Schedule.reset();
Schedule.setInitiationInterval(II);
LLVM_DEBUG(dbgs() << "Try to schedule with " << II << "\n");
@@ -2124,7 +2123,8 @@
scheduleFound = Schedule.isValidSchedule(this);
}
- LLVM_DEBUG(dbgs() << "Schedule Found? " << scheduleFound << " (II=" << II
+ LLVM_DEBUG(dbgs() << "Schedule Found? " << scheduleFound
+ << " (II=" << Schedule.getInitiationInterval()
<< ")\n");
if (scheduleFound) {
@@ -2132,7 +2132,8 @@
Pass.ORE->emit([&]() {
return MachineOptimizationRemarkAnalysis(
DEBUG_TYPE, "schedule", Loop.getStartLoc(), Loop.getHeader())
- << "Schedule found with Initiation Interval: " << ore::NV("II", II)
+ << "Schedule found with Initiation Interval: "
+ << ore::NV("II", Schedule.getInitiationInterval())
<< ", MaxStageCount: "
<< ore::NV("MaxStageCount", Schedule.getMaxStageCount());
});
Index: llvm/include/llvm/CodeGen/MachinePipeliner.h
===================================================================
--- llvm/include/llvm/CodeGen/MachinePipeliner.h
+++ llvm/include/llvm/CodeGen/MachinePipeliner.h
@@ -526,6 +526,9 @@
/// Set the initiation interval for this schedule.
void setInitiationInterval(int ii) { InitiationInterval = ii; }
+ /// Return the initiation interval for this schedule.
+ int getInitiationInterval() const { return InitiationInterval; }
+
/// Return the first cycle in the completed schedule. This
/// can be a negative value.
int getFirstCycle() const { return FirstCycle; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95692.324069.patch
Type: text/x-patch
Size: 2077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210216/7f49b249/attachment.bin>
More information about the llvm-commits
mailing list