summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMConstantIslandPass.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-26 01:04:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-26 01:04:44 +0000
commit7755facd76c518b09ed634f383170e8f3bcafc0d (patch)
treee014b323cbd8a62725f55cc7ac6180fb49a79408 /lib/Target/ARM/ARMConstantIslandPass.cpp
parentc71ca3cdd2d7a08b043ebb717cad0beadaf47450 (diff)
downloadllvm-7755facd76c518b09ed634f383170e8f3bcafc0d.tar.gz
llvm-7755facd76c518b09ed634f383170e8f3bcafc0d.tar.bz2
llvm-7755facd76c518b09ed634f383170e8f3bcafc0d.tar.xz
Need to scan the function for branches even if there aren't any constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index db30428d96..62e47172e2 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -122,9 +122,7 @@ FunctionPass *llvm::createARMConstantIslandPass() {
}
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &Fn) {
- // If there are no constants, there is nothing to do.
MachineConstantPool &MCP = *Fn.getConstantPool();
- if (MCP.isEmpty()) return false;
TII = Fn.getTarget().getInstrInfo();
TAI = Fn.getTarget().getTargetAsmInfo();
@@ -136,7 +134,8 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &Fn) {
// Perform the initial placement of the constant pool entries. To start with,
// we put them all at the end of the function.
std::vector<MachineInstr*> CPEMIs;
- DoInitialPlacement(Fn, CPEMIs);
+ if (!MCP.isEmpty())
+ DoInitialPlacement(Fn, CPEMIs);
/// The next UID to take is the first unused one.
NextUID = CPEMIs.size();