[PATCH] D54175: [PGO] context sensitive PGO

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 10:10:13 PST 2018


davidxl added inline comments.


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:618
+  // Reserve bit 60-63 for other information purpose.
+  FunctionHash &= 0x0FFFFFFFFFFFFFFF;
+  if (IsCS)
----------------
xur wrote:
> davidxl wrote:
> > This won't work well -- the non-CS FunctionHash may collide with CS hash. How do you differentiate?  
> > 
> > Also doing this for nonCS profiling also breaks the backward compatibility -- old profile with high bits set in hash won't be found anymore. It may also create more hash conflicts.
> That is the reason I bump the version number.  I use the version number to tell if this is old Hash format or new Hash format.
Say there exists an old version profile with the 60-63 bits set for some functions. When this profile is used, the new compiler won't be able to find those functions.

Also where is the code that checks the version number?


https://reviews.llvm.org/D54175





More information about the llvm-commits mailing list