Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/CodeGen/AsmPrinter.h
Show First 20 Lines • Show All 492 Lines • ▼ Show 20 Lines | public: | ||||
/// Emit an alignment directive to the specified power of two boundary. If a | /// Emit an alignment directive to the specified power of two boundary. If a | ||||
/// global value is specified, and if that global has an explicit alignment | /// global value is specified, and if that global has an explicit alignment | ||||
/// requested, it will override the alignment request if required for | /// requested, it will override the alignment request if required for | ||||
/// correctness. | /// correctness. | ||||
void emitAlignment(Align Alignment, const GlobalObject *GV = nullptr, | void emitAlignment(Align Alignment, const GlobalObject *GV = nullptr, | ||||
unsigned MaxBytesToEmit = 0) const; | unsigned MaxBytesToEmit = 0) const; | ||||
/// Constant-fold Constant as neened to allow it to be emitted into assembly. | |||||
/// By default, this calls ConstantFoldConstant(), which should be sufficient, | |||||
/// but this hook is provided to allow targets to define additional constant | |||||
/// folding rules that cannot be defined in `lowerConstant`. For example, | |||||
/// on AMDGPU, casting the null pointer to addrspace(7) yields a 128-bit | |||||
/// null descriptor that can't fit into MCExpr. | |||||
virtual Constant *constantFoldForPrint(const Constant *CV); | |||||
/// Lower the specified LLVM Constant to an MCExpr. | /// Lower the specified LLVM Constant to an MCExpr. | ||||
virtual const MCExpr *lowerConstant(const Constant *CV); | virtual const MCExpr *lowerConstant(const Constant *CV); | ||||
/// Print a general LLVM constant to the .s file. | /// Print a general LLVM constant to the .s file. | ||||
/// On AIX, when an alias refers to a sub-element of a global variable, the | /// On AIX, when an alias refers to a sub-element of a global variable, the | ||||
/// label of that alias needs to be emitted before the corresponding element. | /// label of that alias needs to be emitted before the corresponding element. | ||||
using AliasMapTy = DenseMap<uint64_t, SmallVector<const GlobalAlias *, 1>>; | using AliasMapTy = DenseMap<uint64_t, SmallVector<const GlobalAlias *, 1>>; | ||||
void emitGlobalConstant(const DataLayout &DL, const Constant *CV, | void emitGlobalConstant(const DataLayout &DL, const Constant *CV, | ||||
▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines |