Skip to content
  1. Oct 18, 2011
  2. Oct 17, 2011
  3. Oct 16, 2011
  4. Oct 15, 2011
    • Duncan Sands's avatar
      Don't replace all dominated uses if there is only one use, since that · f537a6ed
      Duncan Sands authored
      use can't be dominated, saving one domtree lookup.
      
      llvm-svn: 142066
      f537a6ed
    • Andrew Trick's avatar
      Fix indvars randomness by removing iteration over a map. · d50861c8
      Andrew Trick authored
      I rewrote the algorithm a while back so it doesn't require map lookup,
      but neglected to change the data structure. This was caught by
      llvm-gcc self host, not because there's anything special about
      llvm-gcc, but because it is the only test for nondeterminism we
      currently have. Unit tests don't work well for everything; we should
      always try to have a nondeterminism stress test running.
      
      Fixes PR11133: llvm-gcc self host .o mismatch after enable-iv-rewrite=false
      
      llvm-svn: 142036
      d50861c8
  5. Oct 14, 2011
  6. Oct 13, 2011
  7. Oct 12, 2011
  8. Oct 11, 2011
  9. Oct 08, 2011
  10. Oct 07, 2011
  11. Oct 06, 2011
    • Eli Friedman's avatar
      PR11061: Make simplifylibcalls fold strcmp("", x) correctly. · 3e3aecbc
      Eli Friedman authored
      While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp.
      
      llvm-svn: 141227
      3e3aecbc
  12. Oct 05, 2011
    • Jim Grosbach's avatar
      Re-commit 141203, but much more conservative. · e7abae04
      Jim Grosbach authored
      Just pull the instruction name, but don't change the order of anything
      else. That keeps --debug happy and non-crashing, but doesn't change
      how the worklist gets built.
      
      llvm-svn: 141210
      e7abae04
    • Jim Grosbach's avatar
      Revert 141203. InstCombine is looping on unit tests. · 8f9acfac
      Jim Grosbach authored
      llvm-svn: 141209
      8f9acfac
    • Jim Grosbach's avatar
      Update InstCombine worklist after instruction transform is complete. · e37e0301
      Jim Grosbach authored
      When updating the worklist for InstCombine, the Add/AddUsersToWorklist
      functions may access the instruction(s) being added, for debug output for
      example. If the instructions aren't yet added to the basic block, this
      can result in a crash. Finish the instruction transformation before
      adjusting the worklist instead.
      
      rdar://10238555
      
      llvm-svn: 141203
      e37e0301
    • Duncan Sands's avatar
      GVN does simple propagation of conditions: when it sees a conditional · f4f47ccd
      Duncan Sands authored
      branch "br i1 %x, label %if_true, label %if_false" then it replaces
      "%x" with "true" in places only reachable via the %if_true arm, and
      with "false" in places only reachable via the %if_false arm.  Except
      that actually it doesn't: if value numbering shows that %y is equal
      to %x then, yes, %y will be turned into true/false in this way, but
      any occurrences of %x itself are not transformed.  Fix this.  What's
      more, it's often the case that %x is an equality comparison such as
      "%x = icmp eq %A, 0", in which case every occurrence of %A that is
      only reachable via the %if_true arm can be replaced with 0.  Implement
      this and a few other variations on this theme.  This reduces the number
      of lines of LLVM IR in "GCC as one big file" by 0.2%.  It has a bigger
      impact on Ada code, typically reducing the number of lines of bitcode
      by around 0.4% by removing repeated compiler generated checks.  Passes
      the LLVM nightly testsuite and the Ada ACATS testsuite.
      
      llvm-svn: 141177
      f4f47ccd
    • Duncan Sands's avatar
      Generalize GVN's conditional propagation logic slightly: · e90dd058
      Duncan Sands authored
      it's OK for the false/true destination to have multiple
      predecessors as long as the extra ones are dominated by
      the branch destination.
      
      llvm-svn: 141176
      e90dd058
  13. Oct 04, 2011
  14. Oct 02, 2011
  15. Oct 01, 2011
    • Andrew Trick's avatar
      Inlining and unrolling heuristics should be aware of free truncs. · f7656015
      Andrew Trick authored
      We want heuristics to be based on accurate data, but more importantly
      we don't want llvm to behave randomly. A benign trunc inserted by an
      upstream pass should not cause a wild swings in optimization
      level. See PR11034. It's a general problem with threshold-based
      heuristics, but we can make it less bad.
      
      llvm-svn: 140919
      f7656015
    • Andrew Trick's avatar
      whitespace · caa500bf
      Andrew Trick authored
      llvm-svn: 140916
      caa500bf
  16. Sep 30, 2011
    • Jim Grosbach's avatar
      Don't modify constant in-place. · 011dafba
      Jim Grosbach authored
      llvm-svn: 140875
      011dafba
    • Jim Grosbach's avatar
      float comparison to double 'zero' constant can just be a float 'zero.' · 24ff8346
      Jim Grosbach authored
      InstCombine was incorrectly considering the conversion of the constant
      zero to be unsafe.
      
      We want to transform:
      define float @bar(float %x) nounwind readnone optsize ssp {
        %conv = fpext float %x to double
        %cmp = fcmp olt double %conv, 0.000000e+00
        %conv1 = zext i1 %cmp to i32
        %conv2 = sitofp i32 %conv1 to float
        ret float %conv2
      }
      
      Into:
      define float @bar(float %x) nounwind readnone optsize ssp {
        %cmp = fcmp olt float %x, 0.000000e+00   ; <---- This
        %conv1 = zext i1 %cmp to i32
        %conv2 = sitofp i32 %conv1 to float
        ret float %conv2
      }
      
      
      rdar://10215914
      
      llvm-svn: 140869
      24ff8346
    • Jim Grosbach's avatar
      Tidy up. Trailing whitespace. · 129c52af
      Jim Grosbach authored
      llvm-svn: 140865
      129c52af
    • Duncan Sands's avatar
      Inlining often produces landingpad instructions with repeated · 5c05579f
      Duncan Sands authored
      catch or repeated filter clauses.  Teach instcombine a bunch
      of tricks for simplifying landingpad clauses.  Currently the
      code only recognizes the GNU C++ and Ada personality functions,
      but that doesn't stop it doing a bunch of "generic" transforms
      which are hopefully fine for any real-world personality function.
      If these "generic" transforms turn out not to be generic, they
      can always be conditioned on the personality function.  Probably
      someone should add the ObjC++ personality function.  I didn't as
      I don't know anything about it.
      
      llvm-svn: 140852
      5c05579f
Loading