Skip to content
  1. Oct 15, 2011
  2. Oct 14, 2011
  3. Oct 07, 2011
    • Duncan Sands's avatar
      Teach GVN to also propagate switch cases. For example, in this code · c52af464
      Duncan Sands authored
        switch (n) {
          case 27:
            do_something(x);
          ...
        }
      the call do_something(x) will be replaced with do_something(27).  In
      gcc-as-one-big-file this results in the removal of about 500 lines of
      bitcode (about 0.02%), so has about 1/10 of the effect of propagating
      branch conditions.
      
      llvm-svn: 141360
      c52af464
  4. Oct 05, 2011
    • 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
  5. Sep 27, 2011
  6. Sep 02, 2011
  7. Aug 18, 2011
  8. Aug 17, 2011
    • Bill Wendling's avatar
      Disable PRE for landing pads. · 8bbcbede
      Bill Wendling authored
      PRE needs the landing pads to have their critical edges split. Doing this for a
      landing pad is non-trivial. Abandon the attempt to perform PRE when we come
      across a landing pad. (Reviewed by Owen!)
      
      llvm-svn: 137876
      8bbcbede
  9. Jul 21, 2011
  10. Jul 18, 2011
  11. Jul 09, 2011
  12. Jul 08, 2011
  13. Jun 20, 2011
    • Jay Foad's avatar
      Make better use of the PHINode API. · 372ad64b
      Jay Foad authored
      Change various bits of code to make better use of the existing PHINode
      API, to insulate them from forthcoming changes in how PHINodes store
      their operands.
      
      llvm-svn: 133434
      372ad64b
  14. Jun 15, 2011
  15. May 22, 2011
  16. May 17, 2011
  17. May 05, 2011
  18. Apr 28, 2011
  19. Apr 26, 2011
    • Chris Lattner's avatar
      Improve the bail-out predicate to really only kick in when phi · eb045f9c
      Chris Lattner authored
      translation fails.  We were bailing out in some cases that would
      cause us to miss GVN'ing some non-local cases away.
      
      llvm-svn: 130206
      eb045f9c
    • Chris Lattner's avatar
      Enhance MemDep: When alias analysis returns a partial alias result, · 6f83d06f
      Chris Lattner authored
      return it as a clobber.  This allows GVN to do smart things.
      
      Enhance GVN to be smart about the case when a small load is clobbered
      by a larger overlapping load.  In this case, forward the value.  This
      allows us to compile stuff like this:
      
      int test(void *P) {
        int tmp = *(unsigned int*)P;
        return tmp+*((unsigned char*)P+1);
      }
      
      into:
      
      _test:                                  ## @test
      	movl	(%rdi), %ecx
      	movzbl	%ch, %eax
      	addl	%ecx, %eax
      	ret
      
      which has one load.  We already handled the case where the smaller
      load was from a must-aliased base pointer.
      
      llvm-svn: 130180
      6f83d06f
  20. Mar 30, 2011
  21. Jan 24, 2011
    • Dan Gohman's avatar
      Give GetUnderlyingObject a TargetData, to keep it in sync · 0f124e19
      Dan Gohman authored
      with BasicAA's DecomposeGEPExpression, which recently began
      using a TargetData. This fixes PR8968, though the testcase
      is awkward to reduce.
      
      Also, update several off GetUnderlyingObject's users
      which happen to have a TargetData handy to pass it in.
      
      llvm-svn: 124134
      0f124e19
  22. Jan 11, 2011
  23. Jan 04, 2011
Loading