From 8dacf55af4fe320befb325ad93dd76c4c50c03e9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 20 Jul 2023 08:03:59 -0700 Subject: [PATCH] [RISCV] Order the RISCVInstrInfo*.td includes for standard extensions into logical groups. NFC There are some ordering dependency between these files. -F must be included before D, Zfh, and Zfa. I recently suggested Zfbfmin should be after Zfh. -V must be before Zvk. -Zc must be after Zb since Zbb instructions can be compressed. So I've grouped all the scalar FP together. The vector together. And put the compressed instructions at the end. Reviewed By: asb, wangpc Differential Revision: https://reviews.llvm.org/D155780 --- llvm/lib/Target/RISCV/RISCVInstrInfo.td | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td index a313581..72d4cbc 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td @@ -1929,23 +1929,36 @@ def : Pat<(binop_allwusers GPR:$rs1, (AddiPair:$rs2)), // Standard extensions //===----------------------------------------------------------------------===// +// Multiply and Division include "RISCVInstrInfoM.td" + +// Atomic include "RISCVInstrInfoA.td" + +// Scalar FP include "RISCVInstrInfoF.td" include "RISCVInstrInfoD.td" -include "RISCVInstrInfoC.td" +include "RISCVInstrInfoZfh.td" +include "RISCVInstrInfoZfbfmin.td" +include "RISCVInstrInfoZfa.td" + +// Scalar bitmanip and cryptography include "RISCVInstrInfoZb.td" -include "RISCVInstrInfoZc.td" include "RISCVInstrInfoZk.td" + +// Vector include "RISCVInstrInfoV.td" include "RISCVInstrInfoZvfbf.td" include "RISCVInstrInfoZvk.td" -include "RISCVInstrInfoZfa.td" -include "RISCVInstrInfoZfbfmin.td" -include "RISCVInstrInfoZfh.td" + +// Integer include "RISCVInstrInfoZicbo.td" include "RISCVInstrInfoZicond.td" +// Compressed +include "RISCVInstrInfoC.td" +include "RISCVInstrInfoZc.td" + //===----------------------------------------------------------------------===// // Vendor extensions //===----------------------------------------------------------------------===// -- 2.7.4