Skip to content
  1. Jun 16, 2007
    • Chris Lattner's avatar
      Finally bite the bullet and make the major change: split the clang namespace · 23b7eb67
      Chris Lattner authored
      out of the llvm namespace.  This makes the clang namespace be a sibling of
      llvm instead of being a child.
      
      The good thing about this is that it makes many things unambiguous.  The
      bad things is that many things in the llvm namespace (notably data structures
      like smallvector) now require an llvm:: qualifier.  IMO, libsystem and libsupport
      should be split out of llvm into their own namespace in the future, which will fix
      this issue.
      
      llvm-svn: 39659
      23b7eb67
  2. Jun 15, 2007
  3. Jun 13, 2007
    • Chris Lattner's avatar
      Implement implicit conversions in return stmts. · cf98efa7
      Chris Lattner authored
      llvm-svn: 39653
      cf98efa7
    • 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
  4. Jun 11, 2007
  5. Jun 09, 2007
  6. Jun 06, 2007
  7. Jun 05, 2007
  8. Jun 03, 2007
    • Chris Lattner's avatar
      Type::isSignedInteger() and isUnsignedInteger() did not properly account for · b16f455e
      Chris Lattner authored
      'char', which varies based on the target.
      
      Instead of spreading target knowledge throughout the compiler, bifurcate char
      into Char_S and Char_U, and have ASTContext create the right one based on the
      target, when it starts up.
      
      llvm-svn: 39577
      b16f455e
    • 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
      Change EmitUsualArithmeticConversions to use EmitExprWithUsualUnaryConversions. · c18f9d1a
      Chris Lattner authored
      This allows us to compile:
      
        register short X;
        {
          int Y;
          return 1+X+Y;
      
      into:
      
              %tmp = load i16* %X             ; <i16> [#uses=1]
              %promote = sext i16 %tmp to i32         ; <i32> [#uses=1]
              %tmp1 = add i32 1, %promote             ; <i32> [#uses=1]
              %tmp2 = load i32* %Y            ; <i32> [#uses=1]
              %tmp3 = add i32 %tmp1, %tmp2            ; <i32> [#uses=1]
              ret i32 %tmp3
      
      Look at the amazing sign extension, so much happier than an assertion failure. :)
      
      llvm-svn: 39565
      c18f9d1a
    • 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
  9. Jun 02, 2007
  10. Jun 01, 2007
  11. May 31, 2007
  12. May 30, 2007
  13. May 28, 2007
  14. May 24, 2007
Loading