Skip to content
  1. Jul 07, 2010
  2. Jul 06, 2010
    • John McCall's avatar
      Make CGBuilderTy a typedef again; its functionality has been rolled back · 189223e2
      John McCall authored
      into IRBuilder.
      
      llvm-svn: 107687
      189223e2
    • John McCall's avatar
      When destroying a cleanup, kill any references to instructions in the entry · 2d605ac1
      John McCall authored
      block before deleting it.  Fixes PR7575.
      
      This really just a short-term fix before implementing lazy cleanups.
      
      llvm-svn: 107676
      2d605ac1
    • John McCall's avatar
      When creating functions to run global initializers and destructors, mark them · 466e2210
      John McCall authored
      as nounwind in -fno-exceptions.  Fixes rdar://problem/8090834.
      
      llvm-svn: 107639
      466e2210
    • John McCall's avatar
      Validated by nightly-test runs on x86 and x86-64 darwin, including after · bd30929e
      John McCall authored
      self-host.  Hopefully these results hold up on different platforms.  
      
      I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
      Reimplement how clang generates IR for exceptions.  Instead of creating new
      invoke destinations which sequentially chain to the previous destination,
      push a more semantic representation of *why* we need the cleanup/catch/filter
      behavior, then collect that information into a single landing pad upon request.
      
      Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
      control flow) are generated, since it's actually fairly closely tied in with
      the former.  Remove the need to track which cleanup scope a block is associated
      with.
      
      Document a lot of previously poorly-understood (by me, at least) behavior.
      
      The new framework implements the Horrible Hack (tm), which requires every
      landing pad to have a catch-all so that inlining will work.  Clang no longer
      requires the Horrible Hack just to make exceptions flow correctly within
      a function, however.  The HH is an unfortunate requirement of LLVM's EH IR.
      
      llvm-svn: 107631
      bd30929e
  3. Jul 05, 2010
  4. Jul 03, 2010
  5. Jul 01, 2010
  6. Jun 30, 2010
  7. Jun 29, 2010
    • Chris Lattner's avatar
      change ABIArgInfo to hold its llvm type with PATypeHolder so that · cccaad95
      Chris Lattner authored
      it doesn't dangle as types get refined.  This fixes Shootout-C++/lists1
      and probably also PR7522.
      
      llvm-svn: 107196
      cccaad95
    • Chris Lattner's avatar
      relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence · 34d6281a
      Chris Lattner authored
      of CanQualTypes to be passed in.
      
      llvm-svn: 107176
      34d6281a
    • Chris Lattner's avatar
      fix PR7519: after thrashing around and remembering how all this stuff · ab1e65e2
      Chris Lattner authored
      works, the fix is quite simple: just make sure to call ConvertTypeRecursive
      when the function type being lowered is in the midst of ConvertType.
      
      llvm-svn: 107173
      ab1e65e2
    • Chris Lattner's avatar
      minor cleanups. · e70a007b
      Chris Lattner authored
      llvm-svn: 107150
      e70a007b
    • Chris Lattner's avatar
      Change X86_64ABIInfo to have ASTContext and TargetData ivars to · 22a931e3
      Chris Lattner authored
      avoid passing ASTContext down through all the methods it has.
      
      When classifying an argument, or argument piece, as INTEGER, check
      to see if we have a pointer at exactly the same offset in the 
      preferred type.  If so, use that pointer type instead of i64.  This
      allows us to compile A function taking a stringref into something
      like this:
      
      define i8* @foo(i64 %D.coerce0, i8* %D.coerce1) nounwind ssp {
      entry:
        %D = alloca %struct.DeclGroup, align 8          ; <%struct.DeclGroup*> [#uses=4]
        %0 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
        store i64 %D.coerce0, i64* %0
        %1 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
        store i8* %D.coerce1, i8** %1
        %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
        %tmp1 = load i64* %tmp                          ; <i64> [#uses=1]
        %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
        %tmp3 = load i8** %tmp2                         ; <i8*> [#uses=1]
        %add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
        ret i8* %add.ptr
      }
      
      instead of this:
      
      define i8* @foo(i64 %D.coerce0, i64 %D.coerce1) nounwind ssp {
      entry:
        %D = alloca %struct.DeclGroup, align 8          ; <%struct.DeclGroup*> [#uses=3]
        %0 = insertvalue %0 undef, i64 %D.coerce0, 0    ; <%0> [#uses=1]
        %1 = insertvalue %0 %0, i64 %D.coerce1, 1       ; <%0> [#uses=1]
        %2 = bitcast %struct.DeclGroup* %D to %0*       ; <%0*> [#uses=1]
        store %0 %1, %0* %2, align 1
        %tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
        %tmp1 = load i64* %tmp                          ; <i64> [#uses=1]
        %tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
        %tmp3 = load i8** %tmp2                         ; <i8*> [#uses=1]
        %add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
        ret i8* %add.ptr
      }
      
      This implements rdar://7375902 - [codegen quality] clang x86-64 ABI lowering code punishing StringRef
      
      llvm-svn: 107123
      22a931e3
    • Chris Lattner's avatar
      plumb preferred types down into X86_64ABIInfo::classifyArgumentType, · 399d22ac
      Chris Lattner authored
      no functionality change.
      
      llvm-svn: 107115
      399d22ac
    • Chris Lattner's avatar
      Pass the LLVM IR version of argument types down into computeInfo. · 1d7c9f7f
      Chris Lattner authored
      This is somewhat annoying to do this at this level, but it avoids
      having ABIInfo know depend on CodeGenTypes for a hint.
      
      Nothing is using this yet, so no functionality change.
      
      llvm-svn: 107111
      1d7c9f7f
Loading