Skip to content
  1. May 12, 2009
    • Bob Wilson's avatar
      Fix pr4195: When iterating through predecessor blocks, break out of the loop · 9e3d48f1
      Bob Wilson authored
      after finding the (unique) layout predecessor.  Sometimes a block may be listed
      more than once, and processing it more than once in this loop can lead to
      inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not
      clear these values.  There's no point in continuing the loop regardless.
      The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource
      test.
      
      llvm-svn: 71536
      9e3d48f1
    • Dan Gohman's avatar
      Factor the code for collecting IV users out of LSR into an IVUsers class, · d76d71a2
      Dan Gohman authored
      and generalize it so that it can be used by IndVarSimplify. Implement the
      base IndVarSimplify transformation code using IVUsers. This removes
      TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
      builtin overflow detection and folding logic to handle all the same cases,
      and more. Run "opt -iv-users -analyze -disable-output" on your favorite
      loop for an example of what IVUsers does.
      
      This lets IndVarSimplify eliminate IV casts and compute trip counts in
      more cases. Also, this happens to finally fix the remaining testcases
      in PR1301.
      
      Now that IndVarSimplify is being more aggressive, it occasionally runs
      into the problem where ScalarEvolutionExpander's code for avoiding
      duplicate expansions makes it difficult to ensure that all expanded
      instructions dominate all the instructions that will use them. As a
      temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
      to fix up instructions inserted by SCEVExpander. Fortunately, this code
      is contained, and can be easily removed once a more comprehensive
      solution is available.
      
      llvm-svn: 71535
      d76d71a2
    • Dan Gohman's avatar
      When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values. · ae451600
      Dan Gohman authored
      These values aren't analyzable, so they don't care if more information
      about the loop trip count can be had. Also, SCEVUnknown is used for
      a PHI while the PHI itself is being analyzed, so it needs to be left
      in the Scalars map. This fixes a variety of subtle issues.
      
      llvm-svn: 71533
      ae451600
    • Dan Gohman's avatar
      Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to · d6c04461
      Dan Gohman authored
      return the correct value when the cast operand is all zeros. This ought
      to be pretty rare, because it would mean that the regular SCEV folding
      routines missed a case, though there are cases they might legitimately
      miss. Also, it's unlikely anything currently using GetMinTrailingZeros
      cares about this case.
      
      llvm-svn: 71532
      d6c04461
    • Evan Cheng's avatar
      Avoid unneeded SIB byte encoding. Patch by Zoltan Varga. · 55173b76
      Evan Cheng authored
      llvm-svn: 71520
      55173b76
    • Bill Wendling's avatar
      - Record that the debug info is actually used so that the label folder doesn't · 6c60dbb3
      Bill Wendling authored
        blast it away.
      - Move InlineInfo bookkeeping to bookkeep the correct debug info object.
      
      llvm-svn: 71519
      6c60dbb3
    • Lang Hames's avatar
      Fixed PR4090. · f094cbbc
      Lang Hames authored
      llvm-svn: 71495
      f094cbbc
    • Evan Cheng's avatar
      Teach LSR to optimize more loop exit compares, i.e. change them to use postinc... · 78a4eb84
      Evan Cheng authored
      Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values.
      
      Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch.
      
      llvm-svn: 71485
      78a4eb84
  2. May 11, 2009
  3. May 10, 2009
  4. May 09, 2009
Loading