[llvm-commits] CVS: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp

Evan Cheng evan.cheng at apple.com
Thu Jan 25 17:05:00 PST 2007



Changes in directory llvm/lib/Target/ARM:

ARMConstantIslandPass.cpp updated: 1.6 -> 1.7
---
Log message:

Need to scan the function for branches even if there aren't any constants.

---
Diffs of the changes:  (+2 -3)

 ARMConstantIslandPass.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff -u llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.6 llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.7
--- llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.6	Thu Jan 25 17:31:04 2007
+++ llvm/lib/Target/ARM/ARMConstantIslandPass.cpp	Thu Jan 25 19:04:44 2007
@@ -122,9 +122,7 @@
 }
 
 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 @@
   // 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();






More information about the llvm-commits mailing list