Skip to content
  1. May 23, 2004
  2. Apr 23, 2004
  3. Apr 21, 2004
  4. Apr 20, 2004
  5. Apr 19, 2004
  6. Apr 12, 2004
  7. Apr 08, 2004
  8. Mar 18, 2004
  9. Mar 15, 2004
  10. Mar 14, 2004
  11. Mar 08, 2004
    • Chris Lattner's avatar
      Implement ArgumentPromotion/aggregate-promote.ll · fe6f2e3e
      Chris Lattner authored
      This allows pointers to aggregate objects, whose elements are only read, to
      be promoted and passed in by element instead of by reference.  This can
      enable a LOT of subsequent optimizations in the caller function.
      
      It's worth pointing out that this stuff happens a LOT of C++ programs, because
      objects in templates are generally passed around by reference.  When these
      templates are instantiated on small aggregate or scalar types, however, it is
      more efficient to pass them in by value than by reference.
      
      This transformation triggers most on C++ codes (e.g. 334 times on eon), but
      does happen on C codes as well.  For example, on mesa it triggers 72 times,
      and on gcc it triggers 35 times.  this is amazingly good considering that
      we are using 'basicaa' so far.
      
      llvm-svn: 12202
      fe6f2e3e
  12. Mar 07, 2004
  13. Mar 01, 2004
  14. Feb 27, 2004
  15. Feb 26, 2004
  16. Feb 25, 2004
    • Chris Lattner's avatar
      My faith in programmers has been found to be totally misplaced. One would · 8d1da1ab
      Chris Lattner authored
      assume that if they don't intend to write to a global variable, that they
      would mark it as constant.  However, there are people that don't understand
      that the compiler can do nice things for them if they give it the information
      it needs.
      
      This pass looks for blatently obvious globals that are only ever read from.
      Though it uses a trivially simple "alias analysis" of sorts, it is still able
      to do amazing things to important benchmarks.  253.perlbmk, for example,
      contains several ***GIANT*** function pointer tables that are not marked
      constant and should be.  Marking them constant allows the optimizer to turn
      a whole bunch of indirect calls into direct calls.  Note that only a link-time
      optimizer can do this transformation, but perlbmk does have several strings
      and other minor globals that can be marked constant by this pass when run
      from GCCAS.
      
      176.gcc has a ton of strings and large tables that are marked constant, both
      at compile time (38 of them) and at link time (48 more).  Other benchmarks
      give similar results, though it seems like big ones have disproportionally
      more than small ones.
      
      This pass is extremely quick and does good things.  I'm going to enable it
      in gccas & gccld.  Not bad for 50 SLOC.
      
      llvm-svn: 11836
      8d1da1ab
  17. Feb 13, 2004
  18. Feb 09, 2004
  19. Feb 08, 2004
Loading