[llvm] [llvm-mca][FeatureRequest] Itimeline graph, note source of delay for each instruction (PR #136423)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 04:56:55 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/tools/llvm-mca/Views/TimelineView.cpp llvm/tools/llvm-mca/Views/TimelineView.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/tools/llvm-mca/Views/TimelineView.cpp b/llvm/tools/llvm-mca/Views/TimelineView.cpp
index 16534328b..bdbc0d916 100644
--- a/llvm/tools/llvm-mca/Views/TimelineView.cpp
+++ b/llvm/tools/llvm-mca/Views/TimelineView.cpp
@@ -235,9 +235,9 @@ void TimelineView::printTimelineViewEntry(formatted_raw_ostream &OS,
// Zero latency instructions have the same value for CycleDispatched,
// CycleIssued and CycleExecuted.
for (unsigned I = CycleDispatched + 1, E = Entry.CycleIssued; I < E; ++I)
- if (I >= Entry.CycleReady)
+ if (I >= Entry.CycleReady)
OS << TimelineView::DisplayChar::Waiting;
- else
+ else
OS << TimelineView::DisplayChar::Pending;
if (Entry.CycleIssued == Entry.CycleExecuted)
@@ -265,12 +265,12 @@ void TimelineView::printTimelineViewEntry(formatted_raw_ostream &OS,
static void printTimelineHeader(formatted_raw_ostream &OS, unsigned Cycles) {
OS << "\n\nTimeline view:\n"
"D: Instruction dispatched\n";
- "e: Instruction executing\n";
- "E: Instruction executed (write-back stage)\n";
- "P: Instruction waiting for data dependency\n";
- "=: Instruction waiting for available HW resource\n";
- "-: Instruction executed, waiting to retire in order.\n";
- '\n';
+ "e: Instruction executing\n";
+ "E: Instruction executed (write-back stage)\n";
+ "P: Instruction waiting for data dependency\n";
+ "=: Instruction waiting for available HW resource\n";
+ "-: Instruction executed, waiting to retire in order.\n";
+ '\n';
if (Cycles >= 10) {
OS.PadToColumn(10);
for (unsigned I = 0; I <= Cycles; ++I) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/136423
More information about the llvm-commits
mailing list