summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-16 23:53:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-16 23:53:44 +0000
commit733b4bd8ae8910d70a9d3ec4107e96524a90b4bd (patch)
treedba555216f6ab08509fa09592bce536540bcdeec /llvm/lib/Target/TargetInstrInfo.cpp
parent429178d727f52785967e216b0617e8cea3f909d1 (diff)
downloadbcm5719-llvm-733b4bd8ae8910d70a9d3ec4107e96524a90b4bd.tar.gz
bcm5719-llvm-733b4bd8ae8910d70a9d3ec4107e96524a90b4bd.zip
Default implementation of TargetInstrInfo::getBlockSize().
llvm-svn: 37138
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetInstrInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp
index d1413510fff..20f32a2ad9b 100644
--- a/llvm/lib/Target/TargetInstrInfo.cpp
+++ b/llvm/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());
+}
OpenPOWER on IntegriCloud