summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMInstrInfo.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-04-16 20:10:13 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-04-16 20:10:13 +0000
commitae84bbdbedb996b1e1aac8304f8f26f37a4a32de (patch)
treee73f0a0743d267032c05cc1fae0bb97679dfecf8 /llvm/lib/Target/ARM/ARMInstrInfo.cpp
parenta15cee1036a5e5c699328a1992a698b84f5d4880 (diff)
downloadbcm5719-llvm-ae84bbdbedb996b1e1aac8304f8f26f37a4a32de.tar.gz
bcm5719-llvm-ae84bbdbedb996b1e1aac8304f8f26f37a4a32de.zip
Infrastructure for getting the machine code size of a function and an instruction. X86, PowerPC and ARM are implemented
llvm-svn: 49809
Diffstat (limited to 'llvm/lib/Target/ARM/ARMInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMInstrInfo.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp
index 5650235082c..94ca6b09fde 100644
--- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp
@@ -877,8 +877,8 @@ static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
/// GetInstSize - Return the size of the specified MachineInstr.
///
-unsigned ARM::GetInstSize(MachineInstr *MI) {
- MachineBasicBlock &MBB = *MI->getParent();
+unsigned ARMInstrInfo::GetInstSizeInBytes(const MachineInstr *MI) const {
+ const MachineBasicBlock &MBB = *MI->getParent();
const MachineFunction *MF = MBB.getParent();
const TargetAsmInfo *TAI = MF->getTarget().getTargetAsmInfo();
@@ -937,17 +937,3 @@ unsigned ARM::GetInstSize(MachineInstr *MI) {
}
return 0; // Not reached
}
-
-/// GetFunctionSize - Returns the size of the specified MachineFunction.
-///
-unsigned ARM::GetFunctionSize(MachineFunction &MF) {
- unsigned FnSize = 0;
- for (MachineFunction::iterator MBBI = MF.begin(), E = MF.end();
- MBBI != E; ++MBBI) {
- MachineBasicBlock &MBB = *MBBI;
- for (MachineBasicBlock::iterator I = MBB.begin(),E = MBB.end(); I != E; ++I)
- FnSize += ARM::GetInstSize(I);
- }
- return FnSize;
-}
-
OpenPOWER on IntegriCloud