This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Add memory annotation parsing
ClosedPublic

Authored by aidengrossman on May 20 2023, 3:42 AM.

Details

Summary

This patch adds memory annotation parsing to llvm-exegesis. The memory
annotations cannot be used currently, but this allows for using parsed
memory annotations within a FunctionExecutorImpl to set up a specified
execution environment.

Diff Detail

Event Timeline

aidengrossman created this revision.May 20 2023, 3:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2023, 3:42 AM
Herald added a subscriber: mstojanovic. · View Herald Transcript
aidengrossman requested review of this revision.May 20 2023, 3:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2023, 3:42 AM

Format + rebase

Roll back to previous diff since the last update rolled two commits together.

Rebase + format

Updated the wrong patch

@courbet This patch (and the next one) are ready for review on my side when you have some time.

courbet added inline comments.Jun 16 2023, 4:44 AM
llvm/tools/llvm-exegesis/lib/SnippetFile.h
33

From a design perspective I don't think readSnippets should know about ExecutionMode. The parser just parses, let's check in that there are no memory mappings in the BenchmarkCode when using it (e.g. in main).

Address reviewer feedback.

Just updated it to throw an error in llvm-exegesis.cpp rather than generate invalid comments. Definitely a much cleaner design. Thanks for the suggestion!

courbet accepted this revision.Jun 16 2023, 5:26 AM
This revision is now accepted and ready to land.Jun 16 2023, 5:26 AM

Should be closed by f0655b0d06129330f710b3cb9955cec7e778bfd0. I forgot to add in the Phabricator information when cherry-picking from my branch with the changes.