003 File Manager
Current Path:
/usr/src/contrib/llvm-project/llvm/lib/Target/RISCV
usr
/
src
/
contrib
/
llvm-project
/
llvm
/
lib
/
Target
/
RISCV
/
📁
..
📁
AsmParser
📁
Disassembler
📁
MCTargetDesc
📄
RISCV.h
(1.82 KB)
📄
RISCV.td
(10.89 KB)
📄
RISCVAsmPrinter.cpp
(6.86 KB)
📄
RISCVCallLowering.cpp
(1.48 KB)
📄
RISCVCallLowering.h
(1.37 KB)
📄
RISCVCallingConv.td
(2.27 KB)
📄
RISCVExpandAtomicPseudoInsts.cpp
(21.27 KB)
📄
RISCVExpandPseudoInsts.cpp
(6.94 KB)
📄
RISCVFrameLowering.cpp
(28.44 KB)
📄
RISCVFrameLowering.h
(3.1 KB)
📄
RISCVISelDAGToDAG.cpp
(22.01 KB)
📄
RISCVISelDAGToDAG.h
(2.21 KB)
📄
RISCVISelLowering.cpp
(114.94 KB)
📄
RISCVISelLowering.h
(10.3 KB)
📄
RISCVInstrFormats.td
(10.36 KB)
📄
RISCVInstrFormatsC.td
(4.98 KB)
📄
RISCVInstrFormatsV.td
(7.57 KB)
📄
RISCVInstrInfo.cpp
(26.69 KB)
📄
RISCVInstrInfo.h
(5.88 KB)
📄
RISCVInstrInfo.td
(45.57 KB)
📄
RISCVInstrInfoA.td
(17.37 KB)
📄
RISCVInstrInfoB.td
(47.16 KB)
📄
RISCVInstrInfoC.td
(33.8 KB)
📄
RISCVInstrInfoD.td
(15.36 KB)
📄
RISCVInstrInfoF.td
(17.58 KB)
📄
RISCVInstrInfoM.td
(4.17 KB)
📄
RISCVInstrInfoV.td
(36.31 KB)
📄
RISCVInstructionSelector.cpp
(3.18 KB)
📄
RISCVLegalizerInfo.cpp
(870 B)
📄
RISCVLegalizerInfo.h
(1000 B)
📄
RISCVMCInstLower.cpp
(4.3 KB)
📄
RISCVMachineFunctionInfo.h
(2.43 KB)
📄
RISCVMergeBaseOffset.cpp
(11.06 KB)
📄
RISCVRegisterBankInfo.cpp
(1.04 KB)
📄
RISCVRegisterBankInfo.h
(1.22 KB)
📄
RISCVRegisterBanks.td
(537 B)
📄
RISCVRegisterInfo.cpp
(7.31 KB)
📄
RISCVRegisterInfo.h
(2.11 KB)
📄
RISCVRegisterInfo.td
(12.85 KB)
📄
RISCVSchedRocket32.td
(8.04 KB)
📄
RISCVSchedRocket64.td
(8.24 KB)
📄
RISCVSchedule.td
(7.34 KB)
📄
RISCVSubtarget.cpp
(2.63 KB)
📄
RISCVSubtarget.h
(5.37 KB)
📄
RISCVSystemOperands.td
(11.83 KB)
📄
RISCVTargetMachine.cpp
(6.17 KB)
📄
RISCVTargetMachine.h
(1.81 KB)
📄
RISCVTargetObjectFile.cpp
(4.13 KB)
📄
RISCVTargetObjectFile.h
(1.66 KB)
📄
RISCVTargetTransformInfo.cpp
(3.06 KB)
📄
RISCVTargetTransformInfo.h
(2.02 KB)
📁
TargetInfo
📁
Utils
Editing: RISCVInstrInfo.h
//===-- RISCVInstrInfo.h - RISCV Instruction Information --------*- 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 // //===----------------------------------------------------------------------===// // // This file contains the RISCV implementation of the TargetInstrInfo class. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H #define LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H #include "RISCVRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" #define GET_INSTRINFO_HEADER #include "RISCVGenInstrInfo.inc" namespace llvm { class RISCVSubtarget; class RISCVInstrInfo : public RISCVGenInstrInfo { public: explicit RISCVInstrInfo(RISCVSubtarget &STI); unsigned isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override; unsigned isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override; void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, MCRegister DstReg, MCRegister SrcReg, bool KillSrc) const override; void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool IsKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override; void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DstReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override; // Materializes the given integer Val into DstReg. void movImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register DstReg, uint64_t Val, MachineInstr::MIFlag Flag = MachineInstr::NoFlags) const; unsigned getInstSizeInBytes(const MachineInstr &MI) const override; bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl<MachineOperand> &Cond, bool AllowModify) const override; unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, const DebugLoc &dl, int *BytesAdded = nullptr) const override; unsigned insertIndirectBranch(MachineBasicBlock &MBB, MachineBasicBlock &NewDestBB, const DebugLoc &DL, int64_t BrOffset, RegScavenger *RS = nullptr) const override; unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved = nullptr) const override; bool reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override; MachineBasicBlock *getBranchDestBlock(const MachineInstr &MI) const override; bool isBranchOffsetInRange(unsigned BranchOpc, int64_t BrOffset) const override; bool isAsCheapAsAMove(const MachineInstr &MI) const override; bool verifyInstruction(const MachineInstr &MI, StringRef &ErrInfo) const override; bool getMemOperandWithOffsetWidth(const MachineInstr &LdSt, const MachineOperand *&BaseOp, int64_t &Offset, unsigned &Width, const TargetRegisterInfo *TRI) const; bool areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const override; std::pair<unsigned, unsigned> decomposeMachineOperandsTargetFlags(unsigned TF) const override; ArrayRef<std::pair<unsigned, const char *>> getSerializableDirectMachineOperandTargetFlags() const override; // Return true if the function can safely be outlined from. virtual bool isFunctionSafeToOutlineFrom(MachineFunction &MF, bool OutlineFromLinkOnceODRs) const override; // Return true if MBB is safe to outline from, and return any target-specific // information in Flags. virtual bool isMBBSafeToOutlineFrom(MachineBasicBlock &MBB, unsigned &Flags) const override; // Calculate target-specific information for a set of outlining candidates. outliner::OutlinedFunction getOutliningCandidateInfo( std::vector<outliner::Candidate> &RepeatedSequenceLocs) const override; // Return if/how a given MachineInstr should be outlined. virtual outliner::InstrType getOutliningType(MachineBasicBlock::iterator &MBBI, unsigned Flags) const override; // Insert a custom frame for outlined functions. virtual void buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF, const outliner::OutlinedFunction &OF) const override; // Insert a call to an outlined function into a given basic block. virtual MachineBasicBlock::iterator insertOutlinedCall(Module &M, MachineBasicBlock &MBB, MachineBasicBlock::iterator &It, MachineFunction &MF, const outliner::Candidate &C) const override; protected: const RISCVSubtarget &STI; }; namespace RISCV { // Match with the definitions in RISCVInstrFormatsV.td enum RVVConstraintType { NoConstraint = 0, WidenV = 1, WidenW = 2, WidenCvt = 3, Narrow = 4, Iota = 5, SlideUp = 6, Vrgather = 7, Vcompress = 8, ConstraintOffset = 5, ConstraintMask = 0b1111 }; } // end namespace RISCV } // end namespace llvm #endif
Upload File
Create Folder