summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitdb7f0591f32c1710756b493ec9b5619eab3f47d8 (patch)
tree1c14f2d5a52042503cdf5e4f824a301f47c72cb7 /llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
parent13058a5ae9207354ec8110b6882fd121eba5bc6a (diff)
downloadbcm5719-llvm-db7f0591f32c1710756b493ec9b5619eab3f47d8.tar.gz
bcm5719-llvm-db7f0591f32c1710756b493ec9b5619eab3f47d8.zip
Need to scan the function for branches even if there aren't any constants.
llvm-svn: 33515
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantIslandPass.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index db30428d96e..62e47172e26 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud