[PATCH] D39446: [PGO] Detect more structural changes with the stable hash
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 31 09:51:46 PDT 2017
vsk planned changes to this revision.
vsk added a comment.
Apart from Alex's point, this patch is missing a compatibility test for v5 of the profile format, and is missing coverage for the new entries in `HashType`.
================
Comment at: lib/CodeGen/CodeGenPGO.cpp:186
+ if (Hash.getHashVersion() != PGO_HASH_V1)
+ Type = getHashType(Hash.getHashVersion(), S);
+
----------------
arphaman wrote:
> Am I missing something or will this call always return the same type as before since the first `if` will weed out statements which have hash only in v2 (since `getHashType(PGO_HASH_V1, S)` will return `None` for the new statements)?
You're right, I need to rethink this. At the moment, the hash only changes for IfStmts which have Else blocks.
https://reviews.llvm.org/D39446
More information about the cfe-commits
mailing list