9 #ifndef LLVM_MC_MCFRAGMENT_H 10 #define LLVM_MC_MCFRAGMENT_H 28 class MCSubtargetInfo;
115 bool AlignToBundleEnd =
false;
117 uint8_t BundlePadding = 0;
173 template<
unsigned ContentsSize>
191 template<
unsigned ContentsSize,
unsigned FixupsSize>
267 Inst(Inst) { this->STI = &STI; }
294 unsigned MaxBytesToEmit;
298 unsigned MaxBytesToEmit,
MCSection *Sec =
nullptr)
300 Value(Value), ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {}
332 NumValues(NumValues), Loc(Loc) {}
414 LineDelta(LineDelta), AddrDelta(&AddrDelta) {}
433 AddrDelta(&AddrDelta) {}
462 unsigned StartFileId;
463 unsigned StartLineNum;
474 unsigned StartLineNum,
const MCSymbol *FnStartSym,
478 StartFileId(StartFileId), StartLineNum(StartLineNum),
479 FnStartSym(FnStartSym), FnEndSym(FnEndSym) {}
503 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
506 Ranges(Ranges.
begin(), Ranges.
end()),
507 FixedSizePortion(FixedSizePortion) {}
558 #endif // LLVM_MC_MCFRAGMENT_H
Instances of this class represent a uniqued identifier for a section in the current translation unit...
bool alignToBundleEnd() const
Should this fragment be placed at the end of an aligned bundle?
const_iterator end(StringRef path)
Get end iterator over path.
MCAlignFragment(unsigned Alignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit, MCSection *Sec=nullptr)
MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc, MCSection *Sec=nullptr)
static bool classof(const MCFragment *F)
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
typename SuperClass::const_iterator const_iterator
MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta, MCSection *Sec=nullptr)
This class represents lattice values for constants.
static bool classof(const MCFragment *F)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
uint8_t getValueSize() const
SmallString< 8 > & getContents()
static bool classof(const MCFragment *F)
void push_back(const T &Elt)
MCSymbolIdFragment(const MCSymbol *Sym, MCSection *Sec=nullptr)
const MCSymbol * getSymbol() const
Interface implemented by fragments that contain encoded instructions and/or data. ...
MCFillFragment(uint64_t Value, uint8_t VSize, const MCExpr &NumValues, SMLoc Loc, MCSection *Sec=nullptr)
void setEmitNops(bool Value)
MCFragment & operator=(const MCFragment &)=delete
FragmentType getKind() const
This is a compact (memory-size-wise) fragment for holding an encoded instruction (non-relaxable) that...
block Block Frequency true
const MCExpr & getOffset() const
static void EmitNops(MCStreamer &OS, unsigned NumBytes, bool Is64Bit, const MCSubtargetInfo &STI)
Emit the optimal amount of multi-byte nops on X86.
StringRef getFixedSizePortion() const
const_fixup_iterator fixup_begin() const
Interface implemented by fragments that contain encoded instructions and/or data. ...
fixup_iterator fixup_end()
SmallVectorImpl< MCFixup >::const_iterator const_fixup_iterator
Encapsulates the layout of an assembly file at a particular point in time.
const_fixup_iterator fixup_end() const
void setEmitNops(bool Value)
Base class for the full range of assembler expressions which are needed for parsing.
Align getAlignment() const
const SmallString< 8 > & getContents() const
MCDummyFragment(MCSection *Sec)
void destroy()
Destroys the current fragment.
const MCExpr & getAddrDelta() const
void setFused(bool Value)
static bool classof(const MCFragment *F)
static bool classof(const MCFragment *F)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const MCExpr & getAddrDelta() const
MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSection *Sec=nullptr)
MCEncodedFragmentWithContents(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
SmallVectorImpl< char > & getContents()
Instances of this class represent a single low-level machine instruction.
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI, MCSection *Sec=nullptr)
uint8_t getBundlePadding() const
Get the padding size that must be inserted before this fragment.
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
An ilist node that can access its parent list.
static bool classof(const MCFragment *F)
static bool classof(const MCFragment *F)
const SmallVectorImpl< char > & getContents() const
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)
SmallVectorImpl< MCFixup > & getFixups()
MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
const SmallString< 8 > & getContents() const
const MCSymbol * getAtom() const
MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, unsigned StartLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym, MCSection *Sec=nullptr)
static bool classof(const MCFragment *F)
Fragment representing the .cv_def_range directive.
This struct is a compact representation of a valid (non-zero power of two) alignment.
MCCVDefRangeFragment(ArrayRef< std::pair< const MCSymbol *, const MCSymbol *>> Ranges, StringRef FixedSizePortion, MCSection *Sec=nullptr)
const MCExpr & getValue() const
MCBoundaryAlignFragment(Align AlignBoundary, bool Fused=false, bool EmitNops=false, MCSection *Sec=nullptr)
MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
Represents required padding such that a particular other set of fragments does not cross a particular...
unsigned getMaxBytesToEmit() const
MCCompactEncodedInstFragment(MCSection *Sec=nullptr)
SmallVectorImpl< MCFixup >::iterator fixup_iterator
Represents a symbol table index fragment.
unsigned getLayoutOrder() const
void setBundlePadding(uint8_t N)
Set the padding size for this fragment.
const MCSymbol * getFnEndSym() const
MCSection * getParent() const
uint64_t getValue() const
const MCExpr & getNumValues() const
void setSize(uint64_t Value)
bool hasInstructions() const
Does this fragment have instructions emitted into it? By default this is false, but specific fragment...
const MCSubtargetInfo * getSubtargetInfo() const
Retrieve the MCSubTargetInfo in effect when the instruction was encoded.
typename SuperClass::iterator iterator
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
const MCSymbol * getFnStartSym() const
unsigned getValueSize() const
static bool classof(const MCFragment *F)
unsigned getAlignment() const
Interface implemented by fragments that contain encoded instructions and/or data and also have fixups...
static bool classof(const MCFragment *F)
int64_t getLineDelta() const
const MCInst & getInst() const
static bool classof(const MCFragment *F)
static bool classof(const MCFragment *F)
fixup_iterator fixup_begin()
Generic base class for all target subtargets.
SmallString< 8 > & getContents()
const MCSymbol * getSymbol()
void setLayoutOrder(unsigned Value)
void setAlignToBundleEnd(bool V)
Fragment for data and encoded instructions.
LLVM Value Representation.
ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > getRanges() const
static bool classof(const MCFragment *F)
StringRef - Represent a constant reference to a string, i.e.
const SmallVectorImpl< MCFixup > & getFixups() const
Represents a location in source code.
void setParent(MCSection *Value)
MCDataFragment(MCSection *Sec=nullptr)
MCDwarfCallFrameFragment(const MCExpr &AddrDelta, MCSection *Sec=nullptr)
void setInst(const MCInst &Value)
static bool classof(const MCFragment *F)
void setAtom(const MCSymbol *Value)
Holds state from .cv_file and .cv_loc directives for later emission.
static bool classof(const MCFragment *F)