[llvm] [RFC][RISCV] Support the large code model. (PR #70308)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 21:41:39 PST 2023


================
@@ -0,0 +1,126 @@
+//===--- RISCVConstantPoolValue.h - RISC-V constantpool value ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the RISC-V specific constantpool value class.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIB_TARGET_RISCV_RISCVCONSTANTPOOLVALUE_H
+#define LLVM_LIB_TARGET_RISCV_RISCVCONSTANTPOOLVALUE_H
+
+#include "llvm/ADT/StringRef.h"
+#include "llvm/CodeGen/MachineConstantPool.h"
+#include "llvm/Support/Casting.h"
+#include "llvm/Support/ErrorHandling.h"
+
+namespace llvm {
+
+class BlockAddress;
+class GlobalValue;
+class LLVMContext;
+
+namespace RISCVCP {
+
+enum RISCVCPKind { ExtSymbol, GlobalValue, BlockAddress };
----------------
topperc wrote:

Can we move this into the class instead of its own namespace? I believe it is an implementation detail of the class now and not used outside.

https://github.com/llvm/llvm-project/pull/70308


More information about the llvm-commits mailing list