Skip to content
  1. Jan 12, 2009
  2. Dec 24, 2008
  3. Dec 23, 2008
    • Dale Johannesen's avatar
      Fix the time regression I introduced in 464.h264ref with · 93b9aa87
      Dale Johannesen authored
      my last patch to this file.
      
      The issue there was that all uses of an IV inside a loop
      are actually references to Base[IV*2], and there was one
      use outside that was the same but LSR didn't see the base
      or the scaling because it didn't recurse into uses outside
      the loop; thus, it used base+IV*scale mode inside the loop
      instead of pulling base out of the loop.  This was extra bad
      because register pressure later forced both base and IV into
      memory.  Doing that recursion, at least enough
      to figure out addressing modes, is a good idea in general;
      the change in AddUsersIfInteresting does this.  However,
      there were side effects....
      
      It is also possible for recursing outside the loop to
      introduce another IV where there was only 1 before (if
      the refs inside are not scaled and the ref outside is).
      I don't think this is a common case, but it's in the testsuite.
      It is right to be very aggressive about getting rid of
      such introduced IVs (CheckForIVReuse and the handling of
      nonzero RewriteFactor in StrengthReduceStridedIVUsers).
      In the testcase in question the new IV produced this way
      has both a nonconstant stride and a nonzero base, neither
      of which was handled before.  And when inserting 
      new code that feeds into a PHI, it's right to put such 
      code at the original location rather than in the PHI's 
      immediate predecessor(s) when the original location is outside 
      the loop (a case that couldn't happen before)
      (RewriteInstructionToUseNewBase); better to avoid making
      multiple copies of it in this case.
      
      Also, the mechanism for keeping SCEV's corresponding to GEP's
      no longer works, as the GEP might change after its SCEV
      is remembered, invalidating the SCEV, and we might get a bad
      SCEV value when looking up the GEP again for a later loop.  
      This also couldn't happen before, as we weren't recursing
      into GEP's outside the loop.
      
      I owe some testcases for this, want to get it in for nightly runs.
      
      llvm-svn: 61362
      93b9aa87
  4. Dec 18, 2008
    • Dale Johannesen's avatar
      Revert previous patch, appears to break bootstrap. · 3e5843b9
      Dale Johannesen authored
      llvm-svn: 61181
      3e5843b9
    • Dale Johannesen's avatar
      Fix the time regression I introduced in 464.h264ref with · 12d031b7
      Dale Johannesen authored
      my last patch to this file.
      
      The issue there was that all uses of an IV inside a loop
      are actually references to Base[IV*2], and there was one
      use outside that was the same but LSR didn't see the base
      or the scaling because it didn't recurse into uses outside
      the loop; thus, it used base+IV*scale mode inside the loop
      instead of pulling base out of the loop.  This was extra bad
      because register pressure later forced both base and IV into
      memory.  Doing that recursion, at least enough
      to figure out addressing modes, is a good idea in general;
      the change in AddUsersIfInteresting does this.  However,
      there were side effects....
      
      It is also possible for recursing outside the loop to
      introduce another IV where there was only 1 before (if
      the refs inside are not scaled and the ref outside is).
      I don't think this is a common case, but it's in the testsuite.
      It is right to be very aggressive about getting rid of
      such introduced IVs (CheckForIVReuse and the handling of
      nonzero RewriteFactor in StrengthReduceStridedIVUsers).
      In the testcase in question the new IV produced this way
      has both a nonconstant stride and a nonzero base, neither
      of which was handled before.  (This patch does not handle 
      all the cases where this can happen.)  And when inserting 
      new code that feeds into a PHI, it's right to put such 
      code at the original location rather than in the PHI's 
      immediate predecessor(s) when the original location is outside 
      the loop (a case that couldn't happen before)
      (RewriteInstructionToUseNewBase); better to avoid making
      multiple copies of it in this case.
      
      Everything above is exercised in
      CodeGen/X86/lsr-negative-stride.ll (and ifcvt4 in ARM which is
      the same IR).
      
      llvm-svn: 61178
      12d031b7
  5. Dec 16, 2008
  6. Dec 09, 2008
  7. Dec 05, 2008
  8. Dec 03, 2008
  9. Dec 02, 2008
  10. Dec 01, 2008
  11. Nov 29, 2008
  12. Nov 28, 2008
  13. Oct 23, 2008
    • Daniel Dunbar's avatar
      Change create*Pass factory functions to return Pass* instead of · 7f39e2d8
      Daniel Dunbar authored
      LoopPass*.
       - Although less precise, this means they can be used in clients
         without RTTI (who would otherwise need to include LoopPass.h, which
         eventually includes things using dynamic_cast). This was the
         simplest solution that presented itself, but I am happy to use a
         better one if available.
      
      llvm-svn: 58010
      7f39e2d8
  14. Oct 01, 2008
  15. Sep 15, 2008
    • Dan Gohman's avatar
      Teach LSR to optimize away SMAX operations for tripcounts in common · 68e7735a
      Dan Gohman authored
      cases.  See the comment above OptimizeSMax for the full story, and
      the testcase for an example. This cancels out a pessimization
      commonly attributed to indvars, and will allow us to lift some of
      the artificial throttles in indvars, rather than add new ones.
      
      llvm-svn: 56230
      68e7735a
  16. Sep 09, 2008
  17. Sep 08, 2008
  18. Sep 04, 2008
  19. Sep 03, 2008
  20. Aug 27, 2008
  21. Aug 26, 2008
  22. Aug 17, 2008
  23. Aug 15, 2008
Loading