Commit 542b004d authored by Dylan McKay's avatar Dylan McKay
Browse files

Revert r314892

It was accidentally merged.

llvm-svn: 314893
parent 6b0b442e
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -537,7 +537,8 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
    llvm_unreachable("unexpected opcode!");
  case AVR::JMPk:
  case AVR::CALLk:
    return true;
    assert(BrOffset >= 0 && "offset must be absolute address");
    return isUIntN(16, BrOffset);
  case AVR::RCALLk:
  case AVR::RJMPk:
    return isIntN(13, BrOffset);
@@ -555,20 +556,5 @@ bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp,
  }
}

unsigned AVRInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB,
                                            MachineBasicBlock &NewDestBB,
                                            const DebugLoc &DL,
                                            int64_t BrOffset,
                                            RegScavenger *RS) const {
    // This method inserts a *direct* branch (JMP), despite its name.
    // LLVM calls this method to fixup unconditional branches; it never calls
    // insertBranch or some hypothetical "insertDirectBranch".
    // See lib/CodeGen/RegisterRelaxation.cpp for details.
    // We end up here when a jump is too long for a RJMP instruction.
    auto &MI = *BuildMI(&MBB, DL, get(AVR::JMPk)).addMBB(&NewDestBB);

    return getInstSizeInBytes(MI);
}

} // end of namespace llvm
+0 −6
Original line number Diff line number Diff line
@@ -107,12 +107,6 @@ public:

  bool isBranchOffsetInRange(unsigned BranchOpc,
                             int64_t BrOffset) const override;

  unsigned insertIndirectBranch(MachineBasicBlock &MBB,
                                MachineBasicBlock &NewDestBB,
                                const DebugLoc &DL,
                                int64_t BrOffset,
                                RegScavenger *RS) const override;
private:
  const AVRRegisterInfo RI;
};
+0 −4137

File deleted.

Preview size limit exceeded, changes collapsed.