[PATCH] D39446: [PGO] Detect more structural changes with the stable hash
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 10 15:59:29 PST 2017
vsk added inline comments.
================
Comment at: lib/CodeGen/CodeGenPGO.cpp:244
+ DEFINE_NESTABLE_TRAVERSAL(CXXTryStmt)
+ DEFINE_NESTABLE_TRAVERSAL(CXXCatchStmt)
+
----------------
arphaman wrote:
> What about `ObjCAtTryStmt`?
I thought about this, but: we don't place a counter on ObjC at-try's, so it seems a bit moot to invalidate the profile if we see one change.
================
Comment at: lib/CodeGen/CodeGenPGO.cpp:321
+ return PGOHash::ReturnStmt;
+ case Stmt::CXXThrowExprClass:
+ return PGOHash::ThrowExpr;
----------------
arphaman wrote:
> Might as well include the `ObjCAtThrowStmt` as well.
If profiling at-try isn't very important, I'm not sure the hash should be sensitive to at-throw either. I do see situations where it could be helpful, but IMO the potential benefit is outweighed by having extra invalidations.
https://reviews.llvm.org/D39446
More information about the cfe-commits
mailing list