[PATCH] D54175: [PGO] context sensitive PGO
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 14:52:01 PDT 2019
xur marked 2 inline comments as done.
xur added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:673
+ // Reserve bit 60-63 for other information purpose.
+ FunctionHash &= 0x0FFFFFFFFFFFFFFF;
+ if (IsCS)
----------------
pcc wrote:
> Hi Rong, I discovered a problem with this line of code. If the number of select instructions when the profile was collected differs by a multiple of 16 from the number when the profile is used, we get a hash collision which results in us hitting an assertion here:
> http://llvm-cs.pcc.me.uk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp#1042
>
> Granted, the same problem seems to have already existed for differences that are multiples of 256, but this seems to make the problem more likely to occur.
I sent this patch for review.
https://reviews.llvm.org/D60154
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54175/new/
https://reviews.llvm.org/D54175
More information about the llvm-commits
mailing list