[Alignment][NFC] Remove unneeded llvm:: scoping on Align types
[llvm-complete.git] / lib / Target / SystemZ / SystemZConstantPoolValue.h
blob6cb7710abdfe31df0a3f6a6c5b3929548856976a
1 //===- SystemZConstantPoolValue.h - SystemZ constant-pool value -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H
10 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H
12 #include "llvm/CodeGen/MachineConstantPool.h"
13 #include "llvm/Support/ErrorHandling.h"
15 namespace llvm {
17 class GlobalValue;
19 namespace SystemZCP {
20 enum SystemZCPModifier {
21 TLSGD,
22 TLSLDM,
23 DTPOFF,
24 NTPOFF
26 } // end namespace SystemZCP
28 /// A SystemZ-specific constant pool value. At present, the only
29 /// defined constant pool values are module IDs or offsets of
30 /// thread-local variables (written x@TLSGD, x@TLSLDM, x@DTPOFF,
31 /// or x@NTPOFF).
32 class SystemZConstantPoolValue : public MachineConstantPoolValue {
33 const GlobalValue *GV;
34 SystemZCP::SystemZCPModifier Modifier;
36 protected:
37 SystemZConstantPoolValue(const GlobalValue *GV,
38 SystemZCP::SystemZCPModifier Modifier);
40 public:
41 static SystemZConstantPoolValue *
42 Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
44 // Override MachineConstantPoolValue.
45 int getExistingMachineCPValue(MachineConstantPool *CP,
46 unsigned Alignment) override;
47 void addSelectionDAGCSEId(FoldingSetNodeID &ID) override;
48 void print(raw_ostream &O) const override;
50 // Access SystemZ-specific fields.
51 const GlobalValue *getGlobalValue() const { return GV; }
52 SystemZCP::SystemZCPModifier getModifier() const { return Modifier; }
55 } // end namespace llvm
57 #endif