Go to the documentation of this file.
16 #include "llvm/Config/llvm-config.h"
37 bool addCurrentAddress)
39 PCAdjust(PCAdj), Modifier(modifier),
40 AddCurrentAddress(addCurrentAddress) {}
46 bool addCurrentAddress)
48 LabelId(id),
Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
49 AddCurrentAddress(addCurrentAddress) {}
82 ID.AddInteger(LabelId);
83 ID.AddInteger(PCAdjust);
88 if (ACPV->Kind == Kind &&
89 ACPV->PCAdjust == PCAdjust &&
90 ACPV->Modifier == Modifier &&
91 ACPV->LabelId == LabelId &&
92 ACPV->AddCurrentAddress == AddCurrentAddress) {
101 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
103 errs() <<
" " << *
this;
110 O <<
"-(LPC" << LabelId <<
"+" << (unsigned)PCAdjust;
111 if (AddCurrentAddress)
O <<
"-.";
120 ARMConstantPoolConstant::ARMConstantPoolConstant(
Type *Ty,
126 bool AddCurrentAddress)
130 ARMConstantPoolConstant::ARMConstantPoolConstant(
const Constant *
C,
135 bool AddCurrentAddress)
140 ARMConstantPoolConstant::ARMConstantPoolConstant(
const GlobalVariable *GV,
178 bool AddCurrentAddress) {
184 return dyn_cast_or_null<GlobalValue>(CVal);
188 return dyn_cast_or_null<BlockAddress>(CVal);
194 getExistingMachineCPValueImpl<ARMConstantPoolConstant>(
CP, Alignment);
197 CP->getConstants()[
index].Val.MachineCPVal);
198 auto *
Constant = cast<ARMConstantPoolConstant>(CPV);
199 Constant->GVars.insert(GVars.begin(), GVars.end());
211 for (
const auto *GV : GVars)
226 unsigned id,
unsigned char PCAdj,
228 bool AddCurrentAddress)
235 unsigned char PCAdj) {
241 return getExistingMachineCPValueImpl<ARMConstantPoolSymbol>(
CP, Alignment);
265 unsigned id,
unsigned char PCAdj,
267 bool AddCurrentAddress)
269 Modifier, AddCurrentAddress),
275 unsigned char PCAdj) {
281 return getExistingMachineCPValueImpl<ARMConstantPoolMBB>(
CP, Alignment);
286 return ACPMBB && ACPMBB->MBB == MBB &&
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
const BlockAddress * getBlockAddress() const
This is an optimization pass for GlobalISel generic memory operations.
void print(raw_ostream &O) const override
print - Implement operator<<
ARMConstantPoolValue - ARM specific constantpool value.
@ TPOFF
Global Offset Table, Thread Pointer Offset.
void print(raw_ostream &O) const override
print - Implement operator<<
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
ARMConstantPoolSymbol - ARM-specific constantpool values for external symbols.
Abstract base class for all machine specific constantpool value subclasses.
The instances of the Type class are immutable: once they are created, they are never changed.
StringRef getModifierText() const
const GlobalValue * getGV() const
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
@ SECREL
Thread Pointer Offset.
static IntegerType * getInt32Ty(LLVMContext &C)
ARMConstantPoolValue(Type *Ty, unsigned id, ARMCP::ARMCPKind Kind, unsigned char PCAdj, ARMCP::ARMCPModifier Modifier, bool AddCurrentAddress)
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
Return the function type for an intrinsic.
void print(raw_ostream &O) const override
print - Implement operator<<
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
(vector float) vec_cmpeq(*A, *B) C
~ARMConstantPoolValue() override
static ARMConstantPoolSymbol * Create(LLVMContext &C, StringRef s, unsigned ID, unsigned char PCAdj)
This class implements an extremely fast bulk output stream that can only output to a stream.
This struct is a compact representation of a valid (non-zero power of two) alignment.
static ARMConstantPoolMBB * Create(LLVMContext &C, const MachineBasicBlock *mbb, unsigned ID, unsigned char PCAdj)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override
This is an important base class in LLVM.
@ GOT_PREL
Thread Local Storage (General Dynamic Mode)
multiplies can be turned into SHL s
This is an important class for using LLVM in a threaded context.
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
ARMConstantPoolConstant - ARM-specific constant pool values for Constants, Functions,...
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
The address of a basic block.
StringRef - Represent a constant reference to a string, i.e.
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVMContext & getContext() const
All values hold a context through their type.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
StringRef getName() const
Return a constant reference to the value's name.
void print(raw_ostream &O) const override
print - Implement operator<<
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)
bool hasSameValue(ARMConstantPoolValue *ACPV) override
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
@ GOTTPOFF
Global Offset Table, PC Relative.
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override
ARMConstantPoolMBB - ARM-specific constantpool value of a machine basic block.
virtual bool hasSameValue(ARMConstantPoolValue *ACPV)
hasSameValue - Return true if this ARM constpool value can share the same constantpool entry as anoth...
@ SBREL
Section Relative (Windows TLS)