]> granicus.if.org Git - clang/commit
Some micro-optimizations for DISABLE_SMART_POINTERS:
authorDouglas Gregor <dgregor@apple.com>
Mon, 26 Jan 2009 22:44:13 +0000 (22:44 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 26 Jan 2009 22:44:13 +0000 (22:44 +0000)
commit5ac8aff3d7431dc7e4d64d960574a10c9f7e0078
tree0d53de6ca54215a3940a376038efee1eed32af42
parent7216dc9cb49f47254595120cf15a737cee53f0bd
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.
  - When DISABLE_SMART_POINTERS is defined, store an ActionResult
  within ASTOwningResult rather than an ASTOwningPtr. Brings the
  performance benefits of the above to smart pointers with
  DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
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