Skip to content
  1. Oct 21, 2008
    • Dan Gohman's avatar
      Optimized FCMP_OEQ and FCMP_UNE for x86. · 97d95d6d
      Dan Gohman authored
      Where previously LLVM might emit code like this:
      
              ucomisd %xmm1, %xmm0
              setne   %al
              setp    %cl
              orb     %al, %cl
              jne     .LBB4_2
      
      it now emits this:
      
              ucomisd %xmm1, %xmm0
              jne     .LBB4_2
              jp      .LBB4_2
      
      It has fewer instructions and uses fewer registers, but it does
      have more branches. And in the case that this code is followed by
      a non-fallthrough edge, it may be followed by a jmp instruction,
      resulting in three branch instructions in sequence. Some effort
      is made to avoid this situation.
      
      To achieve this, X86ISelLowering.cpp now recognizes FCMP_OEQ and
      FCMP_UNE in lowered form, and replace them with code that emits
      two branches, except in the case where it would require converting
      a fall-through edge to an explicit branch.
      
      Also, X86InstrInfo.cpp's branch analysis and transform code now
      knows now to handle blocks with multiple conditional branches. It
      uses loops instead of having fixed checks for up to two
      instructions. It can now analyze and transform code generated
      from FCMP_OEQ and FCMP_UNE.
      
      llvm-svn: 57873
      97d95d6d
    • Dan Gohman's avatar
      When the coalescer is doing rematerializing, have it remove · c835458d
      Dan Gohman authored
      the copy instruction from the instruction list before asking the
      target to create the new instruction. This gets the old instruction
      out of the way so that it doesn't interfere with the target's
      rematerialization code. In the case of x86, this helps it find
      more cases where EFLAGS is not live.
      
      Also, in the X86InstrInfo.cpp, teach isSafeToClobberEFLAGS to check
      to see if it reached the end of the block after scanning each
      instruction, instead of just before. This lets it notice when the
      end of the block is only two instructions away, without doing any
      additional scanning.
      
      These changes allow rematerialization to clobber EFLAGS in more
      cases, for example using xor instead of mov to set the return value
      to zero in the included testcase.
      
      llvm-svn: 57872
      c835458d
    • Dan Gohman's avatar
      Make the NaN test come second, heuristically assuming · 97d3f6cf
      Dan Gohman authored
      that NaNs are less common.
      
      llvm-svn: 57871
      97d3f6cf
    • Dan Gohman's avatar
      72e66eed
    • Oscar Fuentes's avatar
      CMake: updated lib/CodeGen/CMakeLists.txt · 0e12e5b1
      Oscar Fuentes authored
      llvm-svn: 57869
      0e12e5b1
    • Dan Gohman's avatar
      Fix a bug that prevented llvm-extract -delete from working. · fa29b67a
      Dan Gohman authored
      llvm-svn: 57864
      fa29b67a
    • Chris Lattner's avatar
      Fix gcc.c-torture/compile/920520-1.c by inserting bitconverts · 4396e0d2
      Chris Lattner authored
      for strange asm conditions earlier.  In this case, we have a
      double being passed in an integer reg class.  Convert to like
      sized integer register so that we allocate the right number 
      for the class (two i32's for the f64 in this case).
      
      llvm-svn: 57862
      4396e0d2
  2. Oct 20, 2008
  3. Oct 19, 2008
  4. Oct 18, 2008
  5. Oct 17, 2008
Loading