summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-12-21 15:20:32 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-12-21 15:20:32 +0000
commitc5885cffc52068f77ff1c75507513556ac0b8d2a (patch)
tree7ec20df05f5ce00a7c7087d5560c3896175ed89b /lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp
parentd800ee48615600a93c46bc77a1f8434cca1fb486 (diff)
downloadbcm5719-llvm-c5885cffc52068f77ff1c75507513556ac0b8d2a.tar.gz
bcm5719-llvm-c5885cffc52068f77ff1c75507513556ac0b8d2a.zip
[AST] Store the callee and argument expressions of CallExpr in a trailing array.
Since CallExpr::setNumArgs has been removed, it is now possible to store the callee expression and the argument expressions of CallExpr in a trailing array. This saves one pointer per CallExpr, CXXOperatorCallExpr, CXXMemberCallExpr, CUDAKernelCallExpr and UserDefinedLiteral. Given that CallExpr is used as a base of the above classes we cannot use llvm::TrailingObjects. Instead we store the offset in bytes from the this pointer to the start of the trailing objects and manually do the casts + arithmetic. Some notes: 1.) I did not try to fit the number of arguments in the bit-fields of Stmt. This leaves some space for future additions and avoid the discussion about whether x bits are sufficient to hold the number of arguments. 2.) It would be perfectly possible to recompute the offset to the trailing objects before accessing the trailing objects. However the trailing objects are frequently accessed and benchmarks show that it is slightly faster to just load the offset from the bit-fields. Additionally, because of 1), we have plenty of space in the bit-fields of Stmt. Differential Revision: https://reviews.llvm.org/D55771 Reviewed By: rjmccall llvm-svn: 349910
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud