From: Evan Cheng Date: Wed, 16 May 2007 23:53:44 +0000 (+0000) Subject: Default implementation of TargetInstrInfo::getBlockSize(). X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e425956b7258eef15a83f0d98e43a67dc7703965;p=oota-llvm.git Default implementation of TargetInstrInfo::getBlockSize(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37138 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index d1413510fff..20f32a2ad9b 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/lib/Target/TargetInstrInfo.cpp @@ -84,3 +84,7 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI, } return MadeChange; } + +unsigned TargetInstrInfo::getBlockSize(MachineBasicBlock *MBB) const { + return (unsigned)std::distance(MBB->begin(), MBB->end()); +}