[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-15 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In D55658#1332249 , @riccibruno wrote: > In D55658#1332240 , @vsk wrote: > > > Thanks for working on this :). It’d be interesting to see some pre/post > > patch compile time numbers on CTMark.

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D55658#1332240 , @vsk wrote: > Thanks for working on this :). It’d be interesting to see some pre/post patch > compile time numbers on CTMark. > > Naive/strawman alternative here, but: what’s the impact on peak RSS and > co

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-15 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for working on this :). It’d be interesting to see some pre/post patch compile time numbers on CTMark. Naive/strawman alternative here, but: what’s the impact on peak RSS and compile time of just storing an ASTContext pointer in Decl/DeclContext? If it’s not out of

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 178259. riccibruno marked 3 inline comments as done. riccibruno added a comment. Addressed inline comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55658/new/ https://reviews.llvm.org/D55658 Files: include/clang/AS

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Just to expend on the instrumentation results: The measurement was done with all of Boost. I would take the estimation of the time wasted with a grain of salt since this is just `num_iterations * 10ns` which is obviously a very rough estimation. However on my machine

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a subscriber: rsmith. aaron.ballman added a comment. I'd like @rsmith's opinion on whether this is a good churn or not. I think it's mostly reasonable, but it's also a lot of changes for identical behavior and in some cases the changes

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added subscribers: cfe-commits, arphaman. Herald added a reviewer: shafik. `Decl::getASTContext` and `DeclContext::getParentASTContext` are not that cheap since they must walk ba