We currently assume profile hash conflicts will be caught by an upfront check and we assert for the cases that escape the check. The assumption is not always true as there are chances of conflict. This patch prints a warning and skips annotating the function for the escaped cases,.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
1010 ↗ | (On Diff #193368) | update the comments about the return value. |
1042 ↗ | (On Diff #193368) | document on how this can happen. |
1155 ↗ | (On Diff #193368) | What is the possible cause of it? It is better emit the information so that users can take some actions -- otherwise the message is not useful. |
lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
1155 ↗ | (On Diff #193368) | this is profile mismatch, usually from stale profile (source change), or using the profile generated from other binaries. Is this the standard message for mismatch? We have the check here for the cases that escapes funchash conflict detection. |
lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
1155 ↗ | (On Diff #193368) | When there is a hash conflict, it means the function name is also the same. Perhaps add more information: " the profile may be stale or there is a function name collision". |