}
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &Fn) {
}
bool ARMConstantIslands::runOnMachineFunction(MachineFunction &Fn) {
- // If there are no constants, there is nothing to do.
MachineConstantPool &MCP = *Fn.getConstantPool();
MachineConstantPool &MCP = *Fn.getConstantPool();
- if (MCP.isEmpty()) return false;
TII = Fn.getTarget().getInstrInfo();
TAI = Fn.getTarget().getTargetAsmInfo();
TII = Fn.getTarget().getInstrInfo();
TAI = Fn.getTarget().getTargetAsmInfo();
// 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;
// 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();
/// The next UID to take is the first unused one.
NextUID = CPEMIs.size();