[cfe-commits] r63061 - in /cfe/trunk: include/clang/Parse/Action.h include/clang/Parse/Ownership.h lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/Sema.h lib/Sema/SemaExprObjC.cpp

Douglas Gregor dgregor at apple.com
Tue Jan 27 07:29:16 PST 2009


On Jan 27, 2009, at 2:19 AM, Sebastian Redl wrote:

> Douglas Gregor wrote:
>> Author: dgregor
>> Date: Mon Jan 26 16:44:13 2009
>> New Revision: 63061
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=63061&view=rev
>> Log:
>> Some micro-optimizations for DISABLE_SMART_POINTERS:
>>  - When it's safe, ActionResult uses the low bit of the pointer for
>>  the "invalid" flag rather than a separate "bool" value. This keeps
>>  GCC from generating some truly awful code, for a > 3x speedup in the
>>  result-passing microbenchmark.
>>
> Such an optimization should be possible for ASTOwningResult as well,
> even though it has to embed the bit in ASTOwningPtr's pointer.  
> Perhaps I
> should just do that, and then remove the distinction between the  
> two; it
> causes nothing but trouble anyway.

Sure, that'd clean things up nicely. Thanks!

   - Doug



More information about the cfe-commits mailing list