LLVM  10.0.0svn
SystemZConstantPoolValue.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H
10 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZCONSTANTPOOLVALUE_H
11 
14 
15 namespace llvm {
16 
17 class GlobalValue;
18 
19 namespace SystemZCP {
25 };
26 } // end namespace SystemZCP
27 
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).
33  const GlobalValue *GV;
35 
36 protected:
39 
40 public:
42  Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
43 
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;
49 
50  // Access SystemZ-specific fields.
51  const GlobalValue *getGlobalValue() const { return GV; }
52  SystemZCP::SystemZCPModifier getModifier() const { return Modifier; }
53 };
54 
55 } // end namespace llvm
56 
57 #endif
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
This class represents lattice values for constants.
Definition: AllocatorList.h:23
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
Definition: FoldingSet.h:305
SystemZCP::SystemZCPModifier getModifier() const
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
Abstract base class for all machine specific constantpool value subclasses.
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
A SystemZ-specific constant pool value.
const GlobalValue * getGlobalValue() const