Skip to content
  1. Aug 23, 2005
  2. Aug 22, 2005
  3. Aug 21, 2005
  4. Aug 20, 2005
  5. Aug 19, 2005
  6. Aug 18, 2005
  7. Aug 17, 2005
    • Jim Laskey's avatar
      Move the code dependency for MathExtras.h from SelectionDAGNodes.h. · d66e6165
      Jim Laskey authored
      Added some class dividers in SelectionDAG.cpp.
      
      llvm-svn: 22841
      d66e6165
    • Jim Laskey's avatar
      Culling out use of unions for converting FP to bits and vice versa. · b74c6661
      Jim Laskey authored
      llvm-svn: 22838
      b74c6661
    • Chris Lattner's avatar
      Fix a bug in RemoveDeadNodes where it would crash when its "optional" · ab0de9d7
      Chris Lattner authored
      argument is not specified.
      
      Implement ReplaceAllUsesWith.
      
      llvm-svn: 22834
      ab0de9d7
    • Jim Laskey's avatar
      686d6a1c
    • Jim Laskey's avatar
      Change hex float constants for the sake of VC++. · 898ba557
      Jim Laskey authored
      llvm-svn: 22828
      898ba557
    • Chris Lattner's avatar
      Add a new beta option for critical edge splitting, to avoid a problem that · c9950c11
      Chris Lattner authored
      Nate noticed in yacr2 (and I know occurs in other places as well).
      
      This is still rough, as the critical edge blocks are not intelligently placed
      but is added to get some idea to see if this improves performance.
      
      llvm-svn: 22825
      c9950c11
    • Chris Lattner's avatar
      Fix a regression on X86, where FP values can be promoted too. · ba28c273
      Chris Lattner authored
      llvm-svn: 22822
      ba28c273
    • Jim Laskey's avatar
      · f2516a91
      Jim Laskey authored
      Added generic code expansion for [signed|unsigned] i32 to [f32|f64] casts in the
      legalizer.  PowerPC now uses this expansion instead of ISel version.
      
      Example:
      
      // signed integer to double conversion
      double f1(signed x) {
        return (double)x;
      }
      
      // unsigned integer to double conversion
      double f2(unsigned x) {
        return (double)x;
      }
      
      // signed integer to float conversion
      float f3(signed x) {
        return (float)x;
      }
      
      // unsigned integer to float conversion
      float f4(unsigned x) {
        return (float)x;
      }
      
      
      Byte Code:
      
      internal fastcc double %_Z2f1i(int %x) {
      entry:
              %tmp.1 = cast int %x to double          ; <double> [#uses=1]
              ret double %tmp.1
      }
      
      internal fastcc double %_Z2f2j(uint %x) {
      entry:
              %tmp.1 = cast uint %x to double         ; <double> [#uses=1]
              ret double %tmp.1
      }
      
      internal fastcc float %_Z2f3i(int %x) {
      entry:
              %tmp.1 = cast int %x to float           ; <float> [#uses=1]
              ret float %tmp.1
      }
      
      internal fastcc float %_Z2f4j(uint %x) {
      entry:
              %tmp.1 = cast uint %x to float          ; <float> [#uses=1]
              ret float %tmp.1
      }
      
      internal fastcc double %_Z2g1i(int %x) {
      entry:
              %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
              %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
              store uint 1127219200, uint* %tmp.0
              %tmp.2 = cast int %x to uint            ; <uint> [#uses=1]
              %tmp.3 = xor uint %tmp.2, 2147483648            ; <uint> [#uses=1]
              %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
              store uint %tmp.3, uint* %tmp.5
              %tmp.9 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
              %tmp.10 = load double* %tmp.9           ; <double> [#uses=1]
              %tmp.13 = load double* cast (long* %signed_bias to double*)             ; <double> [#uses=1]
              %tmp.14 = sub double %tmp.10, %tmp.13           ; <double> [#uses=1]
              ret double %tmp.14
      }
      
      internal fastcc double %_Z2g2j(uint %x) {
      entry:
              %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
              %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
              store uint 1127219200, uint* %tmp.0
              %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
              store uint %x, uint* %tmp.1
              %tmp.4 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
              %tmp.5 = load double* %tmp.4            ; <double> [#uses=1]
              %tmp.8 = load double* cast (long* %unsigned_bias to double*)            ; <double> [#uses=1]
              %tmp.9 = sub double %tmp.5, %tmp.8              ; <double> [#uses=1]
              ret double %tmp.9
      }
      
      internal fastcc float %_Z2g3i(int %x) {
      entry:
              %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
              %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
              store uint 1127219200, uint* %tmp.0
              %tmp.2 = cast int %x to uint            ; <uint> [#uses=1]
              %tmp.3 = xor uint %tmp.2, 2147483648            ; <uint> [#uses=1]
              %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
              store uint %tmp.3, uint* %tmp.5
              %tmp.9 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
              %tmp.10 = load double* %tmp.9           ; <double> [#uses=1]
              %tmp.13 = load double* cast (long* %signed_bias to double*)             ; <double> [#uses=1]
              %tmp.14 = sub double %tmp.10, %tmp.13           ; <double> [#uses=1]
              %tmp.16 = cast double %tmp.14 to float          ; <float> [#uses=1]
              ret float %tmp.16
      }
      
      internal fastcc float %_Z2g4j(uint %x) {
      entry:
              %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
              %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
              store uint 1127219200, uint* %tmp.0
              %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
              store uint %x, uint* %tmp.1
              %tmp.4 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
              %tmp.5 = load double* %tmp.4            ; <double> [#uses=1]
              %tmp.8 = load double* cast (long* %unsigned_bias to double*)            ; <double> [#uses=1]
              %tmp.9 = sub double %tmp.5, %tmp.8              ; <double> [#uses=1]
              %tmp.11 = cast double %tmp.9 to float           ; <float> [#uses=1]
              ret float %tmp.11
      }
      
      
      PowerPC Code:
      
              .machine ppc970
      
      
              .const
              .align  2
      .CPIl1__Z2f1i_0:                                        ; float 0x4330000080000000
              .long   1501560836      ; float 4.5036e+15
              .text
              .align  2
              .globl  l1__Z2f1i
      l1__Z2f1i:
      .LBBl1__Z2f1i_0:        ; entry
              xoris r2, r3, 32768
              stw r2, -4(r1)
              lis r2, 17200
              stw r2, -8(r1)
              lfd f0, -8(r1)
              lis r2, ha16(.CPIl1__Z2f1i_0)
              lfs f1, lo16(.CPIl1__Z2f1i_0)(r2)
              fsub f1, f0, f1
              blr
      
      
              .const
              .align  2
      .CPIl2__Z2f2j_0:                                        ; float 0x4330000000000000
              .long   1501560832      ; float 4.5036e+15
              .text
              .align  2
              .globl  l2__Z2f2j
      l2__Z2f2j:
      .LBBl2__Z2f2j_0:        ; entry
              stw r3, -4(r1)
              lis r2, 17200
              stw r2, -8(r1)
              lfd f0, -8(r1)
              lis r2, ha16(.CPIl2__Z2f2j_0)
              lfs f1, lo16(.CPIl2__Z2f2j_0)(r2)
              fsub f1, f0, f1
              blr
      
      
              .const
              .align  2
      .CPIl3__Z2f3i_0:                                        ; float 0x4330000080000000
              .long   1501560836      ; float 4.5036e+15
              .text
              .align  2
              .globl  l3__Z2f3i
      l3__Z2f3i:
      .LBBl3__Z2f3i_0:        ; entry
              xoris r2, r3, 32768
              stw r2, -4(r1)
              lis r2, 17200
              stw r2, -8(r1)
              lfd f0, -8(r1)
              lis r2, ha16(.CPIl3__Z2f3i_0)
              lfs f1, lo16(.CPIl3__Z2f3i_0)(r2)
              fsub f0, f0, f1
              frsp f1, f0
              blr
      
      
              .const
              .align  2
      .CPIl4__Z2f4j_0:                                        ; float 0x4330000000000000
              .long   1501560832      ; float 4.5036e+15
              .text
              .align  2
              .globl  l4__Z2f4j
      l4__Z2f4j:
      .LBBl4__Z2f4j_0:        ; entry
              stw r3, -4(r1)
              lis r2, 17200
              stw r2, -8(r1)
              lfd f0, -8(r1)
              lis r2, ha16(.CPIl4__Z2f4j_0)
              lfs f1, lo16(.CPIl4__Z2f4j_0)(r2)
              fsub f0, f0, f1
              frsp f1, f0
              blr
      
      llvm-svn: 22814
      f2516a91
    • Chris Lattner's avatar
      add a new TargetConstant node · 0d2456e1
      Chris Lattner authored
      llvm-svn: 22813
      0d2456e1
  8. Aug 16, 2005
    • Chris Lattner's avatar
      Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef) · 33182325
      Chris Lattner authored
      used to tack a register number onto the node.
      
      Instead of doing this, make a new node, RegisterSDNode, which is a leaf
      containing a register number.  These three operations just become normal
      DAG nodes now, instead of requiring special handling.
      
      Note that with this change, it is no longer correct to make illegal
      CopyFromReg/CopyToReg nodes.  The legalizer will not touch them, and this
      is bad, so don't do it. :)
      
      llvm-svn: 22806
      33182325
Loading