Skip to content
  1. Jul 07, 2010
  2. Jun 30, 2010
    • Jakob Stoklund Olesen's avatar
      Begin implementation of an inline spiller. · f8889119
      Jakob Stoklund Olesen authored
      InlineSpiller inserts loads and spills immediately instead of deferring to
      VirtRegMap. This is possible now because SlotIndexes allows instructions to be
      inserted and renumbered.
      
      This is work in progress, and is mostly a copy of TrivialSpiller so far. It
      works very well for functions that don't require spilling.
      
      llvm-svn: 107227
      f8889119
  3. Jun 15, 2010
  4. Apr 21, 2010
    • Jakob Stoklund Olesen's avatar
      Add fast register allocator, enabled with -regalloc=fast. · 8a070a54
      Jakob Stoklund Olesen authored
      So far this is just a clone of -regalloc=local that has been lobotomized to run
      25% faster. It drops the least-recently-used calculations, and is just plain
      stupid when it runs out of registers.
      
      The plan is to make this go even faster for -O0 by taking advantage of the short
      live intervals in unoptimized code. It should not be necessary to calculate
      liveness when most virtual registers are killed 2-3 instructions after they are
      born.
      
      llvm-svn: 102006
      8a070a54
    • Dan Gohman's avatar
      Update CMakeLists.txt. · cc5e6528
      Dan Gohman authored
      llvm-svn: 101976
      cc5e6528
  5. Apr 03, 2010
    • David Greene's avatar
      · 9b063df4
      David Greene authored
      Ok, third time's the charm.  No changes from last time except the CMake
      source addition.  Apparently the buildbots were wrong about failures.
      
      ---
      
      Add some switches helpful for debugging:
      
      -print-before=<Pass Name>
      
      Dump IR before running pass <Pass Name>.
      
      -print-before-all
      
      Dump IR before running each pass.
      
      -print-after-all
      
      Dump IR after running each pass.
      
      These are helpful when tracking down a miscompilation.  It is easy to
      get IR dumps and do diffs on them, etc.
      
      To make this work well, add a new getPrinterPass API to Pass so that
      each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
      suitable for dumping out the kind of object the Pass works on.
      
      llvm-svn: 100249
      9b063df4
  6. Apr 02, 2010
  7. Mar 02, 2010
  8. Feb 15, 2010
  9. Feb 12, 2010
    • Bob Wilson's avatar
      Add a new pass on machine instructions to optimize away PHI cycles that · 0827e040
      Bob Wilson authored
      reduce down to a single value.  InstCombine already does this transformation
      but DAG legalization may introduce new opportunities.  This has turned out to
      be important for ARM where 64-bit values are split up during type legalization:
      InstCombine is not able to remove the PHI cycles on the 64-bit values but
      the separate 32-bit values can be optimized.  I measured the compile time 
      impact of this (running llc on 176.gcc) and it was not significant.
      
      llvm-svn: 95951
      0827e040
  10. Feb 02, 2010
  11. Jan 19, 2010
  12. Jan 15, 2010
  13. Jan 13, 2010
  14. Dec 14, 2009
  15. Dec 02, 2009
  16. Nov 26, 2009
    • Bob Wilson's avatar
      Split tail duplication into a separate pass. This is needed to avoid · 2d4ff12d
      Bob Wilson authored
      running tail duplication when doing branch folding for if-conversion, and
      we also want to be able to run tail duplication earlier to fix some
      reg alloc problems.  Move the CanFallThrough function from BranchFolding
      to MachineBasicBlock so that it can be shared by TailDuplication.
      
      llvm-svn: 89904
      2d4ff12d
  17. Nov 04, 2009
  18. Oct 26, 2009
  19. Oct 08, 2009
  20. Sep 17, 2009
  21. Sep 16, 2009
  22. Aug 23, 2009
  23. Aug 17, 2009
  24. Aug 10, 2009
  25. Aug 07, 2009
  26. Aug 04, 2009
  27. Jul 31, 2009
  28. Jul 06, 2009
  29. Jul 02, 2009
  30. Jun 26, 2009
  31. Jun 11, 2009
  32. Jun 03, 2009
  33. May 22, 2009
    • Duncan Sands's avatar
      Add a new codegen pass that normalizes dwarf exception handling · d6fb6501
      Duncan Sands authored
      code in preparation for code generation.  The main thing it does
      is handle the case when eh.exception calls (and, in a future
      patch, eh.selector calls) are far away from landing pads.  Right
      now in practice you only find eh.exception calls close to landing
      pads: either in a landing pad (the common case) or in a landing
      pad successor, due to loop passes shifting them about.  However
      future exception handling improvements will result in calls far
      from landing pads:
      (1) Inlining of rewinds.  Consider the following case:
      In function @f:
      ...
        invoke @g to label %normal unwind label %unwinds
      ...
      unwinds:
        %ex = call i8* @llvm.eh.exception()
      ...
      
      In function @g:
      ...
        invoke @something to label %continue unwind label %handler
      ...
      handler:
        %ex = call i8* @llvm.eh.exception()
      ... perform cleanups ...
        "rethrow exception"
      
      Now inline @g into @f.  Currently this is turned into:
      In function @f:
      ...
        invoke @something to label %continue unwind label %handler
      ...
      handler:
        %ex = call i8* @llvm.eh.exception()
      ... perform cleanups ...
        invoke "rethrow exception" to label %normal unwind label %unwinds
      unwinds:
        %ex = call i8* @llvm.eh.exception()
      ...
      
      However we would like to simplify invoke of "rethrow exception" into
      a branch to the %unwinds label.  Then %unwinds is no longer a landing
      pad, and the eh.exception call there is then far away from any landing
      pads.
      
      (2) Using the unwind instruction for cleanups.
      It would be nice to have codegen handle the following case:
        invoke @something to label %continue unwind label %run_cleanups
      ...
      handler:
      ... perform cleanups ...
        unwind
      
      This requires turning "unwind" into a library call, which
      necessarily takes a pointer to the exception as an argument
      (this patch also does this unwind lowering).  But that means
      you are using eh.exception again far from a landing pad.
      
      (3) Bugpoint simplifications.  When bugpoint is simplifying
      exception handling code it often generates eh.exception calls
      far from a landing pad, which then causes codegen to assert.
      Bugpoint then latches on to this assertion and loses sight
      of the original problem.
      
      Note that it is currently rare for this pass to actually do
      anything.  And in fact it normally shouldn't do anything at
      all given the code coming out of llvm-gcc!  But it does fire
      a few times in the testsuite.  As far as I can see this is
      almost always due to the LoopStrengthReduce codegen pass
      introducing pointless loop preheader blocks which are landing
      pads and only contain a branch to another block.  This other
      block contains an eh.exception call.  So probably by tweaking
      LoopStrengthReduce a bit this can be avoided.
      
      llvm-svn: 72276
      d6fb6501
Loading