mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
DebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs
Frame index handling is now target-agnostic, so delete the target hooks for creation & asm printing of target-specific addressing in DBG_VALUEs and any related functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d9dbd5526
commit
0187e7a9ba
@ -402,10 +402,6 @@ namespace llvm {
|
|||||||
void EmitSectionOffset(const MCSymbol *Label,
|
void EmitSectionOffset(const MCSymbol *Label,
|
||||||
const MCSymbol *SectionLabel) const;
|
const MCSymbol *SectionLabel) const;
|
||||||
|
|
||||||
/// getDebugValueLocation - Get location information encoded by DBG_VALUE
|
|
||||||
/// operands.
|
|
||||||
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
|
||||||
|
|
||||||
/// getISAEncoding - Get the value for DW_AT_APPLE_isa. Zero if no isa
|
/// getISAEncoding - Get the value for DW_AT_APPLE_isa. Zero if no isa
|
||||||
/// encoding specified.
|
/// encoding specified.
|
||||||
virtual unsigned getISAEncoding() { return 0; }
|
virtual unsigned getISAEncoding() { return 0; }
|
||||||
|
@ -505,22 +505,6 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// emitFrameIndexDebugValue - Emit a target-dependent form of
|
|
||||||
/// DBG_VALUE encoding the address of a frame index. Addresses would
|
|
||||||
/// normally be lowered the same way as other addresses on the target,
|
|
||||||
/// e.g. in load instructions. For targets that do not support this
|
|
||||||
/// the debug info is simply lost.
|
|
||||||
/// If you add this for a target you should handle this DBG_VALUE in the
|
|
||||||
/// target-specific AsmPrinter code as well; you will probably get invalid
|
|
||||||
/// assembly output if you don't.
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc dl) const {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// foldMemoryOperand - Attempt to fold a load or store of the specified stack
|
/// foldMemoryOperand - Attempt to fold a load or store of the specified stack
|
||||||
/// slot into the specified machine instruction for the specified operand(s).
|
/// slot into the specified machine instruction for the specified operand(s).
|
||||||
/// If this is possible, a new instruction is returned with the specified
|
/// If this is possible, a new instruction is returned with the specified
|
||||||
|
@ -811,14 +811,6 @@ void AsmPrinter::EmitFunctionBody() {
|
|||||||
OutStreamer.AddBlankLine();
|
OutStreamer.AddBlankLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getDebugValueLocation - Get location information encoded by DBG_VALUE
|
|
||||||
/// operands.
|
|
||||||
MachineLocation AsmPrinter::
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
// Target specific DBG_VALUE instructions are handled by each target.
|
|
||||||
return MachineLocation();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// EmitDwarfRegOp - Emit dwarf register operation.
|
/// EmitDwarfRegOp - Emit dwarf register operation.
|
||||||
void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
||||||
const TargetRegisterInfo *TRI = TM.getRegisterInfo();
|
const TargetRegisterInfo *TRI = TM.getRegisterInfo();
|
||||||
|
@ -27,16 +27,6 @@
|
|||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
MachineLocation
|
|
||||||
AArch64AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
// See emitFrameIndexDebugValue in InstrInfo for where this instruction is
|
|
||||||
// expected to be created.
|
|
||||||
assert(MI->getNumOperands() == 4 && MI->getOperand(0).isReg()
|
|
||||||
&& MI->getOperand(1).isImm() && "unexpected custom DBG_VALUE");
|
|
||||||
return MachineLocation(MI->getOperand(0).getReg(),
|
|
||||||
MI->getOperand(1).getImm());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Try to print a floating-point register as if it belonged to a specified
|
/// Try to print a floating-point register as if it belonged to a specified
|
||||||
/// register-class. For example the inline asm operand modifier "b" requires its
|
/// register-class. For example the inline asm operand modifier "b" requires its
|
||||||
/// argument to be printed as "bN".
|
/// argument to be printed as "bN".
|
||||||
@ -271,24 +261,6 @@ bool AArch64AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AArch64AsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|
||||||
raw_ostream &OS) {
|
|
||||||
unsigned NOps = MI->getNumOperands();
|
|
||||||
assert(NOps==4);
|
|
||||||
OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
|
||||||
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
|
|
||||||
OS << V.getName();
|
|
||||||
OS << " <- ";
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm());
|
|
||||||
OS << '[' << AArch64InstPrinter::getRegisterName(MI->getOperand(0).getReg());
|
|
||||||
OS << '+' << MI->getOperand(1).getImm();
|
|
||||||
OS << ']';
|
|
||||||
OS << "+" << MI->getOperand(NOps - 2).getImm();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "AArch64GenMCPseudoLowering.inc"
|
#include "AArch64GenMCPseudoLowering.inc"
|
||||||
|
|
||||||
void AArch64AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
void AArch64AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||||
@ -296,18 +268,6 @@ void AArch64AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
if (emitPseudoExpansionLowering(OutStreamer, MI))
|
if (emitPseudoExpansionLowering(OutStreamer, MI))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (MI->getOpcode()) {
|
|
||||||
case AArch64::DBG_VALUE: {
|
|
||||||
if (isVerbose() && OutStreamer.hasRawTextSupport()) {
|
|
||||||
SmallString<128> TmpStr;
|
|
||||||
raw_svector_ostream OS(TmpStr);
|
|
||||||
PrintDebugValueComment(MI, OS);
|
|
||||||
OutStreamer.EmitRawText(StringRef(OS.str()));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MCInst TmpInst;
|
MCInst TmpInst;
|
||||||
LowerAArch64MachineInstrToMCInst(MI, TmpInst, *this);
|
LowerAArch64MachineInstrToMCInst(MI, TmpInst, *this);
|
||||||
OutStreamer.EmitInstruction(TmpInst);
|
OutStreamer.EmitInstruction(TmpInst);
|
||||||
|
@ -55,8 +55,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64AsmPrinter : public AsmPrinter {
|
|||||||
unsigned AsmVariant, const char *ExtraCode,
|
unsigned AsmVariant, const char *ExtraCode,
|
||||||
raw_ostream &O);
|
raw_ostream &O);
|
||||||
|
|
||||||
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
|
||||||
|
|
||||||
/// printSymbolicAddress - Given some kind of reasonably bare symbolic
|
/// printSymbolicAddress - Given some kind of reasonably bare symbolic
|
||||||
/// reference, print out the appropriate asm string to represent it. If
|
/// reference, print out the appropriate asm string to represent it. If
|
||||||
/// appropriate, a relocation-specifier will be produced, composed of a
|
/// appropriate, a relocation-specifier will be produced, composed of a
|
||||||
@ -67,8 +65,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64AsmPrinter : public AsmPrinter {
|
|||||||
bool PrintImmediatePrefix,
|
bool PrintImmediatePrefix,
|
||||||
StringRef Suffix, raw_ostream &O);
|
StringRef Suffix, raw_ostream &O);
|
||||||
|
|
||||||
MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
virtual const char *getPassName() const {
|
||||||
return "AArch64 Assembly Printer";
|
return "AArch64 Assembly Printer";
|
||||||
}
|
}
|
||||||
|
@ -116,17 +116,6 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
|||||||
.addImm(0);
|
.addImm(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr *
|
|
||||||
AArch64InstrInfo::emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx,
|
|
||||||
uint64_t Offset, const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(AArch64::DBG_VALUE))
|
|
||||||
.addFrameIndex(FrameIx).addImm(0)
|
|
||||||
.addImm(Offset)
|
|
||||||
.addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Does the Opcode represent a conditional branch that we can remove and re-add
|
/// Does the Opcode represent a conditional branch that we can remove and re-add
|
||||||
/// at the end of a basic block?
|
/// at the end of a basic block?
|
||||||
static bool isCondBranch(unsigned Opc) {
|
static bool isCondBranch(unsigned Opc) {
|
||||||
|
@ -43,10 +43,6 @@ public:
|
|||||||
unsigned DestReg, unsigned SrcReg,
|
unsigned DestReg, unsigned SrcReg,
|
||||||
bool KillSrc) const;
|
bool KillSrc) const;
|
||||||
|
|
||||||
MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx,
|
|
||||||
uint64_t Offset, const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator MI,
|
MachineBasicBlock::iterator MI,
|
||||||
unsigned SrcReg, bool isKill, int FrameIndex,
|
unsigned SrcReg, bool isKill, int FrameIndex,
|
||||||
|
@ -213,19 +213,6 @@ namespace {
|
|||||||
|
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
|
||||||
MachineLocation ARMAsmPrinter::
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
MachineLocation Location;
|
|
||||||
assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
if (MI->getOperand(0).isReg() && MI->getOperand(1).isImm())
|
|
||||||
Location.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());
|
|
||||||
else {
|
|
||||||
DEBUG(dbgs() << "DBG_VALUE instruction ignored! " << *MI << "\n");
|
|
||||||
}
|
|
||||||
return Location;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// EmitDwarfRegOp - Emit dwarf register operation.
|
/// EmitDwarfRegOp - Emit dwarf register operation.
|
||||||
void ARMAsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
void ARMAsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
|
||||||
const TargetRegisterInfo *RI = TM.getRegisterInfo();
|
const TargetRegisterInfo *RI = TM.getRegisterInfo();
|
||||||
@ -1092,23 +1079,6 @@ void ARMAsmPrinter::EmitJump2Table(const MachineInstr *MI) {
|
|||||||
OutStreamer.EmitDataRegion(MCDR_DataRegionEnd);
|
OutStreamer.EmitDataRegion(MCDR_DataRegionEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|
||||||
raw_ostream &OS) {
|
|
||||||
unsigned NOps = MI->getNumOperands();
|
|
||||||
assert(NOps==4);
|
|
||||||
OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
|
||||||
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
|
|
||||||
OS << V.getName();
|
|
||||||
OS << " <- ";
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm());
|
|
||||||
OS << '['; printOperand(MI, 0, OS); OS << '+'; printOperand(MI, 1, OS);
|
|
||||||
OS << ']';
|
|
||||||
OS << "+";
|
|
||||||
printOperand(MI, NOps-2, OS);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
|
void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
|
||||||
assert(MI->getFlag(MachineInstr::FrameSetup) &&
|
assert(MI->getFlag(MachineInstr::FrameSetup) &&
|
||||||
"Only instruction which are involved into frame setup code are allowed");
|
"Only instruction which are involved into frame setup code are allowed");
|
||||||
@ -1272,15 +1242,7 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
unsigned Opc = MI->getOpcode();
|
unsigned Opc = MI->getOpcode();
|
||||||
switch (Opc) {
|
switch (Opc) {
|
||||||
case ARM::t2MOVi32imm: llvm_unreachable("Should be lowered by thumb2it pass");
|
case ARM::t2MOVi32imm: llvm_unreachable("Should be lowered by thumb2it pass");
|
||||||
case ARM::DBG_VALUE: {
|
case ARM::DBG_VALUE: llvm_unreachable("Should be handled by generic printing");
|
||||||
if (isVerbose() && OutStreamer.hasRawTextSupport()) {
|
|
||||||
SmallString<128> TmpStr;
|
|
||||||
raw_svector_ostream OS(TmpStr);
|
|
||||||
PrintDebugValueComment(MI, OS);
|
|
||||||
OutStreamer.EmitRawText(StringRef(OS.str()));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case ARM::LEApcrel:
|
case ARM::LEApcrel:
|
||||||
case ARM::tLEApcrel:
|
case ARM::tLEApcrel:
|
||||||
case ARM::t2LEApcrel: {
|
case ARM::t2LEApcrel: {
|
||||||
|
@ -97,11 +97,6 @@ private:
|
|||||||
const MachineInstr *MI);
|
const MachineInstr *MI);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
|
||||||
|
|
||||||
virtual MachineLocation
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const LLVM_OVERRIDE;
|
|
||||||
|
|
||||||
/// EmitDwarfRegOp - Emit dwarf register operation.
|
/// EmitDwarfRegOp - Emit dwarf register operation.
|
||||||
virtual void EmitDwarfRegOp(const MachineLocation &MLoc) const LLVM_OVERRIDE;
|
virtual void EmitDwarfRegOp(const MachineLocation &MLoc) const LLVM_OVERRIDE;
|
||||||
|
|
||||||
|
@ -1213,16 +1213,6 @@ bool ARMBaseInstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
ARMBaseInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(ARM::DBG_VALUE))
|
|
||||||
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Create a copy of a const pool value. Update CPI to the new index and return
|
/// Create a copy of a const pool value. Update CPI to the new index and return
|
||||||
/// the label UID.
|
/// the label UID.
|
||||||
static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) {
|
static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) {
|
||||||
|
@ -125,12 +125,6 @@ public:
|
|||||||
|
|
||||||
virtual bool expandPostRAPseudo(MachineBasicBlock::iterator MI) const;
|
virtual bool expandPostRAPseudo(MachineBasicBlock::iterator MI) const;
|
||||||
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
virtual void reMaterialize(MachineBasicBlock &MBB,
|
virtual void reMaterialize(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator MI,
|
MachineBasicBlock::iterator MI,
|
||||||
unsigned DestReg, unsigned SubIdx,
|
unsigned DestReg, unsigned SubIdx,
|
||||||
|
@ -558,16 +558,6 @@ MachineInstr *HexagonInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
HexagonInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(Hexagon::DBG_VALUE))
|
|
||||||
.addImm(0).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned HexagonInstrInfo::createVR(MachineFunction* MF, MVT VT) const {
|
unsigned HexagonInstrInfo::createVR(MachineFunction* MF, MVT VT) const {
|
||||||
|
|
||||||
MachineRegisterInfo &RegInfo = MF->getRegInfo();
|
MachineRegisterInfo &RegInfo = MF->getRegInfo();
|
||||||
|
@ -148,11 +148,6 @@ public:
|
|||||||
isProfitableToDupForIfCvt(MachineBasicBlock &MBB,unsigned NumCycles,
|
isProfitableToDupForIfCvt(MachineBasicBlock &MBB,unsigned NumCycles,
|
||||||
const BranchProbability &Probability) const;
|
const BranchProbability &Probability) const;
|
||||||
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
virtual DFAPacketizer*
|
virtual DFAPacketizer*
|
||||||
CreateTargetScheduleState(const TargetMachine *TM,
|
CreateTargetScheduleState(const TargetMachine *TM,
|
||||||
const ScheduleDAG *DAG) const;
|
const ScheduleDAG *DAG) const;
|
||||||
|
@ -589,16 +589,6 @@ void MipsAsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
MES->emitELFHeaderFlagsCG(*Subtarget);
|
MES->emitELFHeaderFlagsCG(*Subtarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineLocation
|
|
||||||
MipsAsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
// Handles frame addresses emitted in MipsInstrInfo::emitFrameIndexDebugValue.
|
|
||||||
assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm() &&
|
|
||||||
"Unexpected MachineOperand types");
|
|
||||||
return MachineLocation(MI->getOperand(0).getReg(),
|
|
||||||
MI->getOperand(1).getImm());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
||||||
raw_ostream &OS) {
|
raw_ostream &OS) {
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
|
@ -81,7 +81,6 @@ public:
|
|||||||
const char *Modifier = 0);
|
const char *Modifier = 0);
|
||||||
void EmitStartOfAsmFile(Module &M);
|
void EmitStartOfAsmFile(Module &M);
|
||||||
void EmitEndOfAsmFile(Module &M);
|
void EmitEndOfAsmFile(Module &M);
|
||||||
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
|
||||||
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -61,15 +61,6 @@ MachineMemOperand *MipsInstrInfo::GetMemOperand(MachineBasicBlock &MBB, int FI,
|
|||||||
MFI.getObjectSize(FI), Align);
|
MFI.getObjectSize(FI), Align);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
MipsInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx,
|
|
||||||
uint64_t Offset, const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(Mips::DBG_VALUE))
|
|
||||||
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Branch Analysis
|
// Branch Analysis
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -67,11 +67,6 @@ public:
|
|||||||
bool AllowModify,
|
bool AllowModify,
|
||||||
SmallVectorImpl<MachineInstr*> &BranchInstrs) const;
|
SmallVectorImpl<MachineInstr*> &BranchInstrs) const;
|
||||||
|
|
||||||
virtual MachineInstr* emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
/// Insert nop instruction when hazard condition is found
|
/// Insert nop instruction when hazard condition is found
|
||||||
virtual void insertNoop(MachineBasicBlock &MBB,
|
virtual void insertNoop(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator MI) const;
|
MachineBasicBlock::iterator MI) const;
|
||||||
|
@ -86,18 +86,6 @@ namespace {
|
|||||||
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
unsigned AsmVariant, const char *ExtraCode,
|
unsigned AsmVariant, const char *ExtraCode,
|
||||||
raw_ostream &O);
|
raw_ostream &O);
|
||||||
|
|
||||||
MachineLocation getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
MachineLocation Location;
|
|
||||||
assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
if (MI->getOperand(0).isReg() && MI->getOperand(2).isImm())
|
|
||||||
Location.set(MI->getOperand(0).getReg(), MI->getOperand(2).getImm());
|
|
||||||
else {
|
|
||||||
DEBUG(dbgs() << "DBG_VALUE instruction ignored! " << *MI << "\n");
|
|
||||||
}
|
|
||||||
return Location;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// PPCLinuxAsmPrinter - PowerPC assembly printer, customized for Linux
|
/// PPCLinuxAsmPrinter - PowerPC assembly printer, customized for Linux
|
||||||
@ -340,28 +328,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
// Lower multi-instruction pseudo operations.
|
// Lower multi-instruction pseudo operations.
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
default: break;
|
default: break;
|
||||||
case TargetOpcode::DBG_VALUE: {
|
case TargetOpcode::DBG_VALUE:
|
||||||
if (!isVerbose() || !OutStreamer.hasRawTextSupport()) return;
|
llvm_unreachable("Should be handled target independently");
|
||||||
|
|
||||||
SmallString<32> Str;
|
|
||||||
raw_svector_ostream O(Str);
|
|
||||||
unsigned NOps = MI->getNumOperands();
|
|
||||||
assert(NOps==4);
|
|
||||||
O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
|
||||||
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
|
|
||||||
O << V.getName();
|
|
||||||
O << " <- ";
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm());
|
|
||||||
O << '['; printOperand(MI, 0, O); O << '+'; printOperand(MI, 1, O);
|
|
||||||
O << ']';
|
|
||||||
O << "+";
|
|
||||||
printOperand(MI, NOps-2, O);
|
|
||||||
OutStreamer.EmitRawText(O.str());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
case PPC::MovePCtoLR:
|
case PPC::MovePCtoLR:
|
||||||
case PPC::MovePCtoLR8: {
|
case PPC::MovePCtoLR8: {
|
||||||
// Transform %LR = MovePCtoLR
|
// Transform %LR = MovePCtoLR
|
||||||
|
@ -791,16 +791,6 @@ PPCInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|||||||
NewMIs.back()->addMemOperand(MF, MMO);
|
NewMIs.back()->addMemOperand(MF, MMO);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
PPCInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(PPC::DBG_VALUE));
|
|
||||||
addFrameReference(MIB, FrameIx, 0, false).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PPCInstrInfo::
|
bool PPCInstrInfo::
|
||||||
ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const {
|
ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const {
|
||||||
assert(Cond.size() == 2 && "Invalid PPC branch opcode!");
|
assert(Cond.size() == 2 && "Invalid PPC branch opcode!");
|
||||||
|
@ -148,12 +148,6 @@ public:
|
|||||||
const TargetRegisterClass *RC,
|
const TargetRegisterClass *RC,
|
||||||
const TargetRegisterInfo *TRI) const;
|
const TargetRegisterInfo *TRI) const;
|
||||||
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const;
|
bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const;
|
||||||
|
|
||||||
|
@ -577,9 +577,9 @@ PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|||||||
// clear can be encoded. This is extremely uncommon, because normally you
|
// clear can be encoded. This is extremely uncommon, because normally you
|
||||||
// only "std" to a stack slot that is at least 4-byte aligned, but it can
|
// only "std" to a stack slot that is at least 4-byte aligned, but it can
|
||||||
// happen in invalid code.
|
// happen in invalid code.
|
||||||
if (OpC == PPC::DBG_VALUE || // DBG_VALUE is always Reg+Imm
|
assert(OpC != PPC::DBG_VALUE &&
|
||||||
(!noImmForm &&
|
"This should be handle in a target independent way");
|
||||||
isInt<16>(Offset) && (!isIXAddr || (Offset & 3) == 0))) {
|
if (!noImmForm && isInt<16>(Offset) && (!isIXAddr || (Offset & 3) == 0)) {
|
||||||
MI.getOperand(OffsetOperandNo).ChangeToImmediate(Offset);
|
MI.getOperand(OffsetOperandNo).ChangeToImmediate(Offset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,6 @@ namespace {
|
|||||||
|
|
||||||
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB)
|
virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB)
|
||||||
const;
|
const;
|
||||||
|
|
||||||
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
|
||||||
};
|
};
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
|
||||||
@ -266,15 +264,6 @@ isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
|
|||||||
return I == Pred->end() || !I->isBarrier();
|
return I == Pred->end() || !I->isBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineLocation SparcAsmPrinter::
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
assert(MI->getNumOperands() == 4 && "Invalid number of operands!");
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm() &&
|
|
||||||
"Unexpected MachineOperand types");
|
|
||||||
return MachineLocation(MI->getOperand(0).getReg(),
|
|
||||||
MI->getOperand(1).getImm());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Force static initialization.
|
// Force static initialization.
|
||||||
extern "C" void LLVMInitializeSparcAsmPrinter() {
|
extern "C" void LLVMInitializeSparcAsmPrinter() {
|
||||||
RegisterAsmPrinter<SparcAsmPrinter> X(TheSparcTarget);
|
RegisterAsmPrinter<SparcAsmPrinter> X(TheSparcTarget);
|
||||||
|
@ -114,18 +114,6 @@ static SPCC::CondCodes GetOppositeBranchCondition(SPCC::CondCodes CC)
|
|||||||
llvm_unreachable("Invalid cond code");
|
llvm_unreachable("Invalid cond code");
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr *
|
|
||||||
SparcInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc dl) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, dl, get(SP::DBG_VALUE))
|
|
||||||
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
|
bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock *&TBB,
|
MachineBasicBlock *&TBB,
|
||||||
MachineBasicBlock *&FBB,
|
MachineBasicBlock *&FBB,
|
||||||
|
@ -62,14 +62,6 @@ public:
|
|||||||
virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
|
virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
|
||||||
int &FrameIndex) const;
|
int &FrameIndex) const;
|
||||||
|
|
||||||
/// emitFrameIndexDebugValue - Emit a target-dependent form of
|
|
||||||
/// DBG_VALUE encoding the address of a frame index.
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc dl) const;
|
|
||||||
|
|
||||||
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
||||||
MachineBasicBlock *&FBB,
|
MachineBasicBlock *&FBB,
|
||||||
SmallVectorImpl<MachineOperand> &Cond,
|
SmallVectorImpl<MachineOperand> &Cond,
|
||||||
|
@ -702,48 +702,6 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineLocation
|
|
||||||
X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
MachineLocation Location;
|
|
||||||
assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!");
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
|
|
||||||
if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm())
|
|
||||||
Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm());
|
|
||||||
else {
|
|
||||||
DEBUG(dbgs() << "DBG_VALUE instruction ignored! " << *MI << "\n");
|
|
||||||
}
|
|
||||||
return Location;
|
|
||||||
}
|
|
||||||
|
|
||||||
void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|
||||||
raw_ostream &O) {
|
|
||||||
// Only the target-dependent form of DBG_VALUE should get here.
|
|
||||||
// Referencing the offset and metadata as NOps-2 and NOps-1 is
|
|
||||||
// probably portable to other targets; frame pointer location is not.
|
|
||||||
unsigned NOps = MI->getNumOperands();
|
|
||||||
assert(NOps==7);
|
|
||||||
O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
|
||||||
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
|
|
||||||
if (V.getContext().isSubprogram())
|
|
||||||
O << DISubprogram(V.getContext()).getDisplayName() << ":";
|
|
||||||
O << V.getName();
|
|
||||||
O << " <- ";
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
O << '[';
|
|
||||||
if (MI->getOperand(0).isReg() && MI->getOperand(0).getReg())
|
|
||||||
printOperand(MI, 0, O);
|
|
||||||
else
|
|
||||||
O << "undef";
|
|
||||||
O << '+'; printOperand(MI, 3, O);
|
|
||||||
O << ']';
|
|
||||||
O << "+";
|
|
||||||
printOperand(MI, NOps-2, O);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Target Registry Stuff
|
// Target Registry Stuff
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -67,11 +67,6 @@ class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
|
|||||||
unsigned AsmVariant = 1);
|
unsigned AsmVariant = 1);
|
||||||
|
|
||||||
virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE;
|
virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE;
|
||||||
|
|
||||||
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
|
||||||
|
|
||||||
virtual MachineLocation
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const LLVM_OVERRIDE;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
@ -3733,19 +3733,6 @@ bool X86InstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
X86InstrInfo::emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
X86AddressMode AM;
|
|
||||||
AM.BaseType = X86AddressMode::FrameIndexBase;
|
|
||||||
AM.Base.FrameIndex = FrameIx;
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(X86::DBG_VALUE));
|
|
||||||
addFullAddress(MIB, AM).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
static MachineInstr *FuseTwoAddrInst(MachineFunction &MF, unsigned Opcode,
|
static MachineInstr *FuseTwoAddrInst(MachineFunction &MF, unsigned Opcode,
|
||||||
const SmallVectorImpl<MachineOperand> &MOs,
|
const SmallVectorImpl<MachineOperand> &MOs,
|
||||||
MachineInstr *MI,
|
MachineInstr *MI,
|
||||||
|
@ -275,12 +275,6 @@ public:
|
|||||||
|
|
||||||
virtual bool expandPostRAPseudo(MachineBasicBlock::iterator MI) const;
|
virtual bool expandPostRAPseudo(MachineBasicBlock::iterator MI) const;
|
||||||
|
|
||||||
virtual
|
|
||||||
MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx, uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
/// foldMemoryOperand - If this target supports it, fold a load or store of
|
/// foldMemoryOperand - If this target supports it, fold a load or store of
|
||||||
/// the specified stack slot into the specified machine instruction for the
|
/// the specified stack slot into the specified machine instruction for the
|
||||||
/// specified operand(s). If this is possible, the target should perform the
|
/// specified operand(s). If this is possible, the target should perform the
|
||||||
|
@ -654,13 +654,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||||||
X86MCInstLower MCInstLowering(Mang, *MF, *this);
|
X86MCInstLower MCInstLowering(Mang, *MF, *this);
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
case TargetOpcode::DBG_VALUE:
|
case TargetOpcode::DBG_VALUE:
|
||||||
if (isVerbose() && OutStreamer.hasRawTextSupport()) {
|
llvm_unreachable("Should be handled target independently");
|
||||||
std::string TmpStr;
|
|
||||||
raw_string_ostream OS(TmpStr);
|
|
||||||
PrintDebugValueComment(MI, OS);
|
|
||||||
OutStreamer.EmitRawText(StringRef(OS.str()));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Emit nothing here but a comment if we can.
|
// Emit nothing here but a comment if we can.
|
||||||
case X86::Int_MemBarrier:
|
case X86::Int_MemBarrier:
|
||||||
|
@ -49,7 +49,6 @@ namespace {
|
|||||||
class XCoreAsmPrinter : public AsmPrinter {
|
class XCoreAsmPrinter : public AsmPrinter {
|
||||||
const XCoreSubtarget &Subtarget;
|
const XCoreSubtarget &Subtarget;
|
||||||
XCoreMCInstLower MCInstLowering;
|
XCoreMCInstLower MCInstLowering;
|
||||||
void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS);
|
|
||||||
public:
|
public:
|
||||||
explicit XCoreAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
|
explicit XCoreAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
|
||||||
: AsmPrinter(TM, Streamer), Subtarget(TM.getSubtarget<XCoreSubtarget>()),
|
: AsmPrinter(TM, Streamer), Subtarget(TM.getSubtarget<XCoreSubtarget>()),
|
||||||
@ -76,7 +75,6 @@ namespace {
|
|||||||
void EmitInstruction(const MachineInstr *MI);
|
void EmitInstruction(const MachineInstr *MI);
|
||||||
void EmitFunctionBodyStart();
|
void EmitFunctionBodyStart();
|
||||||
void EmitFunctionBodyEnd();
|
void EmitFunctionBodyEnd();
|
||||||
virtual MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
|
|
||||||
};
|
};
|
||||||
} // end of anonymous namespace
|
} // end of anonymous namespace
|
||||||
|
|
||||||
@ -256,47 +254,13 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XCoreAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
|
||||||
raw_ostream &OS) {
|
|
||||||
unsigned NOps = MI->getNumOperands();
|
|
||||||
assert(NOps == 4);
|
|
||||||
OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: ";
|
|
||||||
// cast away const; DIetc do not take const operands for some reason.
|
|
||||||
DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata()));
|
|
||||||
OS << V.getName();
|
|
||||||
OS << " <- ";
|
|
||||||
// Frame address. Currently handles register +- offset only.
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm());
|
|
||||||
OS << '['; printOperand(MI, 0, OS); OS << '+'; printOperand(MI, 1, OS);
|
|
||||||
OS << ']';
|
|
||||||
OS << "+";
|
|
||||||
printOperand(MI, NOps-2, OS);
|
|
||||||
}
|
|
||||||
|
|
||||||
MachineLocation XCoreAsmPrinter::
|
|
||||||
getDebugValueLocation(const MachineInstr *MI) const {
|
|
||||||
// Handles frame addresses emitted in XCoreInstrInfo::emitFrameIndexDebugValue.
|
|
||||||
assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
|
|
||||||
assert(MI->getOperand(0).isReg() && MI->getOperand(1).isImm() &&
|
|
||||||
"Unexpected MachineOperand types");
|
|
||||||
return MachineLocation(MI->getOperand(0).getReg(),
|
|
||||||
MI->getOperand(1).getImm());
|
|
||||||
}
|
|
||||||
|
|
||||||
void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
void XCoreAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||||
SmallString<128> Str;
|
SmallString<128> Str;
|
||||||
raw_svector_ostream O(Str);
|
raw_svector_ostream O(Str);
|
||||||
|
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
case XCore::DBG_VALUE: {
|
case XCore::DBG_VALUE:
|
||||||
if (isVerbose() && OutStreamer.hasRawTextSupport()) {
|
llvm_unreachable("Should be handled target independently");
|
||||||
SmallString<128> TmpStr;
|
|
||||||
raw_svector_ostream OS(TmpStr);
|
|
||||||
PrintDebugValueComment(MI, OS);
|
|
||||||
OutStreamer.EmitRawText(StringRef(OS.str()));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case XCore::ADD_2rus:
|
case XCore::ADD_2rus:
|
||||||
if (MI->getOperand(2).getImm() == 0) {
|
if (MI->getOperand(2).getImm() == 0) {
|
||||||
O << "\tmov "
|
O << "\tmov "
|
||||||
|
@ -386,15 +386,6 @@ void XCoreInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|||||||
.addImm(0);
|
.addImm(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineInstr*
|
|
||||||
XCoreInstrInfo::emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx,
|
|
||||||
uint64_t Offset, const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const {
|
|
||||||
MachineInstrBuilder MIB = BuildMI(MF, DL, get(XCore::DBG_VALUE))
|
|
||||||
.addFrameIndex(FrameIx).addImm(0).addImm(Offset).addMetadata(MDPtr);
|
|
||||||
return &*MIB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ReverseBranchCondition - Return the inverse opcode of the
|
/// ReverseBranchCondition - Return the inverse opcode of the
|
||||||
/// specified Branch instruction.
|
/// specified Branch instruction.
|
||||||
bool XCoreInstrInfo::
|
bool XCoreInstrInfo::
|
||||||
|
@ -78,12 +78,6 @@ public:
|
|||||||
const TargetRegisterClass *RC,
|
const TargetRegisterClass *RC,
|
||||||
const TargetRegisterInfo *TRI) const;
|
const TargetRegisterInfo *TRI) const;
|
||||||
|
|
||||||
virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
|
|
||||||
int FrameIx,
|
|
||||||
uint64_t Offset,
|
|
||||||
const MDNode *MDPtr,
|
|
||||||
DebugLoc DL) const;
|
|
||||||
|
|
||||||
virtual bool ReverseBranchCondition(
|
virtual bool ReverseBranchCondition(
|
||||||
SmallVectorImpl<MachineOperand> &Cond) const;
|
SmallVectorImpl<MachineOperand> &Cond) const;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user