#include "InstrEmitter.h"
#include "SDNodeDbgValue.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/PseudoProbe.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
usingnamespacellvm;
#define DEBUG_TYPE …
const unsigned MinRCSize = …;
unsigned InstrEmitter::CountResults(SDNode *Node) { … }
static unsigned countOperands(SDNode *Node, unsigned NumExpUses,
unsigned &NumImpUses) { … }
void InstrEmitter::EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
Register SrcReg, VRBaseMapType &VRBaseMap) { … }
void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
MachineInstrBuilder &MIB,
const MCInstrDesc &II,
bool IsClone, bool IsCloned,
VRBaseMapType &VRBaseMap) { … }
Register InstrEmitter::getVR(SDValue Op, VRBaseMapType &VRBaseMap) { … }
static bool isConvergenceCtrlMachineOp(SDValue Op) { … }
void
InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
SDValue Op,
unsigned IIOpNum,
const MCInstrDesc *II,
VRBaseMapType &VRBaseMap,
bool IsDebug, bool IsClone, bool IsCloned) { … }
void InstrEmitter::AddOperand(MachineInstrBuilder &MIB, SDValue Op,
unsigned IIOpNum, const MCInstrDesc *II,
VRBaseMapType &VRBaseMap, bool IsDebug,
bool IsClone, bool IsCloned) { … }
Register InstrEmitter::ConstrainForSubReg(Register VReg, unsigned SubIdx,
MVT VT, bool isDivergent, const DebugLoc &DL) { … }
void InstrEmitter::EmitSubregNode(SDNode *Node, VRBaseMapType &VRBaseMap,
bool IsClone, bool IsCloned) { … }
void
InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
VRBaseMapType &VRBaseMap) { … }
void InstrEmitter::EmitRegSequence(SDNode *Node, VRBaseMapType &VRBaseMap,
bool IsClone, bool IsCloned) { … }
MachineInstr *
InstrEmitter::EmitDbgValue(SDDbgValue *SD,
VRBaseMapType &VRBaseMap) { … }
MachineOperand GetMOForConstDbgOp(const SDDbgOperand &Op) { … }
void InstrEmitter::AddDbgValueLocationOps(
MachineInstrBuilder &MIB, const MCInstrDesc &DbgValDesc,
ArrayRef<SDDbgOperand> LocationOps,
VRBaseMapType &VRBaseMap) { … }
MachineInstr *
InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
VRBaseMapType &VRBaseMap) { … }
MachineInstr *InstrEmitter::EmitDbgNoLocation(SDDbgValue *SD) { … }
MachineInstr *
InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
VRBaseMapType &VRBaseMap) { … }
MachineInstr *
InstrEmitter::EmitDbgValueFromSingleOp(SDDbgValue *SD,
VRBaseMapType &VRBaseMap) { … }
MachineInstr *
InstrEmitter::EmitDbgLabel(SDDbgLabel *SD) { … }
void InstrEmitter::
EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
VRBaseMapType &VRBaseMap) { … }
void InstrEmitter::
EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
VRBaseMapType &VRBaseMap) { … }
InstrEmitter::InstrEmitter(const TargetMachine &TM, MachineBasicBlock *mbb,
MachineBasicBlock::iterator insertpos)
: … { … }