|
LLVM 24.0.0git
|
#include "IROptions.h"#include "LLVMContextImpl.h"#include "llvm/ADT/APFloat.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/STLFunctionalExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/iterator_range.h"#include "llvm/BinaryFormat/Dwarf.h"#include "llvm/Config/llvm-config.h"#include "llvm/IR/Argument.h"#include "llvm/IR/AssemblyAnnotationWriter.h"#include "llvm/IR/Attributes.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/CFG.h"#include "llvm/IR/CallingConv.h"#include "llvm/IR/Comdat.h"#include "llvm/IR/Constant.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/DebugProgramInstruction.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/Function.h"#include "llvm/IR/FunctionLocalMetadata.h"#include "llvm/IR/GlobalAlias.h"#include "llvm/IR/GlobalIFunc.h"#include "llvm/IR/GlobalObject.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/IRPrintingPasses.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/InstrTypes.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/IR/ModuleSlotTracker.h"#include "llvm/IR/ModuleSummaryIndex.h"#include "llvm/IR/Operator.h"#include "llvm/IR/Type.h"#include "llvm/IR/TypeFinder.h"#include "llvm/IR/TypedPointerType.h"#include "llvm/IR/Use.h"#include "llvm/IR/User.h"#include "llvm/IR/Value.h"#include "llvm/Support/AtomicOrdering.h"#include "llvm/Support/Casting.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormattedStream.h"#include "llvm/Support/SaveAndRestore.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <cctype>#include <cstddef>#include <cstdint>#include <iterator>#include <memory>#include <optional>#include <string>#include <tuple>#include <utility>#include <vector>#include "llvm/IR/Metadata.def"Go to the source code of this file.
Classes | |
| class | llvm::SlotTracker |
| This class provides computation of slot numbers for LLVM Assembly writing. More... | |
Macros | |
| #define | CC_VLS_CASE(ABI_VLEN) |
| #define | ST_DEBUG(X) |
| #define | HANDLE_MDNODE_LEAF(CLASS) |
| #define | DEFINE_FLMD_NODE_PRINTS(TYPE) |
Typedefs | |
| using | OrderMap = MapVector<const Value *, unsigned> |
| using | UseListOrderMap |
Enumerations | |
| enum | PrefixType { GlobalPrefix , ComdatPrefix , LabelPrefix , LocalPrefix , NoPrefix } |
Functions | |
| static const Value * | skipMetadataWrapper (const Value *V) |
| Look for a value that might be wrapped as metadata, e.g. | |
| static void | orderValue (const Value *V, OrderMap &OM) |
| static OrderMap | orderModule (const Module *M) |
| static std::vector< unsigned > | predictValueUseListOrder (const Value *V, unsigned ID, const OrderMap &OM) |
| static UseListOrderMap | predictUseListOrder (const Module *M) |
| static const Module * | getModuleFromVal (const Value *V) |
| static const Module * | getModuleFromDPI (const DbgMarker *Marker) |
| static const Module * | getModuleFromDPI (const DbgRecord *DR) |
| static void | printCallingConv (unsigned cc, raw_ostream &Out) |
| static void | printLLVMName (raw_ostream &OS, StringRef Name, PrefixType Prefix) |
| Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it). | |
| static void | printLLVMName (raw_ostream &OS, const Value *V) |
| Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it). | |
| static void | printShuffleMask (raw_ostream &Out, Type *Ty, ArrayRef< int > Mask) |
| static void | printAddressSpace (const Module *M, unsigned AS, raw_ostream &OS, StringRef Prefix=" ", StringRef Suffix="", bool ForcePrint=false) |
| static SlotTracker * | createSlotTracker (const Value *V) |
| static void | writeAsOperandInternal (raw_ostream &Out, const Value *V, AsmWriterContext &WriterCtx, bool PrintType=false) |
| static void | writeAsOperandInternal (raw_ostream &Out, const Metadata *MD, AsmWriterContext &WriterCtx, bool FromValue=false) |
| static void | writeOptimizationInfo (raw_ostream &Out, const User *U) |
| static void | WriteFullHexAPInt (raw_ostream &Out, const APInt &Val) |
| static void | writeAPFloatInternal (raw_ostream &Out, const APFloat &APF) |
| static void | writeConstantInternal (raw_ostream &Out, const Constant *CV, AsmWriterContext &WriterCtx) |
| static void | writeMDTuple (raw_ostream &Out, const MDTuple *Node, AsmWriterContext &WriterCtx) |
| static void | writeMetadataAsOperand (raw_ostream &Out, const Metadata *MD, AsmWriterContext &WriterCtx) |
| static void | writeGenericDINode (raw_ostream &Out, const GenericDINode *N, AsmWriterContext &WriterCtx) |
| static void | writeFLMDNode (raw_ostream &Out, FLScope Scope, AsmWriterContext &WriterCtx) |
| static void | writeFLMDNode (raw_ostream &Out, FLSrcLoc SrcLoc, AsmWriterContext &WriterCtx) |
| static void | writeFLMDNode (raw_ostream &Out, FLInlinedCall InlinedCall, AsmWriterContext &WriterCtx) |
| static void | writeMDFunctionLocalContext (raw_ostream &Out, const MDFunctionLocalContext *FLMD, AsmWriterContext &WriterCtx) |
| static void | writeDILocation (raw_ostream &Out, const DILocation *DL, AsmWriterContext &WriterCtx) |
| static void | writeDILayerLoc (raw_ostream &Out, const DILayerLoc *N, AsmWriterContext &WriterCtx) |
| static void | writeDILayerLocList (raw_ostream &Out, const DILayerLocList *N, AsmWriterContext &WriterCtx) |
| static void | writeDIAssignID (raw_ostream &Out, const DIAssignID *DL, AsmWriterContext &WriterCtx) |
| static void | writeDISubrange (raw_ostream &Out, const DISubrange *N, AsmWriterContext &WriterCtx) |
| static void | writeDIGenericSubrange (raw_ostream &Out, const DIGenericSubrange *N, AsmWriterContext &WriterCtx) |
| static void | writeDIEnumerator (raw_ostream &Out, const DIEnumerator *N, AsmWriterContext &) |
| static void | writeDIBasicType (raw_ostream &Out, const DIBasicType *N, AsmWriterContext &WriterCtx) |
| static void | writeDIFixedPointType (raw_ostream &Out, const DIFixedPointType *N, AsmWriterContext &WriterCtx) |
| static void | writeDIStringType (raw_ostream &Out, const DIStringType *N, AsmWriterContext &WriterCtx) |
| static void | writeDIDerivedType (raw_ostream &Out, const DIDerivedType *N, AsmWriterContext &WriterCtx) |
| static void | writeDISubrangeType (raw_ostream &Out, const DISubrangeType *N, AsmWriterContext &WriterCtx) |
| static void | writeDICompositeType (raw_ostream &Out, const DICompositeType *N, AsmWriterContext &WriterCtx) |
| static void | writeDISubroutineType (raw_ostream &Out, const DISubroutineType *N, AsmWriterContext &WriterCtx) |
| static void | writeDIFile (raw_ostream &Out, const DIFile *N, AsmWriterContext &) |
| static void | writeDICompileUnit (raw_ostream &Out, const DICompileUnit *N, AsmWriterContext &WriterCtx) |
| static void | writeDISubprogram (raw_ostream &Out, const DISubprogram *N, AsmWriterContext &WriterCtx) |
| static void | writeDILexicalBlock (raw_ostream &Out, const DILexicalBlock *N, AsmWriterContext &WriterCtx) |
| static void | writeDILexicalBlockFile (raw_ostream &Out, const DILexicalBlockFile *N, AsmWriterContext &WriterCtx) |
| static void | writeDINamespace (raw_ostream &Out, const DINamespace *N, AsmWriterContext &WriterCtx) |
| static void | writeDICommonBlock (raw_ostream &Out, const DICommonBlock *N, AsmWriterContext &WriterCtx) |
| static void | writeDIMacro (raw_ostream &Out, const DIMacro *N, AsmWriterContext &WriterCtx) |
| static void | writeDIMacroFile (raw_ostream &Out, const DIMacroFile *N, AsmWriterContext &WriterCtx) |
| static void | writeDIModule (raw_ostream &Out, const DIModule *N, AsmWriterContext &WriterCtx) |
| static void | writeDITemplateTypeParameter (raw_ostream &Out, const DITemplateTypeParameter *N, AsmWriterContext &WriterCtx) |
| static void | writeDITemplateValueParameter (raw_ostream &Out, const DITemplateValueParameter *N, AsmWriterContext &WriterCtx) |
| static void | writeDIGlobalVariable (raw_ostream &Out, const DIGlobalVariable *N, AsmWriterContext &WriterCtx) |
| static void | writeDILocalVariable (raw_ostream &Out, const DILocalVariable *N, AsmWriterContext &WriterCtx) |
| static void | writeDILabel (raw_ostream &Out, const DILabel *N, AsmWriterContext &WriterCtx) |
| static void | writeDIExpression (raw_ostream &Out, const DIExpression *N, AsmWriterContext &WriterCtx) |
| static void | writeDIArgList (raw_ostream &Out, const DIArgList *N, AsmWriterContext &WriterCtx, bool FromValue=false) |
| static void | writeDIGlobalVariableExpression (raw_ostream &Out, const DIGlobalVariableExpression *N, AsmWriterContext &WriterCtx) |
| static void | writeDIObjCProperty (raw_ostream &Out, const DIObjCProperty *N, AsmWriterContext &WriterCtx) |
| static void | writeDIProperty (raw_ostream &Out, const DIProperty *N, AsmWriterContext &WriterCtx) |
| static void | writeDIImportedEntity (raw_ostream &Out, const DIImportedEntity *N, AsmWriterContext &WriterCtx) |
| static void | writeMDNodeBodyInternal (raw_ostream &Out, const MDNode *Node, AsmWriterContext &Ctx) |
| static const IROptions & | getOptions (const Module *M) |
| static const char * | getWholeProgDevirtResKindName (WholeProgramDevirtResolution::Kind K) |
| static const char * | getWholeProgDevirtResByArgKindName (WholeProgramDevirtResolution::ByArg::Kind K) |
| static const char * | getTTResKindName (TypeTestResolution::Kind K) |
| static const char * | getSummaryKindName (GlobalValueSummary::SummaryKind SK) |
| static std::string | getLinkageName (GlobalValue::LinkageTypes LT) |
| static std::string | getLinkageNameWithSpace (GlobalValue::LinkageTypes LT) |
| static const char * | getVisibilityName (GlobalValue::VisibilityTypes Vis) |
| static const char * | getImportTypeName (GlobalValueSummary::ImportKind IK) |
| static void | printMetadataIdentifier (StringRef Name, formatted_raw_ostream &Out) |
| static void | printVisibility (GlobalValue::VisibilityTypes Vis, formatted_raw_ostream &Out) |
| static void | printDSOLocation (const GlobalValue &GV, formatted_raw_ostream &Out) |
| static void | printDLLStorageClass (GlobalValue::DLLStorageClassTypes SCT, formatted_raw_ostream &Out) |
| static void | printThreadLocalModel (GlobalVariable::ThreadLocalMode TLM, formatted_raw_ostream &Out) |
| static StringRef | getUnnamedAddrEncoding (GlobalVariable::UnnamedAddr UA) |
| static void | maybePrintComdat (formatted_raw_ostream &Out, const GlobalObject &GO) |
| static void | maybePrintCallAddrSpace (const Value *Operand, const Instruction *I, raw_ostream &Out) |
| static bool | printWithoutType (const Value &V, raw_ostream &O, SlotTracker *Machine, const Module *M) |
| Print without a type, skipping the TypePrinting object. | |
| static void | printAsOperandImpl (const Value &V, raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) |
| static void | printMetadataImplRec (raw_ostream &ROS, const Metadata &MD, AsmWriterContext &WriterCtx) |
| Recursive version of printMetadataImpl. | |
| static void | printMetadataImpl (raw_ostream &ROS, const Metadata &MD, ModuleSlotTracker &MST, const Module *M, bool OnlyAsOperand, bool PrintAsTree=false) |
Variables | |
| constexpr IROptions | DefaultOptions |
| #define CC_VLS_CASE | ( | ABI_VLEN | ) |
Referenced by printCallingConv().
| #define DEFINE_FLMD_NODE_PRINTS | ( | TYPE | ) |
Definition at line 5719 of file AsmWriter.cpp.
| #define HANDLE_MDNODE_LEAF | ( | CLASS | ) |
| #define ST_DEBUG | ( | X | ) |
Definition at line 1018 of file AsmWriter.cpp.
Referenced by llvm::SlotTracker::purgeFunction().
| using UseListOrderMap |
Definition at line 103 of file AsmWriter.cpp.
| enum PrefixType |
| Enumerator | |
|---|---|
| GlobalPrefix | |
| ComdatPrefix | |
| LabelPrefix | |
| LocalPrefix | |
| NoPrefix | |
Definition at line 445 of file AsmWriter.cpp.
|
static |
Definition at line 989 of file AsmWriter.cpp.
References llvm::dyn_cast(), I, and V.
Referenced by writeAsOperandInternal().
|
static |
Definition at line 3730 of file AsmWriter.cpp.
References llvm::GlobalValueSummary::Declaration, llvm::GlobalValueSummary::Definition, and llvm_unreachable.
|
static |
Definition at line 3681 of file AsmWriter.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
Referenced by getLinkageNameWithSpace().
|
static |
Definition at line 3712 of file AsmWriter.cpp.
References llvm::GlobalValue::ExternalLinkage, and getLinkageName().
Definition at line 319 of file AsmWriter.cpp.
References llvm::BasicBlock::getParent(), llvm::DbgMarker::getParent(), and llvm::GlobalValue::getParent().
Referenced by getModuleFromDPI(), llvm::DbgLabelRecord::print(), llvm::DbgLabelRecord::print(), llvm::DbgMarker::print(), llvm::DbgMarker::print(), llvm::DbgVariableRecord::print(), and llvm::DbgVariableRecord::print().
Definition at line 325 of file AsmWriter.cpp.
References llvm::DbgRecord::getMarker(), and getModuleFromDPI().
Definition at line 293 of file AsmWriter.cpp.
References llvm::dyn_cast(), getModuleFromVal(), I, llvm::isa(), llvm::Value::users(), and V.
Referenced by getModuleFromVal(), maybePrintCallAddrSpace(), llvm::Value::print(), llvm::Value::print(), and llvm::Value::printAsOperand().
Definition at line 3163 of file AsmWriter.cpp.
References DefaultOptions, and llvm::getIROptions().
Referenced by llvm::dwarf_linker::parallel::CompileUnit::cloneAndEmitDebugLocations(), llvm::dwarf_linker::parallel::CompileUnit::cloneAndEmitLineTable(), llvm::dwarf_linker::parallel::CompileUnit::cloneAndEmitRanges(), llvm::dwarf_linker::parallel::CompileUnit::cloneDieAttrExpression(), llvm::orc::ConcurrentIRCompiler::ConcurrentIRCompiler(), llvm::DbgLabelRecord::print(), llvm::DbgMarker::print(), llvm::DbgVariableRecord::print(), llvm::NamedMDNode::print(), and llvm::NamedMDNode::print().
|
static |
Definition at line 3635 of file AsmWriter.cpp.
References llvm::GlobalValueSummary::AliasKind, llvm::GlobalValueSummary::FunctionKind, llvm::GlobalValueSummary::GlobalVarKind, and llvm_unreachable.
|
static |
Definition at line 3526 of file AsmWriter.cpp.
References llvm::TypeTestResolution::AllOnes, llvm::TypeTestResolution::ByteArray, llvm::TypeTestResolution::Inline, llvm_unreachable, llvm::TypeTestResolution::Single, llvm::TypeTestResolution::Unknown, and llvm::TypeTestResolution::Unsat.
|
static |
Definition at line 4123 of file AsmWriter.cpp.
References llvm::GlobalValue::Global, llvm_unreachable, llvm::GlobalValue::Local, and llvm::GlobalValue::None.
|
static |
Definition at line 3718 of file AsmWriter.cpp.
References llvm::GlobalValue::DefaultVisibility, llvm::GlobalValue::HiddenVisibility, llvm_unreachable, and llvm::GlobalValue::ProtectedVisibility.
|
static |
Definition at line 3511 of file AsmWriter.cpp.
References llvm::WholeProgramDevirtResolution::ByArg::Indir, llvm_unreachable, llvm::WholeProgramDevirtResolution::ByArg::UniformRetVal, llvm::WholeProgramDevirtResolution::ByArg::UniqueRetVal, and llvm::WholeProgramDevirtResolution::ByArg::VirtualConstProp.
|
static |
Definition at line 3497 of file AsmWriter.cpp.
References llvm::WholeProgramDevirtResolution::BranchFunnel, llvm::WholeProgramDevirtResolution::Indir, llvm_unreachable, llvm::WholeProgramDevirtResolution::SingleImpl, and llvm::WholeProgramDevirtResolution::Speculative.
|
static |
Definition at line 4634 of file AsmWriter.cpp.
References getModuleFromVal(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), I, Mod, and printAddressSpace().
|
static |
Definition at line 4135 of file AsmWriter.cpp.
References C(), ComdatPrefix, llvm::GlobalObject::getComdat(), llvm::Value::getName(), llvm::isa(), and printLLVMName().
Definition at line 135 of file AsmWriter.cpp.
References A(), llvm::dyn_cast(), F, llvm::filterDbgVars(), G, I, llvm::isa(), orderValue(), skipMetadataWrapper(), and V.
Referenced by predictUseListOrder().
Definition at line 115 of file AsmWriter.cpp.
References C(), llvm::dyn_cast(), llvm::isa(), orderValue(), and V.
Referenced by orderModule(), and orderValue().
|
static |
Definition at line 268 of file AsmWriter.cpp.
References A(), llvm::dyn_cast(), F, I, orderModule(), predictValueUseListOrder(), and V.
|
static |
Definition at line 207 of file AsmWriter.cpp.
References llvm::dyn_cast(), E(), I, llvm::is_sorted(), llvm::isa(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::sort(), and V.
Referenced by predictUseListOrder().
|
static |
Definition at line 630 of file AsmWriter.cpp.
References llvm::StringRef::empty(), and llvm::getIROptions().
Referenced by maybePrintCallAddrSpace().
|
static |
Definition at line 5551 of file AsmWriter.cpp.
References llvm::ModuleSlotTracker::getMachine(), llvm::ModuleSlotTracker::getModule(), V, and writeAsOperandInternal().
Referenced by llvm::Value::printAsOperand(), and llvm::Value::printAsOperand().
|
static |
Definition at line 329 of file AsmWriter.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::AMDGPU_CS, llvm::CallingConv::AMDGPU_CS_Chain, llvm::CallingConv::AMDGPU_CS_ChainPreserve, llvm::CallingConv::AMDGPU_ES, llvm::CallingConv::AMDGPU_Gfx, llvm::CallingConv::AMDGPU_Gfx_WholeWave, llvm::CallingConv::AMDGPU_GS, llvm::CallingConv::AMDGPU_HS, llvm::CallingConv::AMDGPU_KERNEL, llvm::CallingConv::AMDGPU_LS, llvm::CallingConv::AMDGPU_PS, llvm::CallingConv::AMDGPU_VS, llvm::CallingConv::AnyReg, llvm::CallingConv::ARM_AAPCS, llvm::CallingConv::ARM_AAPCS_VFP, llvm::CallingConv::ARM_APCS, llvm::CallingConv::AVR_BUILTIN, llvm::CallingConv::AVR_INTR, llvm::CallingConv::AVR_SIGNAL, CC_VLS_CASE, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CHERIoT_CompartmentCall, llvm::CallingConv::CHERIoT_CompartmentCallee, llvm::CallingConv::CHERIoT_LibraryCall, llvm::CallingConv::Cold, llvm::CallingConv::CXX_FAST_TLS, llvm::CallingConv::DUMMY_HHVM, llvm::CallingConv::DUMMY_HHVM_C, llvm::CallingConv::Fast, llvm::CallingConv::GHC, llvm::CallingConv::GRAAL, llvm::CallingConv::Intel_OCL_BI, llvm::CallingConv::M68k_RTD, llvm::CallingConv::MSP430_INTR, llvm::CallingConv::PISA_KERNEL, llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::CallingConv::PTX_Device, llvm::CallingConv::PTX_Kernel, llvm::CallingConv::RISCV_VectorCall, llvm::CallingConv::SPIR_FUNC, llvm::CallingConv::SPIR_KERNEL, llvm::CallingConv::Swift, llvm::CallingConv::SwiftTail, llvm::CallingConv::Tail, llvm::CallingConv::WASM_EmscriptenInvoke, llvm::CallingConv::Win64, llvm::CallingConv::X86_64_SysV, llvm::CallingConv::X86_FastCall, llvm::CallingConv::X86_INTR, llvm::CallingConv::X86_RegCall, llvm::CallingConv::X86_StdCall, llvm::CallingConv::X86_ThisCall, and llvm::CallingConv::X86_VectorCall.
|
static |
Definition at line 4094 of file AsmWriter.cpp.
References llvm::GlobalValue::DefaultStorageClass, llvm::GlobalValue::DLLExportStorageClass, and llvm::GlobalValue::DLLImportStorageClass.
|
static |
Definition at line 4088 of file AsmWriter.cpp.
References llvm::GlobalValue::isDSOLocal(), and llvm::GlobalValue::isImplicitDSOLocal().
|
static |
Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it).
Print it out.
Definition at line 509 of file AsmWriter.cpp.
References GlobalPrefix, llvm::isa(), LocalPrefix, printLLVMName(), and V.
|
static |
Turn the specified name into an 'LLVM name', which is either prefixed with % (if the string only contains simple characters) or is surrounded with ""'s (if it has special chars in it).
Print it out.
Definition at line 487 of file AsmWriter.cpp.
References ComdatPrefix, GlobalPrefix, LabelPrefix, LocalPrefix, NoPrefix, and llvm::printLLVMNameWithoutPrefix().
Referenced by maybePrintComdat(), llvm::Comdat::print(), llvm::printBasicBlock(), printLLVMName(), and writeAsOperandInternal().
|
static |
Definition at line 4035 of file AsmWriter.cpp.
References C(), and llvm::hexdigit().
|
static |
Definition at line 5640 of file AsmWriter.cpp.
References llvm::dyn_cast(), llvm::ModuleSlotTracker::getMachine(), llvm::isa(), N, writeAsOperandInternal(), and writeMDNodeBodyInternal().
Referenced by llvm::Metadata::print(), llvm::Metadata::print(), llvm::Metadata::printAsOperand(), llvm::Metadata::printAsOperand(), llvm::MDFunctionLocalContext::printShort(), llvm::MDNode::printTree(), and llvm::MDNode::printTree().
|
static |
Recursive version of printMetadataImpl.
Definition at line 5582 of file AsmWriter.cpp.
References llvm::dyn_cast(), llvm::isa(), N, writeAsOperandInternal(), and writeMDNodeBodyInternal().
|
static |
Definition at line 514 of file AsmWriter.cpp.
References llvm::all_of(), llvm::equal_to(), llvm::isa(), and llvm::PoisonMaskElem.
Referenced by getShuffleComment(), printZeroExtend(), and writeConstantInternal().
|
static |
Definition at line 4103 of file AsmWriter.cpp.
References llvm::GlobalValue::GeneralDynamicTLSModel, llvm::GlobalValue::InitialExecTLSModel, llvm::GlobalValue::LocalDynamicTLSModel, llvm::GlobalValue::LocalExecTLSModel, and llvm::GlobalValue::NotThreadLocal.
|
static |
Definition at line 4079 of file AsmWriter.cpp.
References llvm::GlobalValue::DefaultVisibility, llvm::GlobalValue::HiddenVisibility, and llvm::GlobalValue::ProtectedVisibility.
|
static |
Print without a type, skipping the TypePrinting object.
true iff printing was successful. Definition at line 5540 of file AsmWriter.cpp.
References llvm::isa(), Machine, V, and writeAsOperandInternal().
Referenced by llvm::Value::printAsOperand(), and llvm::Value::printAsOperand().
Look for a value that might be wrapped as metadata, e.g.
a value in a metadata operand. Returns the input value as-is if it is not wrapped.
Definition at line 108 of file AsmWriter.cpp.
References llvm::dyn_cast(), and V.
Referenced by orderModule().
|
static |
Definition at line 1620 of file AsmWriter.cpp.
References llvm::APFloat::bitcastToAPInt(), llvm::APInt::clearBit(), llvm::APInt::getActiveBits(), llvm::APInt::getBitWidth(), llvm::APFloat::getNaNPayload(), llvm::APFloat::getSemantics(), llvm::APFloat::isInfinity(), llvm::APFloat::isNaN(), llvm::APFloat::isNegative(), llvm::APFloat::isSignaling(), llvm::APInt::isSignMask(), llvm::APInt::isZero(), llvm::APInt::lshr(), llvm::APFloatBase::PPCDoubleDouble(), llvm::APFloat::toString(), llvm::APInt::trunc(), and WriteFullHexAPInt().
Referenced by writeConstantInternal().
|
static |
Definition at line 2992 of file AsmWriter.cpp.
References assert(), llvm::cast(), llvm::dyn_cast(), llvm::SlotTracker::getMetadataSlot(), llvm::isa(), N, llvm::printEscapedString(), llvm::ModuleSlotTracker::shouldPrintDebugLocationInline(), V, writeAsOperandInternal(), writeDIArgList(), writeDIExpression(), and writeDILocation().
|
static |
Definition at line 2907 of file AsmWriter.cpp.
References llvm::InlineAsm::AD_Intel, assert(), createSlotTracker(), llvm::dyn_cast(), llvm::isa(), Machine, llvm::printEscapedString(), printLLVMName(), V, writeAsOperandInternal(), and writeConstantInternal().
Referenced by printAsOperandImpl(), printMetadataImpl(), printMetadataImplRec(), printWithoutType(), writeAsOperandInternal(), writeAsOperandInternal(), writeConstantInternal(), writeDIArgList(), writeMDTuple(), and writeMetadataAsOperand().
|
static |
Definition at line 1674 of file AsmWriter.cpp.
References llvm::cast(), llvm::dyn_cast(), GEP, llvm::ConstantPointerNull::get(), llvm::Constant::getAggregateElement(), llvm::Constant::getSplatValue(), llvm::Value::getType(), llvm::isa(), NC, llvm::printEscapedString(), printShuffleMask(), uint64_t, writeAPFloatInternal(), writeAsOperandInternal(), and writeOptimizationInfo().
Referenced by llvm::Value::print(), and writeAsOperandInternal().
|
static |
Definition at line 2822 of file AsmWriter.cpp.
References assert(), N, Printer, and writeAsOperandInternal().
Referenced by writeAsOperandInternal().
|
static |
Definition at line 2287 of file AsmWriter.cpp.
|
static |
Definition at line 2377 of file AsmWriter.cpp.
References llvm::dwarf::AttributeEncodingString(), N, and Printer.
|
static |
Definition at line 2673 of file AsmWriter.cpp.
|
static |
Definition at line 2564 of file AsmWriter.cpp.
References llvm::DISourceLanguageName::getDialect(), llvm::DISourceLanguageName::getName(), llvm::DISourceLanguageName::getVersion(), llvm::DISourceLanguageName::hasVersionedName(), llvm::dwarf::LanguageDialectString(), llvm::dwarf::LanguageString(), N, Printer, and llvm::dwarf::SourceLanguageNameString().
|
static |
Definition at line 2495 of file AsmWriter.cpp.
References llvm::dwarf::EnumKindString(), llvm::dwarf::LanguageString(), N, and Printer.
|
static |
Definition at line 2442 of file AsmWriter.cpp.
|
static |
Definition at line 2365 of file AsmWriter.cpp.
|
static |
Definition at line 2797 of file AsmWriter.cpp.
References A(), assert(), llvm::dwarf::AttributeEncodingString(), llvm::dyn_cast(), I, N, and llvm::dwarf::OperationEncodingString().
Referenced by writeAsOperandInternal().
|
static |
Definition at line 2548 of file AsmWriter.cpp.
|
static |
Definition at line 2397 of file AsmWriter.cpp.
References llvm::dwarf::AttributeEncodingString(), N, and Printer.
|
static |
Definition at line 2317 of file AsmWriter.cpp.
References llvm::Count, llvm::dyn_cast_or_null(), N, Printer, and llvm::DIExpression::SignedConstant.
|
static |
Definition at line 2746 of file AsmWriter.cpp.
|
static |
Definition at line 2837 of file AsmWriter.cpp.
|
static |
Definition at line 2873 of file AsmWriter.cpp.
|
static |
Definition at line 2781 of file AsmWriter.cpp.
|
static |
Definition at line 2265 of file AsmWriter.cpp.
|
static |
Definition at line 2276 of file AsmWriter.cpp.
References N, and writeMetadataAsOperand().
|
static |
Definition at line 2640 of file AsmWriter.cpp.
|
static |
Definition at line 2651 of file AsmWriter.cpp.
|
static |
Definition at line 2765 of file AsmWriter.cpp.
|
static |
Definition at line 2248 of file AsmWriter.cpp.
Referenced by writeAsOperandInternal().
|
static |
Definition at line 2685 of file AsmWriter.cpp.
|
static |
Definition at line 2696 of file AsmWriter.cpp.
|
static |
Definition at line 2706 of file AsmWriter.cpp.
|
static |
Definition at line 2663 of file AsmWriter.cpp.
|
static |
Definition at line 2847 of file AsmWriter.cpp.
|
static |
Definition at line 2861 of file AsmWriter.cpp.
|
static |
Definition at line 2423 of file AsmWriter.cpp.
References llvm::dwarf::AttributeEncodingString(), N, and Printer.
|
static |
Definition at line 2611 of file AsmWriter.cpp.
|
static |
Definition at line 2293 of file AsmWriter.cpp.
|
static |
Definition at line 2475 of file AsmWriter.cpp.
|
static |
Definition at line 2537 of file AsmWriter.cpp.
References llvm::dwarf::ConventionString(), N, and Printer.
|
static |
Definition at line 2721 of file AsmWriter.cpp.
|
static |
Definition at line 2732 of file AsmWriter.cpp.
|
static |
Definition at line 2197 of file AsmWriter.cpp.
References llvm::FLInlinedCall::InlinedAtIdx, llvm::FLInlinedCall::InlineeContext, llvm::FLInlinedCall::SrcLocIdx, llvm::FLInlinedCall::Uniquable, and writeMetadataAsOperand().
|
static |
Definition at line 2184 of file AsmWriter.cpp.
References writeMetadataAsOperand().
Referenced by writeMDFunctionLocalContext().
|
static |
Definition at line 2190 of file AsmWriter.cpp.
References llvm::FLSrcLoc::Column, llvm::FLSrcLoc::Line, and llvm::FLSrcLoc::ScopeIdx.
|
static |
Definition at line 1610 of file AsmWriter.cpp.
References llvm::APInt::getBitWidth(), and llvm::APInt::toStringUnsigned().
Referenced by writeAPFloatInternal().
|
static |
Definition at line 2166 of file AsmWriter.cpp.
References I, N, Printer, and writeMetadataAsOperand().
|
static |
Definition at line 2212 of file AsmWriter.cpp.
References llvm::enumerate(), llvm::Module::getContext(), llvm::MDFunctionLocalContext::getInlinedCalls(), llvm::getIROptions(), llvm::MDFunctionLocalContext::getScopes(), llvm::MDFunctionLocalContext::getSrcLocs(), llvm::MDFunctionLocalContext::isNonDebug(), and writeFLMDNode().
|
static |
Definition at line 2887 of file AsmWriter.cpp.
References llvm_unreachable.
Referenced by printMetadataImpl(), and printMetadataImplRec().
|
static |
Definition at line 1940 of file AsmWriter.cpp.
References llvm::dyn_cast(), V, and writeAsOperandInternal().
|
static |
Definition at line 2034 of file AsmWriter.cpp.
References writeAsOperandInternal().
Referenced by writeDILayerLocList(), writeFLMDNode(), writeFLMDNode(), and writeGenericDINode().
|
static |
Definition at line 1567 of file AsmWriter.cpp.
References llvm::Div, llvm::dyn_cast(), GEP, and InRange().
Referenced by writeConstantInternal().
|
constexpr |
Definition at line 3161 of file AsmWriter.cpp.
Referenced by getOptions().