[llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/crtend.c

Chris Lattner lattner at cs.uiuc.edu
Tue Feb 17 12:46:02 PST 2004


Changes in directory llvm/runtime/GCCLibraries/crtend:

crtend.c updated: 1.3 -> 1.4

---
Log message:

Since tail duplication is currently neutered, we have to help the optimizer to remove the overhead of __main


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

Index: llvm/runtime/GCCLibraries/crtend/crtend.c
diff -u llvm/runtime/GCCLibraries/crtend/crtend.c:1.3 llvm/runtime/GCCLibraries/crtend/crtend.c:1.4
--- llvm/runtime/GCCLibraries/crtend/crtend.c:1.3	Fri Dec 19 01:51:46 2003
+++ llvm/runtime/GCCLibraries/crtend/crtend.c	Tue Feb 17 12:45:06 2004
@@ -49,8 +49,9 @@
       abort();  /* Should be able to install ONE atexit handler! */
 
   /* FIXME: This should sort the list by priority! */
-  for (; R->FP; ++R)
-    R->FP();
+  if (R->FP)
+    for (; R->FP; ++R)
+      R->FP();
 }
 
 static void run_destructors(void) {





More information about the llvm-commits mailing list