59 std::string SymName(
Sym);
62 SymName =
".L" + SymName;
71 std::string SymName(MCSym->
getName());
78 TS->emitLiteral(LblSym, Expr,
false);
95 Type *Ty =
C->getType();
96 if (
const auto *CFP = dyn_cast<ConstantFP>(
C)) {
98 CFP->getValueAPF().bitcastToAPInt().getSExtValue(),
OutContext);
99 }
else if (
const auto *CI = dyn_cast<ConstantInt>(
C)) {
101 }
else if (isa<PointerType>(Ty)) {
107 TS->emitLiteral(LblSym,
Value,
false);
118 const std::vector<MachineConstantPoolEntry> &CP = MCP->
getConstants();
127 TS->startLiteralSection(CS);
207 for (
unsigned i = 0, e =
MI->getNumOperands(); i != e; ++i) {
static MCSymbolRefExpr::VariantKind getModifierVariantKind(ARMCP::ARMCPModifier Modifier)
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define LLVM_EXTERNAL_VISIBILITY
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaAsmPrinter()
static MCSymbolRefExpr::VariantKind getModifierVariantKind(XtensaCP::XtensaCPModifier Modifier)
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
MCSymbol * getSymbol(const GlobalValue *GV) const
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
TargetMachine & TM
Target machine description.
virtual MCSymbol * GetCPISymbol(unsigned CPID) const
Return the symbol for the specified constant pool entry.
MachineFunction * MF
The current machine function.
MCContext & OutContext
This is the context for the output file that we are streaming.
MCSymbol * GetExternalSymbolSymbol(Twine Sym) const
Return the MCSymbol for the specified ExternalSymbol.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
virtual const MCExpr * lowerConstant(const Constant *CV)
Lower the specified LLVM Constant to an MCExpr.
This is an important base class in LLVM.
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(unsigned Reg)
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createImm(int64_t Val)
Instances of this class represent a uniqued identifier for a section in the current translation unit.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef getName() const
getName - Get the symbol name.
This class is a data container for one entry in a MachineConstantPool.
bool isMachineConstantPoolEntry() const
isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry is indeed a target specific ...
union llvm::MachineConstantPoolEntry::@196 Val
The constant itself.
MachineConstantPoolValue * MachineCPVal
const Constant * ConstVal
Abstract base class for all machine specific constantpool value subclasses.
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
const std::vector< MachineConstantPoolEntry > & getConstants() const
Function & getFunction()
Return the LLVM function that this machine code represents.
MachineConstantPool * getConstantPool()
getConstantPool - Return the constant pool object for the current function.
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
const GlobalValue * getGlobal() const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Register getReg() const
getReg - Returns the register number.
@ MO_Immediate
Immediate operand.
@ MO_ConstantPoolIndex
Address of indexed Constant in Constant Pool.
@ MO_GlobalAddress
Address of a global value.
@ MO_RegisterMask
Mask of preserved registers.
@ MO_Register
Register operand.
int64_t getOffset() const
Return the offset from the symbol in this operand.
StringRef - Represent a constant reference to a string, i.e.
MCSection * SectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const
This method computes the appropriate section to emit the specified global variable or function defini...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
MCOperand LowerSymbolOperand(const MachineOperand &MO, MachineOperand::MachineOperandType MOTy, unsigned Offset) const
void emitMachineConstantPoolEntry(const MachineConstantPoolEntry &CPE, int i)
void emitConstantPool() override
Print to the current output stream assembly representations of the constants in the constant pool MCP...
void lowerToMCInst(const MachineInstr *MI, MCInst &OutMI) const
MCSymbol * GetConstantPoolIndexSymbol(const MachineOperand &MO) const
void emitInstruction(const MachineInstr *MI) override
Targets should implement this to emit instructions.
void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override
MCOperand lowerOperand(const MachineOperand &MO, unsigned Offset=0) const
XtensaConstantPoolSymbol - Xtensa-specific constantpool values for external symbols.
const char * getSymbol() const
XtensaConstantPoolValue - Xtensa specific constantpool value.
unsigned getLabelId() const
StringRef getModifierText() const
void setLabelId(unsigned ID)
XtensaCP::XtensaCPModifier getModifier() const
static const XtensaMCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Target & getTheXtensaTarget()
RegisterAsmPrinter - Helper template for registering a target specific assembly printer,...