003 File Manager
Current Path:
/usr/src/contrib/llvm-project/llvm/lib/Target/ARM
usr
/
src
/
contrib
/
llvm-project
/
llvm
/
lib
/
Target
/
ARM
/
📁
..
📄
A15SDOptimizer.cpp
(24.01 KB)
📄
ARM.h
(2.78 KB)
📄
ARM.td
(73.6 KB)
📄
ARMAsmPrinter.cpp
(80.17 KB)
📄
ARMAsmPrinter.h
(5.74 KB)
📄
ARMBaseInstrInfo.cpp
(209.03 KB)
📄
ARMBaseInstrInfo.h
(36.07 KB)
📄
ARMBaseRegisterInfo.cpp
(34.2 KB)
📄
ARMBaseRegisterInfo.h
(7.84 KB)
📄
ARMBasicBlockInfo.cpp
(5.18 KB)
📄
ARMBasicBlockInfo.h
(5.25 KB)
📄
ARMCallLowering.cpp
(19.74 KB)
📄
ARMCallLowering.h
(1.89 KB)
📄
ARMCallingConv.cpp
(11.8 KB)
📄
ARMCallingConv.h
(2.43 KB)
📄
ARMCallingConv.td
(14.63 KB)
📄
ARMConstantIslandPass.cpp
(90.84 KB)
📄
ARMConstantPoolValue.cpp
(11.53 KB)
📄
ARMConstantPoolValue.h
(10.1 KB)
📄
ARMExpandPseudoInsts.cpp
(115.56 KB)
📄
ARMFastISel.cpp
(106.14 KB)
📄
ARMFeatures.h
(2.48 KB)
📄
ARMFrameLowering.cpp
(102.32 KB)
📄
ARMFrameLowering.h
(4.02 KB)
📄
ARMHazardRecognizer.cpp
(3.41 KB)
📄
ARMHazardRecognizer.h
(1.54 KB)
📄
ARMISelDAGToDAG.cpp
(206.42 KB)
📄
ARMISelLowering.cpp
(728.6 KB)
📄
ARMISelLowering.h
(38.98 KB)
📄
ARMInstrCDE.td
(24.04 KB)
📄
ARMInstrFormats.td
(93.92 KB)
📄
ARMInstrInfo.cpp
(4.2 KB)
📄
ARMInstrInfo.h
(1.49 KB)
📄
ARMInstrInfo.td
(243.51 KB)
📄
ARMInstrMVE.td
(299.67 KB)
📄
ARMInstrNEON.td
(436.25 KB)
📄
ARMInstrThumb.td
(65.92 KB)
📄
ARMInstrThumb2.td
(211.06 KB)
📄
ARMInstrVFP.td
(110.46 KB)
📄
ARMInstructionSelector.cpp
(39.12 KB)
📄
ARMLegalizerInfo.cpp
(18.8 KB)
📄
ARMLegalizerInfo.h
(2.41 KB)
📄
ARMLoadStoreOptimizer.cpp
(94.44 KB)
📄
ARMLowOverheadLoops.cpp
(60.28 KB)
📄
ARMMCInstLower.cpp
(7.2 KB)
📄
ARMMachineFunctionInfo.cpp
(821 B)
📄
ARMMachineFunctionInfo.h
(9.68 KB)
📄
ARMMacroFusion.cpp
(2.36 KB)
📄
ARMMacroFusion.h
(966 B)
📄
ARMOptimizeBarriersPass.cpp
(3.43 KB)
📄
ARMParallelDSP.cpp
(26.82 KB)
📄
ARMPerfectShuffle.h
(382.02 KB)
📄
ARMPredicates.td
(14.16 KB)
📄
ARMRegisterBankInfo.cpp
(18.18 KB)
📄
ARMRegisterBankInfo.h
(1.41 KB)
📄
ARMRegisterBanks.td
(577 B)
📄
ARMRegisterInfo.cpp
(685 B)
📄
ARMRegisterInfo.h
(845 B)
📄
ARMRegisterInfo.td
(24.53 KB)
📄
ARMSchedule.td
(15.13 KB)
📄
ARMScheduleA57.td
(62.61 KB)
📄
ARMScheduleA57WriteRes.td
(11.43 KB)
📄
ARMScheduleA8.td
(49.59 KB)
📄
ARMScheduleA9.td
(130.35 KB)
📄
ARMScheduleM4.td
(4.77 KB)
📄
ARMScheduleR52.td
(44.27 KB)
📄
ARMScheduleSwift.td
(50.53 KB)
📄
ARMScheduleV6.td
(12.34 KB)
📄
ARMSelectionDAGInfo.cpp
(9.21 KB)
📄
ARMSelectionDAGInfo.h
(2.81 KB)
📄
ARMSubtarget.cpp
(16.73 KB)
📄
ARMSubtarget.h
(31.56 KB)
📄
ARMSystemRegister.td
(5.42 KB)
📄
ARMTargetMachine.cpp
(19.74 KB)
📄
ARMTargetMachine.h
(3.48 KB)
📄
ARMTargetObjectFile.cpp
(3.75 KB)
📄
ARMTargetObjectFile.h
(1.67 KB)
📄
ARMTargetTransformInfo.cpp
(63.49 KB)
📄
ARMTargetTransformInfo.h
(10.22 KB)
📁
AsmParser
📁
Disassembler
📁
MCTargetDesc
📄
MLxExpansionPass.cpp
(11.56 KB)
📄
MVEGatherScatterLowering.cpp
(40.3 KB)
📄
MVETailPredication.cpp
(23.2 KB)
📄
MVEVPTBlockPass.cpp
(10.77 KB)
📄
MVEVPTOptimisationsPass.cpp
(16.46 KB)
📁
TargetInfo
📄
Thumb1FrameLowering.cpp
(39.45 KB)
📄
Thumb1FrameLowering.h
(3.48 KB)
📄
Thumb1InstrInfo.cpp
(5.73 KB)
📄
Thumb1InstrInfo.h
(2.38 KB)
📄
Thumb2ITBlockPass.cpp
(9.09 KB)
📄
Thumb2InstrInfo.cpp
(26.43 KB)
📄
Thumb2InstrInfo.h
(3.75 KB)
📄
Thumb2SizeReduction.cpp
(40.25 KB)
📄
ThumbRegisterInfo.cpp
(21.75 KB)
📄
ThumbRegisterInfo.h
(2.44 KB)
📁
Utils
Editing: ARMAsmPrinter.h
//===-- ARMAsmPrinter.h - ARM implementation of AsmPrinter ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_ARM_ARMASMPRINTER_H #define LLVM_LIB_TARGET_ARM_ARMASMPRINTER_H #include "ARMSubtarget.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/Target/TargetMachine.h" namespace llvm { class ARMFunctionInfo; class MCOperand; class MachineConstantPool; class MachineOperand; class MCSymbol; namespace ARM { enum DW_ISA { DW_ISA_ARM_thumb = 1, DW_ISA_ARM_arm = 2 }; } class LLVM_LIBRARY_VISIBILITY ARMAsmPrinter : public AsmPrinter { /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can /// make the right decision when printing asm code for different targets. const ARMSubtarget *Subtarget; /// AFI - Keep a pointer to ARMFunctionInfo for the current /// MachineFunction. ARMFunctionInfo *AFI; /// MCP - Keep a pointer to constantpool entries of the current /// MachineFunction. const MachineConstantPool *MCP; /// InConstantPool - Maintain state when emitting a sequence of constant /// pool entries so we can properly mark them as data regions. bool InConstantPool; /// ThumbIndirectPads - These maintain a per-function list of jump pad /// labels used for ARMv4t thumb code to make register indirect calls. SmallVector<std::pair<unsigned, MCSymbol*>, 4> ThumbIndirectPads; /// OptimizationGoals - Maintain a combined optimization goal for all /// functions in a module: one of Tag_ABI_optimization_goals values, /// -1 if uninitialized, 0 if conflicting goals int OptimizationGoals; /// List of globals that have had their storage promoted to a constant /// pool. This lives between calls to runOnMachineFunction and collects /// data from every MachineFunction. It is used during doFinalization /// when all non-function globals are emitted. SmallPtrSet<const GlobalVariable*,2> PromotedGlobals; /// Set of globals in PromotedGlobals that we've emitted labels for. /// We need to emit labels even for promoted globals so that DWARF /// debug info can link properly. SmallPtrSet<const GlobalVariable*,2> EmittedPromotedGlobalLabels; public: explicit ARMAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer); StringRef getPassName() const override { return "ARM Assembly Printer"; } void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O); void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &O) override; bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) override; bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, const char *ExtraCode, raw_ostream &O) override; void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const override; void emitJumpTableAddrs(const MachineInstr *MI); void emitJumpTableInsts(const MachineInstr *MI); void emitJumpTableTBInst(const MachineInstr *MI, unsigned OffsetWidth); void emitInstruction(const MachineInstr *MI) override; bool runOnMachineFunction(MachineFunction &F) override; void emitConstantPool() override { // we emit constant pools customly! } void emitFunctionBodyEnd() override; void emitFunctionEntryLabel() override; void emitStartOfAsmFile(Module &M) override; void emitEndOfAsmFile(Module &M) override; void emitXXStructor(const DataLayout &DL, const Constant *CV) override; void emitGlobalVariable(const GlobalVariable *GV) override; MCSymbol *GetCPISymbol(unsigned CPID) const override; // lowerOperand - Convert a MachineOperand into the equivalent MCOperand. bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp); //===------------------------------------------------------------------===// // XRay implementation //===------------------------------------------------------------------===// public: // XRay-specific lowering for ARM. void LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI); void LowerPATCHABLE_FUNCTION_EXIT(const MachineInstr &MI); void LowerPATCHABLE_TAIL_CALL(const MachineInstr &MI); private: void EmitSled(const MachineInstr &MI, SledKind Kind); // Helpers for emitStartOfAsmFile() and emitEndOfAsmFile() void emitAttributes(); // Generic helper used to emit e.g. ARMv5 mul pseudos void EmitPatchedInstruction(const MachineInstr *MI, unsigned TargetOpc); void EmitUnwindingInstruction(const MachineInstr *MI); // emitPseudoExpansionLowering - tblgen'erated. bool emitPseudoExpansionLowering(MCStreamer &OutStreamer, const MachineInstr *MI); public: unsigned getISAEncoding() override { // ARM/Darwin adds ISA to the DWARF info for each function. const Triple &TT = TM.getTargetTriple(); if (!TT.isOSBinFormatMachO()) return 0; bool isThumb = TT.isThumb() || TT.getSubArch() == Triple::ARMSubArch_v7m || TT.getSubArch() == Triple::ARMSubArch_v6m; return isThumb ? ARM::DW_ISA_ARM_thumb : ARM::DW_ISA_ARM_arm; } private: MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol); MCSymbol *GetARMJTIPICJumpTableLabel(unsigned uid) const; MCSymbol *GetARMGVSymbol(const GlobalValue *GV, unsigned char TargetFlags); public: /// EmitMachineConstantPoolValue - Print a machine constantpool value to /// the .s file. void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override; }; } // end namespace llvm #endif
Upload File
Create Folder