[llvm] [llvm][AsmPrinter] Add an option to print instruction latencies (PR #113243)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 19:27:46 PDT 2024
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 f148d5791bae39fdbe6c97559c82b6c6ab64a100 9c59ee34d26d52e594139a0ffc583dba409d239e --extensions cpp -- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/MC/MCDisassembler/Disassembler.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 48d6577db6..3c19f535a9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1092,8 +1092,8 @@ void AsmPrinter::emitFunctionEntryLabel() {
/// \return The maximum expected latency over all the operands or -1
/// if no information is available.
static std::optional<int> getItineraryLatency(const MachineInstr &MI,
- const MachineFunction *MF,
- const MCSubtargetInfo *STI) {
+ const MachineFunction *MF,
+ const MCSubtargetInfo *STI) {
const TargetInstrInfo *TII = MF->getSubtarget().getInstrInfo();
// Check if we have a CPU to get the itinerary information.
@@ -1118,7 +1118,8 @@ static std::optional<int> getItineraryLatency(const MachineInstr &MI,
/// Gets latency information for \p Inst.
/// \return The maximum expected latency over all the definitions or -1
/// if no information is available.
-static std::optional<int> getLatency(const MachineInstr &MI, const MCSubtargetInfo *STI) {
+static std::optional<int> getLatency(const MachineInstr &MI,
+ const MCSubtargetInfo *STI) {
const MCSchedModel &SCModel = STI->getSchedModel();
const MachineFunction *MF = MI.getMF();
``````````
</details>
https://github.com/llvm/llvm-project/pull/113243
More information about the llvm-commits
mailing list