Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Classes |Namespaces |Macros |Functions |Variables
PPCAsmPrinter.cpp File Reference
#include "MCTargetDesc/PPCInstPrinter.h"
#include "MCTargetDesc/PPCMCExpr.h"
#include "MCTargetDesc/PPCMCTargetDesc.h"
#include "MCTargetDesc/PPCPredicates.h"
#include "PPC.h"
#include "PPCInstrInfo.h"
#include "PPCMachineFunctionInfo.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "PPCTargetStreamer.h"
#include "TargetInfo/PowerPCTargetInfo.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDirectives.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSectionXCOFF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCSymbolXCOFF.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/PPCTargetParser.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <cassert>
#include <cstdint>
#include <memory>
#include <new>

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< std::pair< const MCSymbol *, MCSymbolRefExpr::VariantKind > >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "asmprinter"
 
#define GENBOOLCOMMENT(Prefix, V,Field)
 
#define GENVALUECOMMENT(PrefixAndName, V,Field)
 

Functions

 STATISTIC (NumTOCEntries, "Number of Total TOC Entries Emitted.")
 
 STATISTIC (NumTOCConstPool, "Number ofConstant Pool TOC Entries.")
 
 STATISTIC (NumTOCGlobalInternal, "Number of InternalLinkage Global TOC Entries.")
 
 STATISTIC (NumTOCGlobalExternal, "Number of ExternalLinkage Global TOC Entries.")
 
 STATISTIC (NumTOCJumpTable, "Number of Jump Table TOC Entries.")
 
 STATISTIC (NumTOCThreadLocal, "Number ofThreadLocal TOC Entries.")
 
 STATISTIC (NumTOCBlockAddress, "Number of Block Address TOC Entries.")
 
 STATISTIC (NumTOCEHBlock, "Number of EH Block TOC Entries.")
 
static void collectTOCStats (PPCAsmPrinter::TOCEntryTypeType)
 
staticCodeModel::Model getCodeModel (constPPCSubtarget &S,constTargetMachine &TM,constMachineOperand &MO)
 
static void setOptionalCodeModel (MCSymbolXCOFF *XSym,CodeModel::Model CM)
 
staticMCSymbolcreateMCSymbolForTlsGetAddr (MCContext &Ctx,unsigned MIOpc)
 This helper function creates the TlsGetAddr/TlsGetMod MCSymbol for AIX.
 
staticMCSymbolgetMCSymbolForTOCPseudoMO (constMachineOperand &MO,AsmPrinter &AP)
 Map a machine operand for a TOC pseudo-machine instruction to its corresponding MCSymbol.
 
static PPCAsmPrinter::TOCEntryType getTOCEntryTypeForMO (constMachineOperand &MO)
 
staticbool isSpecialLLVMGlobalArrayToSkip (constGlobalVariable *GV)
 
staticbool isSpecialLLVMGlobalArrayForStaticInit (constGlobalVariable *GV)
 
static void tocDataChecks (unsigned PointerSize,constGlobalVariable *GV)
 
staticunsigned mapToSinitPriority (intP)
 
static std::string convertToSinitPriority (int Priority)
 
staticAsmPrintercreatePPCAsmPrinterPass (TargetMachine &tm, std::unique_ptr<MCStreamer > &&Streamer)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter ()
 

Variables

staticcl::opt<boolEnableSSPCanaryBitInTB ("aix-ssp-tb-bit", cl::init(false),cl::desc("Enable Passing SSP Canaryinfo in Trackback on AIX"), cl::Hidden)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asmprinter"

Definition at line85 of filePPCAsmPrinter.cpp.

◆ GENBOOLCOMMENT

#define GENBOOLCOMMENT( Prefix,
 V,
 Field 
)
Value:
CommentOS << (Prefix) << ((V) & (TracebackTable::Field##Mask) ?"+" :"-") \
<< #Field
A field in a structure.

◆ GENVALUECOMMENT

#define GENVALUECOMMENT( PrefixAndName,
 V,
 Field 
)
Value:
CommentOS << (PrefixAndName) <<" = " \
<<static_cast<unsigned>(((V) & (TracebackTable::Field##Mask)) >> \
(TracebackTable::Field##Shift))

Function Documentation

◆ collectTOCStats()

static void collectTOCStats(PPCAsmPrinter::TOCEntryType Type)
static

Definition at line452 of filePPCAsmPrinter.cpp.

◆ convertToSinitPriority()

static std::string convertToSinitPriority(int Priority)
static

Definition at line3284 of filePPCAsmPrinter.cpp.

Referencesllvm::format_hex_no_prefix(),mapToSinitPriority(), andP.

◆ createMCSymbolForTlsGetAddr()

staticMCSymbol * createMCSymbolForTlsGetAddr(MCContextCtx,
unsigned MIOpc 
)
static

This helper function creates the TlsGetAddr/TlsGetMod MCSymbol for AIX.

We will create the csect and use the qual-name symbol instead of creating just the external symbol.

Definition at line658 of filePPCAsmPrinter.cpp.

Referencesllvm::MCSectionXCOFF::getQualNameSymbol(),llvm::SectionKind::getText(),llvm::MCContext::getXCOFFSection(),llvm::XCOFF::XMC_PR, andllvm::XCOFF::XTY_ER.

◆ createPPCAsmPrinterPass()

staticAsmPrinter * createPPCAsmPrinterPass(TargetMachinetm,
std::unique_ptr<MCStreamer > && Streamer 
)
static

Definition at line3354 of filePPCAsmPrinter.cpp.

Referencesllvm::TargetMachine::getTargetTriple(), andllvm::Triple::isOSAIX().

Referenced byLLVMInitializePowerPCAsmPrinter().

◆ getCodeModel()

staticCodeModel::Model getCodeModel(constPPCSubtargetS,
constTargetMachineTM,
constMachineOperandMO 
)
static

Definition at line479 of filePPCAsmPrinter.cpp.

Referencesassert(),llvm::PPCSubtarget::getCodeModel(),llvm::MachineOperand::getGlobal(),llvm::MachineOperand::getType(), andllvm::MachineOperand::MO_GlobalAddress.

Referenced byllvm::RISCVTargetLowering::getJumpTableEncoding(),llvm::X86TargetLowering::getJumpTableEncoding(),llvm::PPCTargetLowering::getPICJumpTableRelocBase(),llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(),llvm::X86TargetLowering::getPICJumpTableRelocBaseExpr(),llvm::RISCVTargetLowering::LowerCall(),llvm::RISCVTargetLowering::LowerCustomJumpTableEntry(),llvm::LanaiTargetLowering::LowerJumpTable(),llvm::SparcTargetLowering::makeAddress(), andllvm::VETargetLowering::makeAddress().

◆ getMCSymbolForTOCPseudoMO()

staticMCSymbol * getMCSymbolForTOCPseudoMO(constMachineOperandMO,
AsmPrinterAP 
)
static

Map a machine operand for a TOC pseudo-machine instruction to its corresponding MCSymbol.

Definition at line754 of filePPCAsmPrinter.cpp.

Referencesllvm::MachineOperand::getBlockAddress(),llvm::AsmPrinter::GetBlockAddressSymbol(),llvm::AsmPrinter::GetCPISymbol(),llvm::MachineOperand::getGlobal(),llvm::MachineOperand::getIndex(),llvm::AsmPrinter::GetJTISymbol(),llvm::AsmPrinter::getSymbol(),llvm::MachineOperand::getType(),llvm_unreachable,llvm::MachineOperand::MO_BlockAddress,llvm::MachineOperand::MO_ConstantPoolIndex,llvm::MachineOperand::MO_GlobalAddress, andllvm::MachineOperand::MO_JumpTableIndex.

◆ getTOCEntryTypeForMO()

static PPCAsmPrinter::TOCEntryType getTOCEntryTypeForMO(constMachineOperandMO)
static

Definition at line771 of filePPCAsmPrinter.cpp.

Referencesllvm::GlobalValue::AvailableExternallyLinkage,llvm::GlobalValue::ExternalLinkage,llvm::GlobalValue::ExternalWeakLinkage,llvm::MachineOperand::getGlobal(),llvm::GlobalValue::getLinkage(),llvm::MachineOperand::getTargetFlags(),llvm::MachineOperand::getType(),llvm::PPCInstrInfo::hasTLSFlag(),llvm_unreachable,llvm::MachineOperand::MO_BlockAddress,llvm::MachineOperand::MO_ConstantPoolIndex,llvm::MachineOperand::MO_GlobalAddress, andllvm::MachineOperand::MO_JumpTableIndex.

◆ isSpecialLLVMGlobalArrayForStaticInit()

staticbool isSpecialLLVMGlobalArrayForStaticInit(constGlobalVariableGV)
static

Definition at line2719 of filePPCAsmPrinter.cpp.

Referencesllvm::StringSwitch< T, R >::Cases(),llvm::StringSwitch< T, R >::Default(), andllvm::Value::getName().

◆ isSpecialLLVMGlobalArrayToSkip()

staticbool isSpecialLLVMGlobalArrayToSkip(constGlobalVariableGV)
static

Definition at line2707 of filePPCAsmPrinter.cpp.

Referencesllvm::StringSwitch< T, R >::Case(),llvm::StringSwitch< T, R >::Default(),llvm::Value::getName(), andllvm::GlobalValue::hasAppendingLinkage().

◆ LLVMInitializePowerPCAsmPrinter()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCAsmPrinter()

Definition at line3383 of filePPCAsmPrinter.cpp.

ReferencescreatePPCAsmPrinterPass(),llvm::getThePPC32LETarget(),llvm::getThePPC32Target(),llvm::getThePPC64LETarget(),llvm::getThePPC64Target(), andllvm::TargetRegistry::RegisterAsmPrinter().

◆ mapToSinitPriority()

staticunsigned mapToSinitPriority(int P)
static

Definition at line3265 of filePPCAsmPrinter.cpp.

ReferencesP, andllvm::report_fatal_error().

Referenced byconvertToSinitPriority().

◆ setOptionalCodeModel()

static void setOptionalCodeModel(MCSymbolXCOFFXSym,
CodeModel::Model CM 
)
static

Definition at line495 of filePPCAsmPrinter.cpp.

Referencesllvm::MCSymbolXCOFF::CM_Large,llvm::MCSymbolXCOFF::CM_Small,llvm::CodeModel::Large,llvm::report_fatal_error(),llvm::MCSymbolXCOFF::setPerSymbolCodeModel(), andllvm::CodeModel::Small.

◆ STATISTIC()[1/8]

STATISTIC(NumTOCBlockAddress ,
"Number of Block Address TOC Entries."  
)

◆ STATISTIC()[2/8]

STATISTIC(NumTOCConstPool ,
"Number ofConstant Pool TOC Entries."  
)

◆ STATISTIC()[3/8]

STATISTIC(NumTOCEHBlock ,
"Number of EH Block TOC Entries."  
)

◆ STATISTIC()[4/8]

STATISTIC(NumTOCEntries ,
"Number of Total TOC Entries Emitted."  
)

◆ STATISTIC()[5/8]

STATISTIC(NumTOCGlobalExternal ,
"Number of ExternalLinkage Global TOC Entries."  
)

◆ STATISTIC()[6/8]

STATISTIC(NumTOCGlobalInternal ,
"Number of InternalLinkage Global TOC Entries."  
)

◆ STATISTIC()[7/8]

STATISTIC(NumTOCJumpTable ,
"Number of Jump Table TOC Entries."  
)

◆ STATISTIC()[8/8]

STATISTIC(NumTOCThreadLocal ,
"Number ofThreadLocal TOC Entries."  
)

◆ tocDataChecks()

static void tocDataChecks(unsigned PointerSize,
constGlobalVariableGV 
)
static

Definition at line2743 of filePPCAsmPrinter.cpp.

Referencesassert(),llvm::GlobalObject::getAlign(),llvm::GlobalValue::getDataLayout(),llvm::DataLayout::getTypeSizeInBits(),llvm::GlobalValue::getValueType(),llvm::GlobalValue::hasPrivateLinkage(),llvm::Type::isSized(),llvm::report_fatal_error(),llvm::Align::value(), andllvm::MaybeAlign::valueOrOne().

Variable Documentation

◆ EnableSSPCanaryBitInTB

cl::opt<bool > EnableSSPCanaryBitInTB("aix-ssp-tb-bit", cl::init(false),cl::desc("Enable Passing SSP Canaryinfo in Trackback on AIX"), cl::Hidden)("aix-ssp-tb-bit" ,
cl::init(false) ,
cl::desc("Enable Passing SSP Canaryinfo in Trackback on AIX") ,
cl::Hidden  
)
static

Generated on Sun Jul 20 2025 15:03:26 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp