diff options
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp index 1ec1ce01336..4086c6cfb81 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp @@ -430,7 +430,7 @@ bool HexagonInstrInfo::analyzeBranch(MachineBasicBlock &MBB, // Delete the J2_jump if it's equivalent to a fall-through. if (AllowModify && JumpToBlock && MBB.isLayoutSuccessor(I->getOperand(0).getMBB())) { - DEBUG(dbgs() << "\nErasing the jump to successor block\n";); + LLVM_DEBUG(dbgs() << "\nErasing the jump to successor block\n";); I->eraseFromParent(); I = MBB.instr_end(); if (I == MBB.instr_begin()) @@ -499,8 +499,8 @@ bool HexagonInstrInfo::analyzeBranch(MachineBasicBlock &MBB, Cond.push_back(LastInst->getOperand(1)); return false; } - DEBUG(dbgs() << "\nCant analyze " << printMBBReference(MBB) - << " with one jump\n";); + LLVM_DEBUG(dbgs() << "\nCant analyze " << printMBBReference(MBB) + << " with one jump\n";); // Otherwise, don't know what this is. return true; } @@ -547,8 +547,8 @@ bool HexagonInstrInfo::analyzeBranch(MachineBasicBlock &MBB, FBB = LastInst->getOperand(0).getMBB(); return false; } - DEBUG(dbgs() << "\nCant analyze " << printMBBReference(MBB) - << " with two jumps";); + LLVM_DEBUG(dbgs() << "\nCant analyze " << printMBBReference(MBB) + << " with two jumps";); // Otherwise, can't handle this. return true; } @@ -557,7 +557,7 @@ unsigned HexagonInstrInfo::removeBranch(MachineBasicBlock &MBB, int *BytesRemoved) const { assert(!BytesRemoved && "code size not handled"); - DEBUG(dbgs() << "\nRemoving branches out of " << printMBBReference(MBB)); + LLVM_DEBUG(dbgs() << "\nRemoving branches out of " << printMBBReference(MBB)); MachineBasicBlock::iterator I = MBB.end(); unsigned Count = 0; while (I != MBB.begin()) { @@ -629,7 +629,8 @@ unsigned HexagonInstrInfo::insertBranch(MachineBasicBlock &MBB, // (ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset) // (ins IntRegs:$src1, u5Imm:$src2, brtarget:$offset) unsigned Flags1 = getUndefRegState(Cond[1].isUndef()); - DEBUG(dbgs() << "\nInserting NVJump for " << printMBBReference(MBB);); + LLVM_DEBUG(dbgs() << "\nInserting NVJump for " + << printMBBReference(MBB);); if (Cond[2].isReg()) { unsigned Flags2 = getUndefRegState(Cond[2].isUndef()); BuildMI(&MBB, DL, get(BccOpc)).addReg(Cond[1].getReg(), Flags1). @@ -1501,7 +1502,7 @@ bool HexagonInstrInfo::PredicateInstruction( MachineInstr &MI, ArrayRef<MachineOperand> Cond) const { if (Cond.empty() || isNewValueJump(Cond[0].getImm()) || isEndLoopN(Cond[0].getImm())) { - DEBUG(dbgs() << "\nCannot predicate:"; MI.dump();); + LLVM_DEBUG(dbgs() << "\nCannot predicate:"; MI.dump();); return false; } int Opc = MI.getOpcode(); @@ -2251,13 +2252,13 @@ bool HexagonInstrInfo::isLateInstrFeedsEarlyInstr(const MachineInstr &LRMI, bool isLate = isLateResultInstr(LRMI); bool isEarly = isEarlySourceInstr(ESMI); - DEBUG(dbgs() << "V60" << (isLate ? "-LR " : " -- ")); - DEBUG(LRMI.dump()); - DEBUG(dbgs() << "V60" << (isEarly ? "-ES " : " -- ")); - DEBUG(ESMI.dump()); + LLVM_DEBUG(dbgs() << "V60" << (isLate ? "-LR " : " -- ")); + LLVM_DEBUG(LRMI.dump()); + LLVM_DEBUG(dbgs() << "V60" << (isEarly ? "-ES " : " -- ")); + LLVM_DEBUG(ESMI.dump()); if (isLate && isEarly) { - DEBUG(dbgs() << "++Is Late Result feeding Early Source\n"); + LLVM_DEBUG(dbgs() << "++Is Late Result feeding Early Source\n"); return true; } @@ -4174,7 +4175,7 @@ bool HexagonInstrInfo::getPredReg(ArrayRef<MachineOperand> Cond, return false; assert(Cond.size() == 2); if (isNewValueJump(Cond[0].getImm()) || Cond[1].isMBB()) { - DEBUG(dbgs() << "No predregs for new-value jumps/endloop"); + LLVM_DEBUG(dbgs() << "No predregs for new-value jumps/endloop"); return false; } PredReg = Cond[1].getReg(); @@ -4276,9 +4277,9 @@ void HexagonInstrInfo::immediateExtend(MachineInstr &MI) const { bool HexagonInstrInfo::invertAndChangeJumpTarget( MachineInstr &MI, MachineBasicBlock *NewTarget) const { - DEBUG(dbgs() << "\n[invertAndChangeJumpTarget] to " - << printMBBReference(*NewTarget); - MI.dump();); + LLVM_DEBUG(dbgs() << "\n[invertAndChangeJumpTarget] to " + << printMBBReference(*NewTarget); + MI.dump();); assert(MI.isBranch()); unsigned NewOpcode = getInvertedPredicatedOpcode(MI.getOpcode()); int TargetPos = MI.getNumOperands() - 1; @@ -4306,8 +4307,9 @@ void HexagonInstrInfo::genAllInsnTimingClasses(MachineFunction &MF) const { for (unsigned insn = TargetOpcode::GENERIC_OP_END+1; insn < Hexagon::INSTRUCTION_LIST_END; ++insn) { NewMI = BuildMI(B, I, DL, get(insn)); - DEBUG(dbgs() << "\n" << getName(NewMI->getOpcode()) << - " Class: " << NewMI->getDesc().getSchedClass()); + LLVM_DEBUG(dbgs() << "\n" + << getName(NewMI->getOpcode()) + << " Class: " << NewMI->getDesc().getSchedClass()); NewMI->eraseFromParent(); } /* --- The code above is used to generate complete set of Hexagon Insn --- */ @@ -4317,7 +4319,7 @@ void HexagonInstrInfo::genAllInsnTimingClasses(MachineFunction &MF) const { // p -> NotP // NotP -> P bool HexagonInstrInfo::reversePredSense(MachineInstr &MI) const { - DEBUG(dbgs() << "\nTrying to reverse pred. sense of:"; MI.dump()); + LLVM_DEBUG(dbgs() << "\nTrying to reverse pred. sense of:"; MI.dump()); MI.setDesc(get(getInvertedPredicatedOpcode(MI.getOpcode()))); return true; } |