aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: include/clang/AST/TypeLoc.h:513
 struct BuiltinLocInfo {
-  SourceLocation BuiltinLoc;
+  SourceRange BuiltinRange;
 };
----------------
malcolm.parsons wrote:
> aaron.ballman wrote:
> > malcolm.parsons wrote:
> > > aaron.ballman wrote:
> > > > malcolm.parsons wrote:
> > > > > aaron.ballman wrote:
> > > > > > malcolm.parsons wrote:
> > > > > > > aaron.ballman wrote:
> > > > > > > > Since this doubles the size of the type loc for builtin types, 
> > > > > > > > do you happen to have any data on what practical impact this 
> > > > > > > > has on RAM usage, say for bootstrapping LLVM (or compiling any 
> > > > > > > > large source base, really)? Hopefully it's not a lot, but it 
> > > > > > > > would be nice to know if it's a .1%, 1%, 10%, etc increase in 
> > > > > > > > usage (or does the change get lost in the noise).
> > > > > > > I don't have any data.
> > > > > > > I'm not sure how to collect that data.
> > > > > > It's likely platform dependent, but I was thinking something as 
> > > > > > simple as looking at peak RAM usage between two different builds of 
> > > > > > the compiler. Something like `top` would probably work if you're on 
> > > > > > Linux (unless someone knows of a better way, I'm not strong on 
> > > > > > Linux).
> > > > > Before:
> > > > > /usr/bin/time clang++ ... -c llvm/tools/clang/lib/AST/ExprConstant.cpp
> > > > > 5.56user 0.13system 0:05.91elapsed 96%CPU (0avgtext+0avgdata 
> > > > > 256820maxresident)k
> > > > > 
> > > > > After:
> > > > > /usr/bin/time clang++ ... -c llvm/tools/clang/lib/AST/ExprConstant.cpp
> > > > > 5.67user 0.12system 0:05.98elapsed 97%CPU (0avgtext+0avgdata 
> > > > > 256940maxresident)k
> > > > > 
> > > > > ((256940 - 256820) / 256820) * 100 = 0.05%
> > > > Thank you for this -- is there a bigger delta for compilation of LLVM 
> > > > as a whole? ExprConstant.cpp is an interesting case, but not really 
> > > > representative of the project as a whole (for instance, there's not a 
> > > > lot of template metaprogramming in ExprConstant.cpp).
> > > I can try running time on a full build.
> > > For every file I sampled the increase was 0.05%.
> > > Do TypeLocs increase when using TMP?
> > I *think* that template arguments use TypeLocs, but I could be remembering 
> > incorrectly (and I unfortunately won't have the chance to check until next 
> > week sometime). I was asking for the whole project just in case there is 
> > some construct that has a heavier use of them. Your findings of .05% are 
> > really promising though.
> Time reports max resident for building lib dir of llvm as 480780 before, 
> 480920 after.
> 0.03%
Awesome, thank you for getting this information; this seems like a reasonable 
consumption change to me.


https://reviews.llvm.org/D25363



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to