49 for (
const auto &Alias : M.aliases()) {
53 {},
"Alias without a base object is not yet supported on z/OS.");
57 if (Alias.hasWeakLinkage() || Alias.hasLinkOnceLinkage())
59 "Weak alias/reference not supported on z/OS");
61 GOAliasMap[Aliasee].push_back(&Alias);
64 "Only aliases to functions is supported in GOFF.");
74void SystemZXPLINKAsmPrinter::emitCallInformation(CallType CT) {
82SystemZXPLINKAsmPrinter::AssociatedDataAreaTable::insert(
const MCSymbol *Sym,
84 auto Key = std::make_pair(Sym, SlotKind);
85 auto It = Displacements.
find(
Key);
87 if (It != Displacements.
end())
101 uint32_t Displacement = NextDisplacement;
102 Displacements[std::make_pair(Sym, SlotKind)] = NextDisplacement;
103 NextDisplacement +=
Length;
108uint32_t SystemZXPLINKAsmPrinter::AssociatedDataAreaTable::insert(
113 Sym =
MF.getTarget().getSymbol(GV);
114 assert(Sym &&
"No symbol");
117 Sym =
MF.getContext().getOrCreateSymbol(SymName);
118 assert(Sym &&
"No symbol");
123 return insert(Sym, ADAslotType);
130 switch (
MI->getOpcode()) {
131 case SystemZ::CallBRASL_XPLINK64:
133 .addReg(SystemZ::R7D)
134 .addExpr(
Lower.getExpr(
MI->getOperand(0),
136 emitCallInformation(CallType::BRASL7);
139 case SystemZ::CallBASR_XPLINK64:
141 .addReg(SystemZ::R7D)
142 .addReg(
MI->getOperand(0).getReg()));
143 emitCallInformation(CallType::BASR76);
146 case SystemZ::Return_XPLINK:
151 case SystemZ::CondReturn_XPLINK:
160 case SystemZ::XPLINK_STACKRESTORE: {
161 if (!StackRestoreStub)
162 StackRestoreStub =
OutContext.createTempSymbol(
"stackrestore");
164 .addReg(SystemZ::R3D)
169 MCInstBuilder(SystemZ::BASR).addReg(SystemZ::R3D).addReg(SystemZ::R3D));
170 emitCallInformation(CallType::BASR33);
174 case SystemZ::CallBASR_STACKEXT:
176 .addReg(SystemZ::R3D)
177 .addReg(
MI->getOperand(0).getReg()));
178 emitCallInformation(CallType::BASR33);
181 case SystemZ::ADA_ENTRY_VALUE:
182 case SystemZ::ADA_ENTRY: {
185 uint32_t Disp = ADATable.insert(*
MF,
MI->getOperand(1));
186 Register TargetReg =
MI->getOperand(0).getReg();
189 Disp +=
MI->getOperand(3).getImm();
190 bool LoadAddr =
MI->getOpcode() == SystemZ::ADA_ENTRY;
192 unsigned Op0 = LoadAddr ? SystemZ::LA : SystemZ::LG;
193 unsigned Op =
TII->getOpcodeForOffset(Op0, Disp);
197 if (TargetReg != ADAReg) {
198 IndexReg = TargetReg;
202 MCInstBuilder(SystemZ::LLILF).addReg(TargetReg).addImm(Disp));
213 MCInstBuilder(
Op).addReg(TargetReg).addReg(ADAReg).addImm(Disp).addReg(
228 assert(
TM.getTargetTriple().isOSBinFormatGOFF() &&
"Only GOFF supported");
232 if (Structors.
empty())
240 static_cast<MCSectionGOFF *
>(Obj.getStaticXtorSection(S.Priority));
250 uint32_t XtorPriority = Section->getPRAttributes().SortKey;
253 assert(GV &&
"C++ xxtor pointer was not a GlobalValue!");
258 unsigned PointerSizeInBytes =
DL.getPointerSize();
261 const MCExpr *ADAFuncRefExpr;
266 assert(ADASection &&
"ADA section must exist for GOFF targets!");
268 assert(ADASym &&
"ADA symbol should already be set!");
277 OutStreamer->emitValue(ADAFuncRefExpr, PointerSizeInBytes);
281 OutStreamer->emitValue(ADAFuncRefExpr, PointerSizeInBytes);
290 if (StackRestoreStub)
291 emitStackRestoreStub();
296 auto *
ZOS = getTargetStreamer();
303 for (
auto &GO : M.global_objects()) {
305 if (!GV->hasInitializer()) {
307 ZOS->emitADA(Sym,
OutContext.getObjectFileInfo()->getADASection());
324void SystemZXPLINKAsmPrinter::emitCELQMAIN(
const Function &MainFn) {
326 auto ExternalOSSymbol = [&](
StringRef Name,
bool IsRenameable) {
333 MCSymbol *CELQINPL = ExternalOSSymbol(
"CELQINPL",
false);
334 MCSymbol *CELQBST = ExternalOSSymbol(
"CELQBST",
true);
362void SystemZXPLINKAsmPrinter::emitADASection() {
368 auto *
ZOS = getTargetStreamer();
369 unsigned EmittedBytes = 0;
370 for (
auto &Entry : ADATable.getTable()) {
373 std::tie(Sym, SlotKind) =
Entry.first;
375 assert(
Offset == EmittedBytes &&
"Offset not as expected");
377#define EMIT_COMMENT(Str) \
378 OutStreamer->AddComment(Twine("Offset ") \
379 .concat(utostr(Offset)) \
380 .concat(" " Str " ") \
381 .concat(Sym->getName()));
407 Twine(Sym->
getName()).concat(
"@indirect"));
412 MCSymbolGOFF *GOFFSym =
413 static_cast<llvm::MCSymbolGOFF *
>(
const_cast<llvm::MCSymbol *
>(Sym));
436 std::string ProductID;
437 if (
auto *MD = M.getModuleFlag(
"zos_product_id"))
439 if (ProductID.empty())
446 M.getModuleFlag(
"zos_product_major_version")))
447 return VersionVal->getZExtValue();
448 return LLVM_VERSION_MAJOR;
453 M.getModuleFlag(
"zos_product_minor_version")))
454 return ReleaseVal->getZExtValue();
455 return LLVM_VERSION_MINOR;
460 M.getModuleFlag(
"zos_product_patchlevel")))
461 return PatchVal->getZExtValue();
462 return LLVM_VERSION_PATCH;
466 std::time_t Time = 0;
468 M.getModuleFlag(
"zos_translation_time"))) {
469 long SecondsSinceEpoch = Val->getSExtValue();
470 Time =
static_cast<time_t
>(SecondsSinceEpoch);
475void SystemZXPLINKAsmPrinter::emitIDRLSection(
Module &M) {
478 constexpr unsigned IDRLDataLength = 30;
486 SmallString<IDRLDataLength + 1> TempStr;
487 raw_svector_ostream
O(TempStr);
488 O <<
formatv(
"{0,-10}{1,0-2:d}{2,0-2:d}{3:%Y%m%d%H%M%S}{4,0-2}",
489 ProductID.substr(0, 10).c_str(), ProductVersion, ProductRelease,
491 SmallString<IDRLDataLength>
Data;
503 if (
MF->getFunction().hasFnAttribute(Attribute::Naked))
508 auto *
ZOS = getTargetStreamer();
517 EndOfPrologSym =
nullptr;
518 StackUpdateSym =
nullptr;
528 unsigned BBCount = 1;
530 for (
auto &
MBB : *
MF) {
531 for (
auto &
I :
MBB) {
532 if (
I.getOpcode() == SystemZ::FENCE)
534 else if (!StackUpdateMI) {
535 unsigned Opcode =
I.getOpcode();
540 if ((Opcode == SystemZ::AGHI || Opcode == SystemZ::AGFI) &&
541 I.getOperand(0).getReg() == Regs.getStackPointerRegister())
547 if (EndOfPrologMI || BBCount == 3)
554 if (EndOfPrologMI ==
nullptr)
557#ifdef EXPENSIVE_CHECKS
562 for (
auto &
MBB : *
MF) {
563 bool TerminateLoop =
false;
564 for (
auto &
I :
MBB) {
566 if (&
I == EndOfPrologMI) {
567 TerminateLoop =
true;
581 EndOfPrologMI->setPostInstrSymbol(*
MF, EndOfPrologSym);
589void SystemZXPLINKAsmPrinter::calculatePPA1() {
590 auto *
ZOS = getTargetStreamer();
591 assert(
ZOS->PPA2Sym !=
nullptr &&
"PPA2 Symbol not defined");
593 SystemZTargetzOSStreamer::PPA1Info
Info;
595 const TargetRegisterInfo *
TRI =
MF->getRegInfo().getTargetRegisterInfo();
596 const SystemZSubtarget &
Subtarget =
MF->getSubtarget<SystemZSubtarget>();
598 const SystemZMachineFunctionInfo *ZFI =
599 MF->getInfo<SystemZMachineFunctionInfo>();
600 const auto *ZFL =
static_cast<const SystemZXPLINKFrameLowering *
>(
602 const MachineFrameInfo &MFFrame =
MF->getFrameInfo();
606 uint16_t SavedGPRMask = 0;
607 uint16_t SavedFPRMask = 0;
608 uint8_t SavedVRMask = 0;
609 int64_t OffsetFPR = 0;
610 int64_t OffsetVR = 0;
611 const int64_t TopOfStack =
616 for (
unsigned I = ZFI->getSpillGPRRegs().LowGPR,
617 E = ZFI->getSpillGPRRegs().HighGPR;
618 I &&
E &&
I <=
E; ++
I) {
620 assert(
V < 16 &&
"GPR index out of range");
621 SavedGPRMask |= 1 << (15 -
V);
624 for (
auto &CS : CSI) {
625 unsigned Reg = CS.getReg();
626 unsigned I =
TRI->getEncodingValue(
Reg);
629 assert(
I < 16 &&
"FPR index out of range");
630 SavedFPRMask |= 1 << (15 -
I);
632 if (Temp < OffsetFPR)
634 }
else if (SystemZ::VR128BitRegClass.
contains(
Reg)) {
635 assert(
I >= 16 &&
I <= 23 &&
"VPR index out of range");
636 unsigned BitNum =
I - 16;
637 SavedVRMask |= 1 << (7 - BitNum);
645 OffsetFPR += (OffsetFPR < 0) ? TopOfStack : 0;
646 OffsetVR += (OffsetVR < 0) ? TopOfStack : 0;
649 uint8_t FrameReg =
TRI->getEncodingValue(
TRI->getFrameRegister(*
MF));
650 uint8_t AllocaReg = ZFL->hasFP(*
MF) ? FrameReg : 0;
651 assert(AllocaReg < 16 &&
"Can't have alloca register larger than 15");
653 MCSymbol *PersonalityRoutine =
nullptr;
657 if (!
MF->getLandingPads().empty()) {
659 MF->getFunction().getPersonalityFn()->stripPointerCasts());
660 PersonalityRoutine = Per ?
MF->getTarget().getSymbol(Per) :
nullptr;
661 if (PersonalityRoutine) {
662 GCCEH =
MF->getContext().getOrCreateSymbol(
663 Twine(
"GCC_except_table") + Twine(
MF->getFunctionNumber()));
664 PersonalityADADisp = ADATable.insert(
671 std::string
N(
MF->getFunction().hasName()
672 ? Twine(
MF->getFunction().getName()).concat(
"_").str()
681 if (
MF->getFunction().hasFnAttribute(
"zos-ppa1-name"))
683 MF->getFunction().getFnAttribute(
"zos-ppa1-name").getValueAsString();
684 else if (
MF->getFunction().hasName())
685 Info.Name =
MF->getFunction().getName();
691 Info.EndOfProlog = EndOfPrologSym;
692 Info.StackUpdate = StackUpdateSym;
693 Info.PersonalityADADisp = PersonalityADADisp;
694 Info.GCCEHADADisp = GCCEHADADisp;
695 Info.OffsetFPR = OffsetFPR;
696 Info.OffsetVR = OffsetVR;
698 Info.SizeOfFnParams = ZFI->getSizeOfFnParams();
699 Info.SavedGPRMask = SavedGPRMask;
700 Info.SavedFPRMask = SavedFPRMask;
701 Info.SavedVRMask = SavedVRMask;
702 Info.FrameReg = FrameReg;
703 Info.AllocaReg = AllocaReg;
704 Info.IsVarArg =
MF->getFunction().isVarArg();
707 ZOS->DeferredPPA1.push_back(Info);
718 emitCELQMAIN(*MainFn);
734void SystemZXPLINKAsmPrinter::emitStackRestoreStub() {
736 auto Emit = [&](
const MCInst &Inst) {
743 OutStreamer->AddComment(
"XPLINK Stub Entry Padding");
745 OutStreamer->AddComment(
"XPLINK Stub Entry Marker");
746 OutStreamer->AddComment(
"Eyecatcher 0x00C300C500C500");
747 OutStreamer->emitIntValueInHex(0x00C300C500C500, 7);
754 const int Block = 32;
757 .addReg(SystemZ::R1D)
760 .addReg(SystemZ::R4D)
761 .addImm(Bias +
Off));
762 Emit(
MCInstBuilder(SystemZ::LGR).addReg(SystemZ::R4D).addReg(SystemZ::R1D));
763 Emit(
MCInstBuilder(SystemZ::B).addReg(SystemZ::R3D).addImm(2).addReg(0));
767void SystemZXPLINKAsmPrinter::emitPPA2(
Module &M) {
768 auto *
ZOS = getTargetStreamer();
773 const char *StartSymbolName =
"CELQSTRT";
777 ZOS->emitRenameable(CELQSTRT,
false);
785 SmallString<14> CompilationTimeEBCDIC, CompilationTime;
792 SmallString<6> VersionEBCDIC,
Version;
794 ProductRelease, ProductPatch);
799 enum class PPA2MemberId : uint8_t {
804 enum class PPA2MemberSubId : uint8_t {
810 LLVMBasedLang = 0xe7,
813 enum class PPA2Flags : uint8_t {
814 CompileForBinaryFloatingPoint = 0x80,
815 CompiledWithXPLink = 0x01,
816 CompiledUnitASCII = 0x04,
817 HasServiceInfo = 0x20,
820 PPA2MemberSubId MemberSubId = PPA2MemberSubId::LLVMBasedLang;
821 if (
auto *MD =
M.getModuleFlag(
"zos_cu_language")) {
823 MemberSubId = StringSwitch<PPA2MemberSubId>(Language)
824 .Case(
"C", PPA2MemberSubId::C)
825 .Case(
"C++", PPA2MemberSubId::CXX)
826 .Case(
"Swift", PPA2MemberSubId::Swift)
827 .Case(
"Go", PPA2MemberSubId::Go)
828 .Default(PPA2MemberSubId::LLVMBasedLang);
833 OutStreamer->emitInt8(
static_cast<uint8_t
>(PPA2MemberId::LE_C_Runtime));
834 OutStreamer->emitInt8(
static_cast<uint8_t
>(MemberSubId));
837 OutStreamer->emitAbsoluteSymbolDiff(CELQSTRT, PPA2Sym, 4);
839 OutStreamer->emitAbsoluteSymbolDiff(DateVersionSym, PPA2Sym, 4);
842 uint8_t Flgs =
static_cast<uint8_t
>(PPA2Flags::CompileForBinaryFloatingPoint);
843 Flgs |=
static_cast<uint8_t
>(PPA2Flags::CompiledWithXPLink);
846 if (
auto *MD =
M.getModuleFlag(
"zos_le_char_mode")) {
848 if (CharMode ==
"ebcdic")
850 else if (CharMode !=
"ascii")
852 {},
"Only ascii or ebcdic are allowed for zos_le_char_mode");
855 Flgs |=
static_cast<uint8_t
>(
856 PPA2Flags::CompiledUnitASCII);
878 OutStreamer->emitAbsoluteSymbolDiff(PPA2Sym, CELQSTRT, 8);
884 if (!M.getTargetTriple().isOSzOS())
935 auto *
ZOS = getTargetStreamer();
936 ZOS->emitADA(Sym,
OutContext.getObjectFileInfo()->getADASection());
942 auto *
ZOS = getTargetStreamer();
945 if (
MF->getFunction().hasFnAttribute(Attribute::Naked)) {
949 OutStreamer->AddComment(
"XPLINK Stub Entry Padding");
951 OutStreamer->AddComment(
"XPLINK Stub Entry Marker");
952 OutStreamer->AddComment(
"Eyecatcher 0x00C300C500C500");
953 OutStreamer->emitIntValueInHex(0x00C300C500C500, 7);
973 uint32_t DSAAndFlags = DSASize & 0xFFFFFFE0;
974 DSAAndFlags |= Flags;
977 OutStreamer->AddComment(
"XPLINK Routine Layout Entry");
979 OutStreamer->AddComment(
"Eyecatcher 0x00C300C500C500");
980 OutStreamer->emitIntValueInHex(0x00C300C500C500, 7);
984 OutStreamer->emitAbsoluteSymbolDiff(
ZOS->DeferredPPA1.back().PPA1,
985 ZOS->DeferredPPA1.back().EPMarker, 4);
990 OutStreamer->AddComment(
" Bit 1: 1 = Leaf function");
992 OutStreamer->AddComment(
" Bit 1: 0 = Non-leaf function");
994 OutStreamer->AddComment(
" Bit 2: 1 = Uses alloca");
996 OutStreamer->AddComment(
" Bit 2: 0 = Does not use alloca");
const AArch64Subtarget & Subtarget
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file provides utility functions for converting between EBCDIC-1047 and UTF-8.
const HexagonInstrInfo * TII
Module.h This file contains the declarations for the Module class.
This file contains the MCSymbolGOFF class.
Register const TargetRegisterInfo * TRI
Promote Memory to Register
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
std::unique_ptr< MCStreamer > && Streamer
#define EMIT_COMMENT(Str)
static void determinePrologueStackUpdateSym(MachineFunction *MF, MCSymbol *&EndOfPrologSym, MCSymbol *&StackUpdateSym)
static uint32_t getProductVersion(Module &M)
static std::string getProductID(Module &M)
static time_t getTranslationTime(Module &M)
static uint32_t getProductRelease(Module &M)
static uint32_t getProductPatch(Module &M)
const AArch64FrameLowering * getFrameLowering() const override
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
MCSymbol * getSymbol(const GlobalValue *GV) const
void EmitToStreamer(MCStreamer &S, const MCInst &Inst)
TargetMachine & TM
Target machine description.
virtual void emitGlobalAlias(const Module &M, const GlobalAlias &GA)
Align emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
MachineFunction * MF
The current machine function.
virtual const MCExpr * lowerConstant(const Constant *CV, const Constant *BaseCV=nullptr, uint64_t Offset=0)
Lower the specified LLVM Constant to an MCExpr.
virtual void emitStartOfAsmFile(Module &)
This virtual method can be overridden by targets that want to emit something at the start of their fi...
unsigned PointerSize
The pointer size in bytes for the default address space.
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const
This emits linkage information about GVSym based on GV, if this is supported by the target.
MCSymbol * CurrentFnSym
The symbol for the current function.
MCContext & OutContext
This is the context for the output file that we are streaming.
bool doFinalization(Module &M) override
Shut down the asmprinter.
void emitVisibility(MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const
This emits visibility information about symbol, if this is supported by the target.
void emitInt32(int Value) const
Emit a long directive and value.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
void preprocessXXStructorList(const DataLayout &DL, const Constant *List, SmallVector< Structor, 8 > &Structors)
This method gathers an array of Structors and then sorts them out by Priority.
const DataLayout & getDataLayout() const
Return information about data layout.
virtual void emitFunctionEntryLabel()
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
This is an important base class in LLVM.
const Constant * stripPointerCasts() const
A parsed version of the target data layout string in and methods for querying it.
LLVM_ABI unsigned getPointerSize(unsigned AS=0) const
The pointer representation size in bytes, rounded up to a whole number of bytes.
const Function & getFunction() const
LLVM_ABI const GlobalObject * getAliaseeObject() const
LLVM_ABI bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
bool hasLocalLinkage() const
LLVM_ABI const GlobalObject * getAliaseeObject() const
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx, SMLoc Loc=SMLoc())
static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
LLVM_ABI MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
LLVM_ABI MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Base class for the full range of assembler expressions which are needed for parsing.
MCInstBuilder & addReg(MCRegister Reg)
Add a new register operand.
MCInstBuilder & addImm(int64_t Val)
Add a new integer immediate operand.
Instances of this class represent a single low-level machine instruction.
MCSymbol * getBeginSymbol()
static const MCSpecifierExpr * create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())
Generic base class for all target subtargets.
StringRef getExternalName() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringRef getName() const
getName - Get the symbol name.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
uint64_t getMaxCallFrameSize() const
Return the maximum size of a call frame that must be allocated for an outgoing function call.
int64_t getOffsetAdjustment() const
Return the correction for frame offsets.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
bool hasStackProtectorIndex() const
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
MCContext & getContext() const
Representation of each machine instruction.
LLVM_ABI void setPreInstrSymbol(MachineFunction &MF, MCSymbol *Symbol)
Set a symbol that will be emitted just prior to the instruction itself.
const GlobalValue * getGlobal() const
unsigned getTargetFlags() const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
const char * getSymbolName() const
@ MO_GlobalAddress
Address of a global value.
@ MO_ExternalSymbol
Name of external global symbol.
iterator find(const KeyT &Key)
A Module instance is used to store all the information related to an LLVM module.
Wrapper class representing virtual and physical registers.
StringRef str() const
Explicit conversion to StringRef.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
void emitInstruction(const MachineInstr *MI) override
Targets should implement this to emit instructions.
SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
const SystemZInstrInfo * getInstrInfo() const override
SystemZCallingConventionRegisters * getSpecialRegisters() const
void emitRenameable(MCSymbol *Sym, bool IsRenamable)
XPLINK64 calling convention specific use registers Particular to z/OS when in 64 bit mode.
int getCallFrameSize() final
int getStackPointerBias() final
void emitGlobalAlias(const Module &M, const GlobalAlias &GA) override
bool doInitialization(Module &M) override
Set up the AsmPrinter when we are working on a new module.
SystemZXPLINKAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
const MCExpr * lowerConstant(const Constant *CV, const Constant *BaseCV=nullptr, uint64_t Offset=0) override
Lower the specified LLVM Constant to an MCExpr.
bool doFinalization(Module &M) override
Shut down the asmprinter.
void emitFunctionBodyEnd() override
Targets can override this to emit stuff after the last basic block in the function.
void emitStartOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the start of their fi...
void emitFunctionEntryLabel() override
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
void emitInstruction(const MachineInstr *MI) override
Targets should implement this to emit instructions.
void emitEndOfAsmFile(Module &M) override
This virtual method can be overridden by targets that want to emit something at the end of their file...
void emitXXStructorList(const DataLayout &DL, const Constant *List, bool IsCtor) override
This method emits llvm.global_ctors or llvm.global_dtors list.
Primary interface to the complete machine description for the target machine.
const MCSubtargetInfo & getMCSubtargetInfo() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Twine concat(const Twine &Suffix) const
static Twine utohexstr(uint64_t Val)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
@ Swift
Calling convention for Swift.
LLVM_ABI std::error_code convertToEBCDIC(StringRef Source, SmallVectorImpl< char > &Result)
Converts UTF-8 text containing only code points in the range U+0000 to U+00FF to EBCDIC-1047.
@ MO_ADA_DATA_SYMBOL_ADDR
@ MO_ADA_DIRECT_FUNC_DESC
@ MO_ADA_INDIRECT_FUNC_DESC
const unsigned GR64Regs[16]
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > extract_or_null(Y &&MD)
Extract a Value from Metadata, allowing null.
UtcTime< std::chrono::seconds > toUtcTime(std::time_t T)
Convert a std::time_t to a UtcTime.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
detail::concat_range< ValueT, RangeTs... > concat(RangeTs &&...Ranges)
Returns a concatenated range across two or more ranges.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
DWARFExpression::Operation Op
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
@ ZOS
z/OS MVS Exception Handling.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
@ MCSA_OSLinkage
symbol uses OS linkage (GOFF)
@ MCSA_WeakReference
.weak_reference (MachO)
@ MCSA_IndirectSymbol
.indirect_symbol (MachO)
@ MCSA_Global
.type _foo, @gnu_unique_object
@ MCSA_Extern
.extern (XCOFF)
@ MCSA_ELF_TypeObject
.type _foo, STT_OBJECT # aka @object
@ MCSA_ELF_TypeFunction
.type _foo, STT_FUNC # aka @function
@ MCSA_Hidden
.hidden (ELF)
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
llvm.global_ctors and llvm.global_dtors are arrays of Structor structs.