From 3bdd02735bca2a5c31779e2cc24e27b83d0f24e1 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 17 Feb 2021 11:37:06 -0800 Subject: [PATCH] [RISCV] Localize RISCVZvlssegTable to RISCVISelDAGToDAG.cpp, the only place it is used. --- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 16 ++++++++++++++++ llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 6 ------ llvm/lib/Target/RISCV/RISCVISelLowering.h | 18 +----------------- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp index fabbe5daeee7..2c82704428ff 100644 --- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -25,6 +25,22 @@ using namespace llvm; #define DEBUG_TYPE "riscv-isel" +namespace RISCVZvlssegTable { +struct RISCVZvlsseg { + unsigned IntrinsicID; + uint8_t SEW; + uint8_t LMUL; + uint8_t IndexLMUL; + uint16_t Pseudo; +}; + +using namespace RISCV; + +#define GET_RISCVZvlssegTable_IMPL +#include "RISCVGenSearchableTables.inc" + +} // namespace RISCVZvlssegTable + void RISCVDAGToDAGISel::PostprocessISelDAG() { doPeepholeLoadStoreADDI(); } diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp index ca9aadebfcb7..44f70582c717 100644 --- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -5475,10 +5475,4 @@ namespace RISCVVIntrinsicsTable { } // namespace RISCVVIntrinsicsTable -namespace RISCVZvlssegTable { - -#define GET_RISCVZvlssegTable_IMPL -#include "RISCVGenSearchableTables.inc" - -} // namespace RISCVZvlssegTable } // namespace llvm diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.h b/llvm/lib/Target/RISCV/RISCVISelLowering.h index 7a9eec2c0456..b91437a975ba 100644 --- a/llvm/lib/Target/RISCV/RISCVISelLowering.h +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.h @@ -450,22 +450,6 @@ using namespace RISCV; } // end namespace RISCVVIntrinsicsTable -namespace RISCVZvlssegTable { - -struct RISCVZvlsseg { - unsigned IntrinsicID; - uint8_t SEW; - uint8_t LMUL; - uint8_t IndexLMUL; - uint16_t Pseudo; -}; - -using namespace RISCV; - -#define GET_RISCVZvlssegTable_DECL -#include "RISCVGenSearchableTables.inc" - -} // namespace RISCVZvlssegTable -} +} // end namespace llvm #endif