Skip to content
  1. Sep 05, 2010
    • Chris Lattner's avatar
      implement rdar://6653118 - fastisel should fold loads where possible. · eeba0c73
      Chris Lattner authored
      Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
      for example, before, this code:
      
      int foo(int x, int y, int z) {
        return x+y+z;
      }
      
      used to compile into:
      
      _foo:                                   ## @foo
      	subq	$12, %rsp
      	movl	%edi, 8(%rsp)
      	movl	%esi, 4(%rsp)
      	movl	%edx, (%rsp)
      	movl	8(%rsp), %edx
      	movl	4(%rsp), %esi
      	addl	%edx, %esi
      	movl	(%rsp), %edx
      	addl	%esi, %edx
      	movl	%edx, %eax
      	addq	$12, %rsp
      	ret
      
      Now we produce:
      
      _foo:                                   ## @foo
      	subq	$12, %rsp
      	movl	%edi, 8(%rsp)
      	movl	%esi, 4(%rsp)
      	movl	%edx, (%rsp)
      	movl	8(%rsp), %edx
      	addl	4(%rsp), %edx    ## Folded load
      	addl	(%rsp), %edx     ## Folded load
      	movl	%edx, %eax
      	addq	$12, %rsp
      	ret
      
      Fewer instructions and less register use = faster compiles.
      
      llvm-svn: 113102
      eeba0c73
  2. Sep 03, 2010
  3. Sep 02, 2010
  4. Sep 01, 2010
  5. Aug 31, 2010
  6. Aug 30, 2010
  7. Aug 28, 2010
  8. Aug 27, 2010
  9. Aug 26, 2010
  10. Aug 25, 2010
  11. Aug 23, 2010
  12. Aug 20, 2010
    • Bob Wilson's avatar
      If the target says that an extending load is not legal, regardless of whether · c56fef4e
      Bob Wilson authored
      it involves specific floating-point types, legalize should expand an
      extending load to a non-extending load followed by a separate extend operation.
      For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
      assert that EXTLOAD should always be supported).  Now we can expand that to
      LOAD+SIGN_EXTEND.  This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
      to be used for NEON.
      
      llvm-svn: 111586
      c56fef4e
  13. Aug 18, 2010
  14. Aug 17, 2010
  15. Aug 10, 2010
  16. Aug 06, 2010
Loading