Go to the documentation of this file.
9 #ifndef LLVM_MC_MCFRAGMENT_H
10 #define LLVM_MC_MCFRAGMENT_H
27 class MCSubtargetInfo;
69 unsigned SubsectionNumber = 0;
126 bool AlignToBundleEnd =
false;
128 uint8_t BundlePadding = 0;
185 template<
unsigned ContentsSize>
203 template<
unsigned ContentsSize,
unsigned FixupsSize>
275 bool AllowAutoPadding =
false;
281 Inst(Inst) { this->STI = &
STI; }
311 unsigned MaxBytesToEmit;
318 unsigned MaxBytesToEmit,
MCSection *Sec =
nullptr)
320 Value(
Value), ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {}
357 NumValues(NumValues), Loc(Loc) {}
374 int64_t ControlledNopLength;
386 ControlledNopLength(ControlledNopLength), Loc(L), STI(STI) {}
439 Contents.push_back(0);
469 LineDelta(LineDelta), AddrDelta(&AddrDelta) {}
488 AddrDelta(&AddrDelta) {}
517 unsigned StartFileId;
518 unsigned StartLineNum;
529 unsigned StartLineNum,
const MCSymbol *FnStartSym,
533 StartFileId(StartFileId), StartLineNum(StartLineNum),
534 FnStartSym(FnStartSym), FnEndSym(FnEndSym) {}
558 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
561 Ranges(Ranges.
begin(), Ranges.
end()),
562 FixedSizePortion(FixedSizePortion) {}
623 AddrDelta(AddrDelta) {}
633 #endif // LLVM_MC_MCFRAGMENT_H
MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc, MCSection *Sec=nullptr)
void setAlignment(Align Value)
static bool classof(const MCFragment *F)
const MCSubtargetInfo * getSubtargetInfo() const
unsigned getSubsectionNumber() const
This is an optimization pass for GlobalISel generic memory operations.
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Fragment representing the binary annotations produced by the .cv_inline_linetable directive.
void setHasInstructions(const MCSubtargetInfo &STI)
Record that the fragment contains instructions with the MCSubtargetInfo in effect when the instructio...
static bool classof(const MCFragment *F)
MCFragment & operator=(const MCFragment &)=delete
const MCSymbol * getFnEndSym() const
void setSize(uint64_t Value)
static bool classof(const MCFragment *F)
An ilist node that can access its parent list.
MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta, MCSection *Sec=nullptr)
ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > getRanges() const
int64_t getLineDelta() const
static bool classof(const MCFragment *F)
void setEmitNops(bool Value, const MCSubtargetInfo *STI)
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
static bool classof(const MCFragment *F)
MCSection * getParent() const
static bool classof(const MCFragment *F)
Instances of this class represent a single low-level machine instruction.
SmallVectorImpl< MCFixup > & getFixups()
SmallVectorImpl< MCFixup >::const_iterator const_fixup_iterator
static bool classof(const MCFragment *F)
bool alignToBundleEnd() const
Should this fragment be placed at the end of an aligned bundle?
static bool classof(const MCFragment *F)
MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSection *Sec=nullptr)
static bool classof(const MCFragment *F)
unsigned getMaxBytesToEmit() const
Align getAlignment() const
MCDwarfCallFrameFragment(const MCExpr &AddrDelta, MCSection *Sec=nullptr)
void setAllowAutoPadding(bool V)
Represents a location in source code.
SmallVectorImpl< MCFixup >::iterator fixup_iterator
MCSymbolIdFragment(const MCSymbol *Sym, MCSection *Sec=nullptr)
SmallString< 8 > & getContents()
Represents a symbol table index fragment.
Holds state from .cv_file and .cv_loc directives for later emission.
MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
static bool classof(const MCFragment *F)
MCNopsFragment(int64_t NumBytes, int64_t ControlledNopLength, SMLoc L, const MCSubtargetInfo &STI, MCSection *Sec=nullptr)
MCPseudoProbeAddrFragment(const MCExpr *AddrDelta, MCSection *Sec=nullptr)
void setInst(const MCInst &Value)
MCCVDefRangeFragment(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion, MCSection *Sec=nullptr)
const MCInst & getInst() const
const SmallVectorImpl< char > & getContents() const
This struct is a compact representation of a valid (non-zero power of two) alignment.
void setAtom(const MCSymbol *Value)
bool hasInstructions() const
Does this fragment have instructions emitted into it? By default this is false, but specific fragment...
MCEncodedFragmentWithContents(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
const SmallString< 8 > & getContents() const
const MCExpr & getAddrDelta() const
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI, MCSection *Sec=nullptr)
Interface implemented by fragments that contain encoded instructions and/or data.
unsigned getValueSize() const
MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
This is a compact (memory-size-wise) fragment for holding an encoded instruction (non-relaxable) that...
static bool classof(const MCFragment *F)
MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, unsigned StartLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym, MCSection *Sec=nullptr)
void setSubsectionNumber(unsigned Value)
void setBundlePadding(uint8_t N)
Set the padding size for this fragment.
static bool classof(const MCFragment *F)
const MCFragment * getLastFragment() const
typename SuperClass::const_iterator const_iterator
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool classof(const MCFragment *F)
const SmallString< 8 > & getContents() const
const_fixup_iterator fixup_end() const
const MCExpr & getNumValues() const
const MCSymbol * getSymbol() const
void setLayoutOrder(unsigned Value)
const MCExpr & getAddrDelta() const
MCBoundaryAlignFragment(Align AlignBoundary, const MCSubtargetInfo &STI, MCSection *Sec=nullptr)
FragmentType getKind() const
void setLastFragment(const MCFragment *F)
const MCExpr & getAddrDelta() const
StringRef getFixedSizePortion() const
uint64_t getValue() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
MCDataFragment(MCSection *Sec=nullptr)
Interface implemented by fragments that contain encoded instructions and/or data.
StringRef - Represent a constant reference to a string, i.e.
static bool classof(const MCFragment *F)
const MCSymbol * getFnStartSym() const
const MCExpr & getValue() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
const MCSymbol * getSymbol()
MCAlignFragment(unsigned Alignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit, MCSection *Sec=nullptr)
void destroy()
Destroys the current fragment.
MCCompactEncodedInstFragment(MCSection *Sec=nullptr)
static bool classof(const MCFragment *F)
const SmallVectorImpl< MCFixup > & getFixups() const
Encapsulates the layout of an assembly file at a particular point in time.
const MCSubtargetInfo * getSubtargetInfo() const
Retrieve the MCSubTargetInfo in effect when the instruction was encoded.
void setParent(MCSection *Value)
int64_t getNumBytes() const
uint8_t getBundlePadding() const
Get the padding size that must be inserted before this fragment.
unsigned getAlignment() const
fixup_iterator fixup_begin()
const MCSubtargetInfo * STI
The MCSubtargetInfo in effect when the instruction was encoded.
StringRef str() const
Explicit conversion to StringRef.
bool getAllowAutoPadding() const
const MCSubtargetInfo * getSubtargetInfo() const
static bool classof(const MCFragment *F)
void setAlignToBundleEnd(bool V)
unsigned getLayoutOrder() const
const MCSubtargetInfo * getSubtargetInfo() const
typename SuperClass::iterator iterator
static bool classof(const MCFragment *F)
static bool classof(const MCFragment *F)
MCFillFragment(uint64_t Value, uint8_t VSize, const MCExpr &NumValues, SMLoc Loc, MCSection *Sec=nullptr)
uint8_t getValueSize() const
fixup_iterator fixup_end()
MCDummyFragment(MCSection *Sec)
Fragment for data and encoded instructions.
Generic base class for all target subtargets.
Fragment representing the .cv_def_range directive.
LLVM Value Representation.
Interface implemented by fragments that contain encoded instructions and/or data and also have fixups...
const MCExpr & getOffset() const
Base class for the full range of assembler expressions which are needed for parsing.
const MCSymbol * getAtom() const
SmallVectorImpl< char > & getContents()
SmallString< 8 > & getContents()
int64_t getControlledNopLength() const
const_fixup_iterator fixup_begin() const
Represents required padding such that a particular other set of fragments does not cross a particular...