Skip to content

Conversation

@mshockwave
Copy link
Member

This line was previously removed when 12d4724 moved it to RISCVInstrInfo.h. But we probably don't want to have dangling #define *_DECL (RISCVGenSearchableTables.inc will #undef these macros) and I think there is no harm putting declarations of those search table functions in RISCVISelDAGToDAG.h.

@llvmbot
Copy link
Member

llvmbot commented Feb 8, 2025

@llvm/pr-subscribers-backend-risc-v

Author: Min-Yih Hsu (mshockwave)

Changes

This line was previously removed when 12d4724 moved it to RISCVInstrInfo.h. But we probably don't want to have dangling #define *_DECL (RISCVGenSearchableTables.inc will #undef these macros) and I think there is no harm putting declarations of those search table functions in RISCVISelDAGToDAG.h.


Full diff: https://github.com/llvm/llvm-project/pull/126326.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h (+1)
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
index 592f517358506b..bb786e4b2bb40f 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
@@ -278,6 +278,7 @@ struct VLX_VSXPseudo {
 #define GET_RISCVVSETable_DECL
 #define GET_RISCVVLXTable_DECL
 #define GET_RISCVVSXTable_DECL
+#include "RISCVGenSearchableTables.inc"
 } // namespace RISCV
 
 } // namespace llvm

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mshockwave mshockwave merged commit 7464dc8 into llvm:main Feb 8, 2025
10 checks passed
@mshockwave mshockwave deleted the patch/riscv/search-table-include branch February 8, 2025 01:14
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
…126326)

This line was previously removed when
12d4724 moved it to RISCVInstrInfo.h.
But we probably don't want to have dangling `#define *_DECL`
(RISCVGenSearchableTables.inc will `#undef` these macros) and I think
there is no harm putting declarations of those search table functions in
RISCVISelDAGToDAG.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants