Path: blob/main/contrib/llvm-project/llvm/lib/Target/SystemZ/SystemZConstantPoolValue.h
35266 views
//===- SystemZConstantPoolValue.h - SystemZ constant-pool value -*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H9#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H1011#include "llvm/CodeGen/MachineConstantPool.h"12#include "llvm/Support/ErrorHandling.h"1314namespace llvm {1516class GlobalValue;1718namespace SystemZCP {19enum SystemZCPModifier {20TLSGD,21TLSLDM,22DTPOFF,23NTPOFF24};25} // end namespace SystemZCP2627/// A SystemZ-specific constant pool value. At present, the only28/// defined constant pool values are module IDs or offsets of29/// thread-local variables (written x@TLSGD, x@TLSLDM, x@DTPOFF,30/// or x@NTPOFF).31class SystemZConstantPoolValue : public MachineConstantPoolValue {32const GlobalValue *GV;33SystemZCP::SystemZCPModifier Modifier;3435protected:36SystemZConstantPoolValue(const GlobalValue *GV,37SystemZCP::SystemZCPModifier Modifier);3839public:40static SystemZConstantPoolValue *41Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);4243// Override MachineConstantPoolValue.44int getExistingMachineCPValue(MachineConstantPool *CP,45Align Alignment) override;46void addSelectionDAGCSEId(FoldingSetNodeID &ID) override;47void print(raw_ostream &O) const override;4849// Access SystemZ-specific fields.50const GlobalValue *getGlobalValue() const { return GV; }51SystemZCP::SystemZCPModifier getModifier() const { return Modifier; }52};5354} // end namespace llvm5556#endif575859