This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Allow setting dump file name
ClosedPublic

Authored by kpdev42 on Apr 6 2023, 4:36 AM.

Details

Summary

This will be used for writing test cases.

~~

Huawei RRI, OS Lab

Diff Detail

Event Timeline

kpdev42 created this revision.Apr 6 2023, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 4:36 AM
kpdev42 requested review of this revision.Apr 6 2023, 4:36 AM
courbet added inline comments.Apr 6 2023, 4:42 AM
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

Given that DumpFileName only makes sense if DumpObjectToDisk, use a single optional<StringRef> parameter ?

kpdev42 marked an inline comment as done.Apr 6 2023, 4:54 AM
kpdev42 added inline comments.
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

If we provide just -dump-object-to-disk then llvm-exegesis will use autogenerated name. This is useful when batch opcode testing is used (with -opcode-index=-1). We can use some special file name for this mode, but it looks slightly counter-intuitive.

courbet added inline comments.Apr 6 2023, 5:01 AM
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

If we provide just -dump-object-to-disk then llvm-exegesis will use autogenerated name

Yes, and that would be {""}. My point is that we can condense two parameters in one and ensure that we can't write runConfiguration(RC, false, "file"), which makes no sense.

kpdev42 marked an inline comment as done.Apr 6 2023, 5:55 AM
kpdev42 added inline comments.
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

Oh, sorry, now I understood what you meant. I will update the revision

kpdev42 updated this revision to Diff 511645.Apr 7 2023, 2:35 AM

Address review comments

kpdev42 marked an inline comment as done.Apr 7 2023, 2:36 AM
courbet added inline comments.Apr 13 2023, 4:25 AM
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

I don't see the optional<StringRef> :)

kpdev42 updated this revision to Diff 513506.Apr 14 2023, 2:42 AM

Address review comments

kpdev42 marked an inline comment as done.Apr 14 2023, 2:43 AM
kpdev42 added inline comments.
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
66–69

Oh, yes. Now it is here )

courbet accepted this revision.Apr 18 2023, 6:23 AM
This revision is now accepted and ready to land.Apr 18 2023, 6:23 AM
This revision was automatically updated to reflect the committed changes.
kpdev42 marked an inline comment as done.