Skip to content
  1. Jul 21, 2007
  2. Jul 18, 2007
  3. Jul 16, 2007
  4. Jul 13, 2007
  5. Jul 12, 2007
  6. Jul 10, 2007
  7. Jun 29, 2007
  8. Jun 23, 2007
  9. Jun 22, 2007
  10. Jun 20, 2007
  11. Jun 16, 2007
  12. Jun 15, 2007
    • Chris Lattner's avatar
      implement codegen of calls. We can now compile: · 2b228c95
      Chris Lattner authored
      double foo( int (*FP)(int, int, int)) {
        return FP(1, 2, 3);
      }
      
      to:
      
      define double @foo(i32 (i32, i32, i32)* %FP) {
      entry:
              %call = tail call i32 %FP( i32 1, i32 2, i32 3 )
              %conv = sitofp i32 %call to double
              ret double %conv
      }
      
      llvm-svn: 39658
      2b228c95
  13. Jun 13, 2007
    • Chris Lattner's avatar
      Implement support for formal arguments. We can now compile this: · 53621a53
      Chris Lattner authored
      int test(int X, short Y, float Z) {
        return (int)(X*Y+Z);
      }
      
      to:
      
      define i32 @test(i32 %X, i16 %Y, float %Z) {
      entry:
              %promote = sext i16 %Y to i32           ; <i32> [#uses=1]
              %mul = mul i32 %promote, %X             ; <i32> [#uses=1]
              %promote3 = sitofp i32 %mul to float            ; <float> [#uses=1]
              %add = add float %promote3, %Z          ; <float> [#uses=1]
              %conv = fptosi float %add to i32                ; <i32> [#uses=1]
              ret i32 %conv
      }
      
      with:
      
      $ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis
      
      llvm-svn: 39652
      53621a53
  14. Jun 09, 2007
  15. Jun 06, 2007
  16. Jun 05, 2007
  17. Jun 03, 2007
    • Chris Lattner's avatar
      Implement EmitUsualArithmeticConversions, so we can add shorts to floats and · cf250248
      Chris Lattner authored
      ints to long long etc.  For int to longlong, we now get:
      
              %tmp = load i64* %F             ; <i64> [#uses=1]
              %tmp1 = load i32* %D            ; <i32> [#uses=1]
              %promote = sext i32 %tmp1 to i64                ; <i64> [#uses=1]
              %tmp2 = add i64 %tmp, %promote          ; <i64> [#uses=0]
      
      llvm-svn: 39576
      cf250248
    • Chris Lattner's avatar
      implement a first hack at codegen'ing the usual unary conversions. · 6db1fb84
      Chris Lattner authored
      This allows us to compile:
      
      int func() {
        int A[10];
        if (!A) {
      
      to:
      
      define i32 @func() {
      entry:
              %A = alloca [10 x i32]          ; <[10 x i32]*> [#uses=1]
              %arraydecay = getelementptr [10 x i32]* %A, i32 0, i32 0                ; <i32*> [#uses=1]
              %tobool = icmp ne i32* %arraydecay, null                ; <i1> [#uses=1]
              %lnot = xor i1 %tobool, true            ; <i1> [#uses=1]
              br i1 %lnot, label %ifthen, label %ifend
      
      -Chris
      
      llvm-svn: 39564
      6db1fb84
  18. Jun 02, 2007
Loading