Skip to content
  1. Jun 30, 2010
    • Duncan Sands's avatar
      Rather than giving SmallPtrSetImpl a member field SmallArray which is magically · 7b90966d
      Duncan Sands authored
      replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a
      pointer to the start of the storage, and have SmallPtrSet pass in the value to use.
      This has the disadvantage that SmallPtrSet becomes bigger by one pointer.  It has
      the advantage that it no longer uses tricky C++ rules, and is clearly correct while
      I'm not sure the previous version was.  This was inspired by g++-4.6 pointing out
      that SmallPtrSetImpl was writing off the end of SmallArray, which it was.  Since
      SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to
      valid memory.  But it was writing off the end of the declared array type - sounds
      kind of dubious to me, like it sounded dubious to g++-4.6.  Maybe g++-4.6 is wrong
      and this construct is perfectly valid and correctly compiled by all compilers, but
      I think it is better to avoid the whole can of worms by avoiding this construct.
      
      llvm-svn: 107285
      7b90966d
  2. Jun 28, 2010
  3. Jun 25, 2010
  4. Jun 24, 2010
  5. Jun 22, 2010
  6. Jun 19, 2010
  7. Jun 18, 2010
    • Dan Gohman's avatar
      Give NamedRegionTimer an Enabled flag, allowing all its clients to · 6e681a5f
      Dan Gohman authored
      switch from this:
      
        if (TimePassesIsEnabled) {
          NamedRegionTimer T(Name, GroupName);
          do_something();
        } else {
          do_something(); // duplicate the code, this time without a timer!
        }
      
      to this:
      
        {
          NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled);
          do_something();
        }
      
      llvm-svn: 106285
      6e681a5f
  8. Jun 17, 2010
  9. Jun 15, 2010
  10. Jun 08, 2010
  11. May 28, 2010
  12. May 27, 2010
  13. May 26, 2010
  14. May 21, 2010
  15. May 19, 2010
  16. May 18, 2010
  17. May 15, 2010
  18. May 10, 2010
  19. May 08, 2010
  20. May 06, 2010
  21. May 05, 2010
    • Chris Lattner's avatar
      Implement rdar://7415680 - Twine integer support lacks greatness · d7f69cb7
      Chris Lattner authored
      Microoptimize Twine's with unsigned and int to not pin their value to
      the stack.  This saves stack space in common cases and allows mem2reg
      in the caller.  A simple example is:
      
      void foo(const Twine &);
      void bar(int x) {
        foo("xyz: " + Twine(x));
      }
      
      Before:
      
      __Z3bari:
      	subq	$40, %rsp
      	movl	%edi, 36(%rsp)
      	leaq	L_.str3(%rip), %rax
      	leaq	36(%rsp), %rcx
      	leaq	8(%rsp), %rdi
      	movq	%rax, 8(%rsp)
      	movq	%rcx, 16(%rsp)
      	movb	$3, 24(%rsp)
      	movb	$7, 25(%rsp)
      	callq	__Z3fooRKN4llvm5TwineE
      	addq	$40, %rsp
      	ret
      
      After:
      
      __Z3bari:
      	subq	$24, %rsp
      	leaq	L_.str3(%rip), %rax
      	movq	%rax, (%rsp)
      	movslq	%edi, %rax
      	movq	%rax, 8(%rsp)
      	movb	$3, 16(%rsp)
      	movb	$7, 17(%rsp)
      	leaq	(%rsp), %rdi
      	callq	__Z3fooRKN4llvm5TwineE
      	addq	$24, %rsp
      	ret
      
      It saves 16 bytes of stack and one instruction in this case.
      
      llvm-svn: 103107
      d7f69cb7
    • Benjamin Kramer's avatar
      Try again if write(2) reports an recoverable error. · ce84a255
      Benjamin Kramer authored
      This should fix mysteriously crashing boost regression tests when stderr is
      managed by bjam (PR7043).
      
      llvm-svn: 103085
      ce84a255
  22. Apr 19, 2010
  23. Apr 18, 2010
  24. Apr 15, 2010
  25. Apr 13, 2010
  26. Apr 09, 2010
Loading