9#ifndef LLVM_MC_MCFRAGMENT_H
10#define LLVM_MC_MCFRAGMENT_H
27class MCObjectStreamer;
67 unsigned LayoutOrder = 0;
125 uint8_t BundlePadding = 0;
180template <
unsigned ContentsSize,
unsigned FixupsSize>
272 unsigned MaxBytesToEmit;
279 unsigned MaxBytesToEmit)
281 Value(
Value), ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {}
318 NumValues(NumValues), Loc(Loc) {}
335 int64_t ControlledNopLength;
347 ControlledNopLength(ControlledNopLength), Loc(L), STI(STI) {}
424 LineDelta(LineDelta), AddrDelta(&AddrDelta) {}
443 AddrDelta(&AddrDelta) {}
473 unsigned StartFileId;
474 unsigned StartLineNum;
485 unsigned StartLineNum,
const MCSymbol *FnStartSym,
488 StartFileId(StartFileId), StartLineNum(StartLineNum),
489 FnStartSym(FnStartSym), FnEndSym(FnEndSym) {}
513 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
516 Ranges(Ranges), FixedSizePortion(FixedSizePortion) {}
576 AddrDelta(AddrDelta) {}
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallString class.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Holds state from .cv_file and .cv_loc directives for later emission.
void setEmitNops(bool Value, const MCSubtargetInfo *STI)
MCAlignFragment(Align Alignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit)
Align getAlignment() const
unsigned getMaxBytesToEmit() const
unsigned getValueSize() const
const MCSubtargetInfo * getSubtargetInfo() const
static bool classof(const MCFragment *F)
Represents required padding such that a particular other set of fragments does not cross a particular...
MCBoundaryAlignFragment(Align AlignBoundary, const MCSubtargetInfo &STI)
void setAlignment(Align Value)
void setSize(uint64_t Value)
const MCFragment * getLastFragment() const
const MCSubtargetInfo * getSubtargetInfo() const
static bool classof(const MCFragment *F)
Align getAlignment() const
void setLastFragment(const MCFragment *F)
Fragment representing the .cv_def_range directive.
MCCVDefRangeFragment(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > Ranges, StringRef FixedSizePortion)
ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > getRanges() const
static bool classof(const MCFragment *F)
StringRef getFixedSizePortion() const
Fragment representing the binary annotations produced by the .cv_inline_linetable directive.
static bool classof(const MCFragment *F)
const SmallString< 8 > & getContents() const
MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, unsigned StartLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
const MCSymbol * getFnStartSym() const
const MCSymbol * getFnEndSym() const
SmallString< 8 > & getContents()
Fragment for data and encoded instructions.
void setLinkerRelaxable()
static bool classof(const MCFragment *F)
bool isLinkerRelaxable() const
static bool classof(const MCFragment *F)
void setAddrDelta(const MCExpr *E)
static bool classof(const MCFragment *F)
const MCExpr & getAddrDelta() const
MCDwarfCallFrameFragment(const MCExpr &AddrDelta)
MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta)
int64_t getLineDelta() const
static bool classof(const MCFragment *F)
const MCExpr & getAddrDelta() const
Interface implemented by fragments that contain encoded instructions and/or data and also have fixups...
static bool classof(const MCFragment *F)
const SmallVectorImpl< MCFixup > & getFixups() const
MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions)
fixup_iterator fixup_end()
SmallVectorImpl< MCFixup > & getFixups()
SmallVectorImpl< MCFixup >::iterator fixup_iterator
const SmallVectorImpl< char > & getContents() const
fixup_iterator fixup_begin()
const_fixup_iterator fixup_end() const
SmallVectorImpl< MCFixup >::const_iterator const_fixup_iterator
const_fixup_iterator fixup_begin() const
SmallVectorImpl< char > & getContents()
Interface implemented by fragments that contain encoded instructions and/or data.
MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions)
const MCSubtargetInfo * getSubtargetInfo() const
Retrieve the MCSubTargetInfo in effect when the instruction was encoded.
const MCSubtargetInfo * STI
The MCSubtargetInfo in effect when the instruction was encoded.
static bool classof(const MCFragment *F)
void setBundlePadding(uint8_t N)
Set the padding size for this fragment.
void setHasInstructions(const MCSubtargetInfo &STI)
Record that the fragment contains instructions with the MCSubtargetInfo in effect when the instructio...
uint8_t getBundlePadding() const
Get the padding size that must be inserted before this fragment.
void setAlignToBundleEnd(bool V)
bool alignToBundleEnd() const
Should this fragment be placed at the end of an aligned bundle?
Base class for the full range of assembler expressions which are needed for parsing.
MCFillFragment(uint64_t Value, uint8_t VSize, const MCExpr &NumValues, SMLoc Loc)
uint8_t getValueSize() const
uint64_t getValue() const
static bool classof(const MCFragment *F)
const MCExpr & getNumValues() const
bool LinkerRelaxable
MCDataFragment.
FragmentType getKind() const
unsigned getLayoutOrder() const
bool HasInstructions
Used by subclasses for better packing.
void setParent(MCSection *Value)
const MCSymbol * getAtom() const
void destroy()
Destroys the current fragment.
void setLayoutOrder(unsigned Value)
MCSection * getParent() const
MCFragment * getNext() const
MCFragment(const MCFragment &)=delete
bool AllowAutoPadding
MCRelaxableFragment: x86-specific.
MCFragment & operator=(const MCFragment &)=delete
bool hasInstructions() const
Does this fragment have instructions emitted into it? By default this is false, but specific fragment...
Instances of this class represent a single low-level machine instruction.
MCLEBFragment(const MCExpr &Value, bool IsSigned)
const MCExpr & getValue() const
void setValue(const MCExpr *Expr)
static bool classof(const MCFragment *F)
int64_t getControlledNopLength() const
int64_t getNumBytes() const
MCNopsFragment(int64_t NumBytes, int64_t ControlledNopLength, SMLoc L, const MCSubtargetInfo &STI)
static bool classof(const MCFragment *F)
const MCSubtargetInfo * getSubtargetInfo() const
Streaming object file generation interface.
static bool classof(const MCFragment *F)
const MCExpr & getOffset() const
MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc)
MCPseudoProbeAddrFragment(const MCExpr *AddrDelta)
const MCExpr & getAddrDelta() const
static bool classof(const MCFragment *F)
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
void setAllowAutoPadding(bool V)
static bool classof(const MCFragment *F)
bool getAllowAutoPadding() const
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI)
const MCInst & getInst() const
void setInst(const MCInst &Value)
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Generic base class for all target subtargets.
Represents a symbol table index fragment.
const MCSymbol * getSymbol() const
MCSymbolIdFragment(const MCSymbol *Sym)
static bool classof(const MCFragment *F)
const MCSymbol * getSymbol()
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Represents a location in source code.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef str() const
Explicit conversion to StringRef.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
typename SuperClass::const_iterator const_iterator
typename SuperClass::iterator iterator
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This file defines the ilist_node class template, which is a convenient base class for creating classe...
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.