Skip to content
  1. Oct 05, 2003
    • Chris Lattner's avatar
      Speed up the mem2reg transform for allocas which are only read/written in a single · 80471529
      Chris Lattner authored
      basic block.  This is amazingly common in code generated by the C/C++ front-ends.
      This change makes it not have to insert ANY phi nodes, whereas before it would insert
      a ton of dead ones which DCE would have to clean up.
      
      Thus, this fix improves compile-time performance of these trivial allocas in two ways:
        1. It doesn't have to do the walking and book-keeping for renaming
        2. It does not insert dead phi nodes for them which would have to
           subsequently be cleaned up.
      
      On my favorite testcase from 252.eon, this special case handles 305 out of
      356 promoted allocas in the function.  It speeds up the mem2reg pass from 7.5256s
      to 1.2505s.  It inserts 677 fewer dead PHI nodes, which speeds up a subsequent
      -dce pass from 18.7524s to 2.4806s.
      
      There are still 120 trivially dead PHI nodes being inserted for variables used
      in multiple basic blocks, but they are not handled by this patch.
      
      llvm-svn: 8881
      80471529
    • Chris Lattner's avatar
      The first PHI node may be null, scan for the first non-null one · a5721d3d
      Chris Lattner authored
      llvm-svn: 8865
      a5721d3d
    • Chris Lattner's avatar
      The VersionNumbers vector is only used during PHI placement. Turn it into an... · 203bc011
      Chris Lattner authored
      The VersionNumbers vector is only used during PHI placement.  Turn it into an argument, allowing us to get rid of the vector.
      
      llvm-svn: 8864
      203bc011
    • Chris Lattner's avatar
      * Update file header comment · 7d9692df
      Chris Lattner authored
      *** Revamp the code which handled unreachable code in the function.  Now the
          code is much more efficient for high-degree basic blocks, such as those
          that occur in the 252.eon SPEC benchmark.
      
      For the interested, the time to promote a SINGLE alloca in _ZN7mrScene4ReadERSi
      function used to be > 3.5s.  Now it is < .075s.  The function has a LOT of
      allocas in it, so it appeared to be infinite looping, this should make it much
      nicer.  :)
      
      llvm-svn: 8863
      7d9692df
    • Chris Lattner's avatar
      Simplify the loop a bit · db1f81bc
      Chris Lattner authored
      llvm-svn: 8862
      db1f81bc
    • Chris Lattner's avatar
      There is no need for separate WriteSets and PhiNodeBlocks lists. It is just a · 2093012a
      Chris Lattner authored
      work-list of value definitions.  This allows elimination of the explicit
      'iterative' step of the algorithm, and also reuses temporary memory better.
      
      llvm-svn: 8861
      2093012a
    • Chris Lattner's avatar
      The PhiNodes 2D vector is only used during PHI node placement. It doesn't · 9408b1e8
      Chris Lattner authored
      need to be an instance variable!
      
      llvm-svn: 8860
      9408b1e8
    • Chris Lattner's avatar
      * Document instance vars better · 417bc173
      Chris Lattner authored
      * Fuse two parallel loops
      * Use a more specific type for AllocaLookup
      
      llvm-svn: 8859
      417bc173
    • Chris Lattner's avatar
      Two small cleanups/speedups: · c360f135
      Chris Lattner authored
       * Do not insert a new entry into NewPhiNodes during the rename pass if there are no PHIs in a block.
       * Do not compute WriteSets in parallel
      
      llvm-svn: 8858
      c360f135
    • Chris Lattner's avatar
      * Minor cleanups · c3d57b59
      Chris Lattner authored
      * Eliminate the KillList instance variable, instead, just delete loads and
        stores as they are "renamed", and delete allocas when they are done
      * Make the 'visited' set an instance variable to avoid passing it on the stack.
      
      llvm-svn: 8857
      c3d57b59
  2. Aug 18, 2003
  3. Apr 25, 2003
  4. Apr 24, 2003
  5. Apr 21, 2003
  6. Apr 18, 2003
  7. Apr 10, 2003
  8. Mar 03, 2003
  9. Feb 23, 2003
  10. Feb 22, 2003
  11. Oct 21, 2002
  12. Oct 02, 2002
    • Chris Lattner's avatar
      Updates to work with recent Statistic's changes: · bf3a099a
      Chris Lattner authored
          * Renamed StatisticReporter.h/cpp to Statistic.h/cpp
          * Broke constructor to take two const char * arguments instead of one, so
            that indendation can be taken care of automatically.
          * Sort the list by pass name when printing
          * Make sure to print all statistics as a group, instead of randomly when
            the statistics dtors are called.
          * Updated ProgrammersManual with new semantics.
      
      llvm-svn: 4002
      bf3a099a
  13. Sep 24, 2002
  14. Sep 11, 2002
    • Chris Lattner's avatar
      · a239e687
      Chris Lattner authored
      Clean up code due to auto-insert constructors
      
      llvm-svn: 3665
      a239e687
  15. Aug 23, 2002
  16. Aug 08, 2002
    • Chris Lattner's avatar
      · f0ed55d1
      Chris Lattner authored
      - Cleaned up the interface to AnalysisUsage to take analysis class names
         instead of ::ID's.
       - Pass::getAnalysis<> now no longer takes an optional argument
      
      llvm-svn: 3265
      f0ed55d1
  17. Jul 26, 2002
    • Chris Lattner's avatar
      · c8b7092e
      Chris Lattner authored
      * Add support for different "PassType's"
      * Add new RegisterOpt/RegisterAnalysis templates for registering passes that
        are to show up in opt or analyze
      * Register Analyses now
      * Change optimizations to use RegisterOpt instead of RegisterPass
      * Add support for different "PassType's"
      * Add new RegisterOpt/RegisterAnalysis templates for registering passes that
        are to show up in opt or analyze
      * Register Analyses now
      * Change optimizations to use RegisterOpt instead of RegisterPass
      * Remove getPassName implementations from various subclasses
      
      llvm-svn: 3113
      c8b7092e
  18. Jul 23, 2002
  19. Jun 25, 2002
  20. May 10, 2002
  21. May 07, 2002
  22. May 01, 2002
    • Chris Lattner's avatar
      · b3e81510
      Chris Lattner authored
      Fixed bug: test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
      
      llvm-svn: 2423
      b3e81510
  23. Apr 29, 2002
  24. Apr 28, 2002
Loading