This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO] Fix a test issue due to portablity of std::hash
ClosedPublic

Authored by hoy on Apr 12 2021, 5:03 PM.

Details

Summary

As a follow-up to D99815, this patch enables the test by using a DAG order instead of a sequential order to mitigate the platform portability issue due to std:: _Hash_bytes.

Diff Detail

Event Timeline

hoy created this revision.Apr 12 2021, 5:03 PM
hoy requested review of this revision.Apr 12 2021, 5:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2021, 5:03 PM
hoy edited the summary of this revision. (Show Details)Apr 12 2021, 5:09 PM
hoy added reviewers: wenlei, jsji.
hoy updated this revision to Diff 336997.Apr 12 2021, 5:12 PM

Rebasing.

Thanks for the fix. How about using DAG check for things under other "Getting base profile for function" too?

hoy added a comment.Apr 12 2021, 6:20 PM

Thanks for the fix. How about using DAG check for things under other "Getting base profile for function" too?

Check-dag is added for _Z5funcAi and _Z5funcBi only since only the order of compiling _Z5funcAi and _Z5funcBi depends on std::hash. Both of them are children of main and there's no call from one of them to the other. Thus the top-down order is computed based on which one is traversed first during scc traversal. For the other two functions, main should be compiled first and _Z8funcLeafi should be compiled at last.

jsji accepted this revision.Apr 12 2021, 7:55 PM

LGTM. The test passed on AIX now.

This revision is now accepted and ready to land.Apr 12 2021, 7:55 PM
wenlei accepted this revision.Apr 13 2021, 4:26 PM

lgtm, thanks.

hoy added a comment.Apr 13 2021, 5:19 PM

LGTM. The test passed on AIX now.

Thanks for testing it.

This revision was automatically updated to reflect the committed changes.