Skip to content
  1. Jun 24, 2011
  2. Jun 23, 2011
  3. Jun 22, 2011
  4. Jun 21, 2011
    • Daniel Dunbar's avatar
      IRgen: Add a -fuse-register-sized-bitfield-access option, for testing. · d3f3d932
      Daniel Dunbar authored
       - Changes bit-field access policy to try to use (aligned) register sized accesses.
      
      The idea here is that by using larger accesses we expose more coalescing
      potential to the backend when we have situations like adjacent bit-fields in the
      same structure (which is common), and that the backend should be smart enough to
      narrow the accesses down when no coalescing is done or when it is shown not to
      be profitable.
      
      --
      $ clang -m32 -O3 -S -o - t.c
      _f0:                                    ## @f0
      	pushl	%ebp
      	movl	%esp, %ebp
      	movl	8(%ebp), %eax
      	movb	(%eax), %cl
      	andb	$-128, %cl
      	orb	$1, %cl
      	movb	%cl, (%eax)
      	movb	1(%eax), %cl
      	andb	$-128, %cl
      	orb	$1, %cl
      	movb	%cl, 1(%eax)
      	movb	2(%eax), %cl
      	andb	$-128, %cl
      	orb	$1, %cl
      	movb	%cl, 2(%eax)
      	movb	3(%eax), %cl
      	andb	$-128, %cl
      	orb	$1, %cl
      	movb	%cl, 3(%eax)
      	popl	%ebp
      	ret
      
      $ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
      _f0:                                    ## @f0
      	pushl	%ebp
      	movl	%esp, %ebp
      	movl	8(%ebp), %eax
      	movl	$-2139062144, %ecx      ## imm = 0xFFFFFFFF80808080
      	andl	(%eax), %ecx
      	orl	$16843009, %ecx         ## imm = 0x1010101
      	movl	%ecx, (%eax)
      	popl	%ebp
      	ret
      --
      
      llvm-svn: 133532
      d3f3d932
    • Daniel Dunbar's avatar
      IRgen: Add CGOptions to CGTypes. · 0de2faae
      Daniel Dunbar authored
      llvm-svn: 133530
      0de2faae
    • Douglas Gregor's avatar
      A few tweaks to MaterializeTemporaryExpr suggested by John. · d410c08e
      Douglas Gregor authored
      llvm-svn: 133528
      d410c08e
    • Douglas Gregor's avatar
      Introduce a new AST node describing reference binding to temporaries. · fe31481f
      Douglas Gregor authored
      MaterializeTemporaryExpr captures a reference binding to a temporary
      value, making explicit that the temporary value (a prvalue) needs to
      be materialized into memory so that its address can be used. The
      intended AST invariant here is that a reference will always bind to a
      glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
      into glvalues for that binding to happen. For example, given
      
        const int& r = 1.0;
      
      The initializer of "r" will be a MaterializeTemporaryExpr whose
      subexpression is an implicit conversion from the double literal "1.0"
      to an integer value. 
      
      IR generation benefits most from this new node, since it was
      previously guessing (badly) when to materialize temporaries for the
      purposes of reference binding. There are likely more refactoring and
      cleanups we could perform there, but the introduction of
      MaterializeTemporaryExpr fixes PR9565, a case where IR generation
      would effectively bind a const reference directly to a bitfield in a
      struct. Addresses <rdar://problem/9552231>.
      
      llvm-svn: 133521
      fe31481f
    • NAKAMURA Takumi's avatar
      De-Unicode-ify in comments. · 5364847a
      NAKAMURA Takumi authored
      llvm-svn: 133501
      5364847a
    • Nick Lewycky's avatar
      Add support for -Wa,--noexecstack when building from a non-assembly file. For · ca6b90d8
      Nick Lewycky authored
      an assembly file it worked correctly, while for a .c file it would given an
      error about how --noexecstack is not a supported argument to -Wa.
      
      llvm-svn: 133489
      ca6b90d8
    • Eric Christopher's avatar
      Canonicalize register names properly. · b4a791f7
      Eric Christopher authored
      Fixes rdar://9425559
      
      llvm-svn: 133486
      b4a791f7
  5. Jun 20, 2011
    • Fariborz Jahanian's avatar
      llvm-gcc treats a tentative definition with a previous · ab578bf3
      Fariborz Jahanian authored
      (or follow up) extern declaration with weak_import as 
      an actual definition. make clang follows this behavior. 
      // rdar://9538608
      llvm-gcc treats an extern declaration with weak_import
      
      llvm-svn: 133450
      ab578bf3
    • Jay Foad's avatar
      Change how PHINodes store their operands. · e03c05c3
      Jay Foad authored
      Change PHINodes to store simple pointers to their incoming basic blocks,
      instead of full-blown Uses.
      
      Note that this loses an optimization in SplitCriticalEdge(), because we
      can no longer walk the use list of a BasicBlock to find phi nodes. See
      the comment I removed starting "However, the foreach loop is slow for
      blocks with lots of predecessors".
      
      Extend replaceAllUsesWith() on a BasicBlock to also update any phi
      nodes in the block's successors. This mimics what would have happened
      when PHINodes were proper Users of their incoming blocks. (Note that
      this only works if OldBB->replaceAllUsesWith(NewBB) is called when
      OldBB still has a terminator instruction, so it still has some
      successors.)
      
      llvm-svn: 133435
      e03c05c3
    • Francois Pichet's avatar
      Remove more unnecessary #include <llvm/ADT/SmallVector.h> · 1b8d5dda
      Francois Pichet authored
      llvm-svn: 133418
      1b8d5dda
    • Chris Lattner's avatar
      Update to match mainline ConstantStruct::get API change. Also, use · e64d7ba1
      Chris Lattner authored
      ConvertType on InitListExprs as they are being converted.  This is
      needed for a forthcoming patch, and improves the IR generated anyway
      (see additional type names in testcases). 
      
      This patch also converts a bunch of std::vector's in CGObjCMac to use
      C arrays.  There are a ton more that should be converted as well.
      
      llvm-svn: 133413
      e64d7ba1
  6. Jun 19, 2011
  7. Jun 18, 2011
  8. Jun 17, 2011
  9. Jun 16, 2011
  10. Jun 15, 2011
  11. Jun 14, 2011
Loading