Skip to content
  1. Feb 10, 2008
  2. Jan 12, 2008
  3. Jan 11, 2008
    • Chris Lattner's avatar
      Simplify the side effect stuff a bit more and make licm/sinking · c8226f32
      Chris Lattner authored
      both work right according to the new flags.
      
      This removes the TII::isReallySideEffectFree predicate, and adds
      TII::isInvariantLoad. 
      
      It removes NeverHasSideEffects+MayHaveSideEffects and adds
      UnmodeledSideEffects as machine instr flags.  Now the clients
      can decide everything they need.
      
      I think isRematerializable can be implemented in terms of the
      flags we have now, though I will let others tackle that.
      
      llvm-svn: 45843
      c8226f32
  4. Jan 10, 2008
  5. Jan 05, 2008
  6. Jan 04, 2008
    • Chris Lattner's avatar
      Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking. · f3edc09f
      Chris Lattner authored
      It is missing validity checks, so it is known broken.  However, it is powerful enough
      to compile this contrived code:
      
      void test1(int C, double A, double B, double *P) {
        double Tmp = A*A+B*B;
        *P = C ? Tmp : A;
      }
      
      into:
      
      _test1:
      	movsd	8(%esp), %xmm0
      	cmpl	$0, 4(%esp)
      	je	LBB1_2	# entry
      LBB1_1:	# entry
      	movsd	16(%esp), %xmm1
      	mulsd	%xmm1, %xmm1
      	mulsd	%xmm0, %xmm0
      	addsd	%xmm1, %xmm0
      LBB1_2:	# entry
      	movl	24(%esp), %eax
      	movsd	%xmm0, (%eax)
      	ret
      
      instead of:
      
      _test1:
      	movsd	16(%esp), %xmm0
      	mulsd	%xmm0, %xmm0
      	movsd	8(%esp), %xmm1
      	movapd	%xmm1, %xmm2
      	mulsd	%xmm2, %xmm2
      	addsd	%xmm0, %xmm2
      	cmpl	$0, 4(%esp)
      	je	LBB1_2	# entry
      LBB1_1:	# entry
      	movapd	%xmm2, %xmm1
      LBB1_2:	# entry
      	movl	24(%esp), %eax
      	movsd	%xmm1, (%eax)
      	ret
      
      woo.
      
      llvm-svn: 45570
      f3edc09f
Loading