[llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Feb 25 21:35:01 PST 2004


Changes in directory llvm/tools/gccld:

GenerateCode.cpp updated: 1.19 -> 1.20

---
Log message:

We have this snazzy link-time optimizer.  How about we start using it?  This
removes some cruft from 255.vortex, cleaning up after DAE and IPCP, which
do horrible, beautiful, things to vortex.


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

Index: llvm/tools/gccld/GenerateCode.cpp
diff -u llvm/tools/gccld/GenerateCode.cpp:1.19 llvm/tools/gccld/GenerateCode.cpp:1.20
--- llvm/tools/gccld/GenerateCode.cpp:1.19	Wed Feb 25 15:35:13 2004
+++ llvm/tools/gccld/GenerateCode.cpp	Wed Feb 25 21:34:30 2004
@@ -111,6 +111,11 @@
     if (!DisableInline)
       addPass(Passes, createFunctionInliningPass()); // Inline small functions
 
+    // The IPO passes may leave cruft around.  Clean up after them.
+    addPass(Passes, createInstructionCombiningPass());
+
+    addPass(Passes, createScalarReplAggregatesPass()); // Break up allocas
+
     // Run a few AA driven optimizations here and now, to cleanup the code.
     // Eventually we should put an IP AA in place here.
 
@@ -118,8 +123,7 @@
     addPass(Passes, createLoadValueNumberingPass()); // GVN for load instrs
     addPass(Passes, createGCSEPass());               // Remove common subexprs
 
-    // The FuncResolve pass may leave cruft around if functions were prototyped
-    // differently than they were defined.  Remove this cruft.
+    // Cleanup and simplify the code after the scalar optimizations.
     addPass(Passes, createInstructionCombiningPass());
 
     // Delete basic blocks, which optimization passes may have killed...





More information about the llvm-commits mailing list