aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-11-20 02:32:06 +0000
committerJim Grosbach <grosbach@apple.com>2009-11-20 02:32:06 +0000
commit871fc2c9d35287f0feaeb077f4ce892da9436d06 (patch)
treedf6f23746639d6877a23571335799887dcfe7d1c
parentef4c5b2c4971e741cd583f5c351e8328e72e93fa (diff)
downloadexternal_llvm-871fc2c9d35287f0feaeb077f4ce892da9436d06.zip
external_llvm-871fc2c9d35287f0feaeb077f4ce892da9436d06.tar.gz
external_llvm-871fc2c9d35287f0feaeb077f4ce892da9436d06.tar.bz2
Remove verifySizes() since it's not adding much value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89443 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index d11fafd..1832909 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -221,45 +221,10 @@ namespace {
unsigned GetOffsetOf(MachineInstr *MI) const;
void dumpBBs();
void verify(MachineFunction &MF);
- void verifySizes(MachineFunction &MF);
};
char ARMConstantIslands::ID = 0;
}
-// verifySizes - Recalculate BB sizes from scratch and validate that the result
-// matches the values we've been using.
-void ARMConstantIslands::verifySizes(MachineFunction &MF) {
- unsigned Offset = 0;
- for (MachineFunction::iterator MBBI = MF.begin(), E = MF.end();
- MBBI != E; ++MBBI) {
- MachineBasicBlock &MBB = *MBBI;
- unsigned MBBSize = 0;
- for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
- I != E; ++I) {
- // Add instruction size to MBBSize.
- MBBSize += TII->GetInstSizeInBytes(I);
- }
- // In thumb mode, if this block is a constpool island, we may need padding
- // so it's aligned on 4 byte boundary.
- if (isThumb &&
- !MBB.empty() &&
- MBB.begin()->getOpcode() == ARM::CONSTPOOL_ENTRY &&
- ((Offset%4) != 0 || HasInlineAsm))
- MBBSize += 2;
- Offset += MBBSize;
-
- DEBUG(errs() << "block #" << MBB.getNumber() << ": "
- << MBBSize << " bytes (expecting " << BBSizes[MBB.getNumber()]
- << (MBB.begin()->getOpcode() == ARM::CONSTPOOL_ENTRY ?
- " CONSTANTPOOL" : "") << ")\n");
-#ifndef NDEBUG
- if (MBBSize != BBSizes[MBB.getNumber()])
- MBB.dump();
-#endif
- assert (MBBSize == BBSizes[MBB.getNumber()] && "block size mismatch!");
- }
-}
-
/// verify - check BBOffsets, BBSizes, alignment of islands
void ARMConstantIslands::verify(MachineFunction &MF) {
assert(BBOffsets.size() == BBSizes.size());
@@ -392,7 +357,6 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &MF) {
// After a while, this might be made debug-only, but it is not expensive.
verify(MF);
- verifySizes(MF);
// If LR has been forced spilled and no far jumps (i.e. BL) has been issued.
// Undo the spill / restore of LR if possible.