From 05cc424082f797c5820b19f29f398c9cce9b9928 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 2 Feb 2007 19:09:19 +0000 Subject: [PATCH] Use MBB.empty() instead of MBB.size() for speed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33789 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMConstantIslandPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp index 89c32aa2931..199782dcfe5 100644 --- a/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -352,7 +352,7 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn, // In thumb mode, if this block is a constpool island, pessmisticly assume // it needs to be padded by two byte so it's aligned on 4 byte boundary. if (AFI->isThumbFunction() && - MBB.size() && + !MBB.empty() && MBB.begin()->getOpcode() == ARM::CONSTPOOL_ENTRY) MBBSize += 2;