[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Oct 31 16:12:47 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.102 -> 1.103
---
Log message:

Add a flag to enable a darwin linker optimization


---
Diffs of the changes:  (+7 -1)

 PPCAsmPrinter.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.102 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.103
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.102	Mon Oct 31 16:12:06 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp	Mon Oct 31 18:12:36 2005
@@ -567,6 +567,13 @@
       << "\t.long\t" << *i << '\n';
   }
 
+  // Funny Darwin hack: This flag tells the linker that no global symbols
+  // contain code that falls through to other global symbols (e.g. the obvious
+  // implementation of multiple entry points).  If this doesn't occur, the
+  // linker can safely perform dead code stripping.  Since LLVM never generates
+  // code that does this, it is always safe to set.
+  O << "\t.subsections_via_symbols\n";
+
   AsmPrinter::doFinalization(M);
   return false; // success
 }
@@ -711,7 +718,6 @@
   O << "_section_.text:\n"
     << "\t.csect .data[RW],3\n"
     << "\t.llong _section_.text\n";
-
   delete Mang;
   return false; // success
 }






More information about the llvm-commits mailing list