This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Create snippet object files with predictable names
Needs ReviewPublic

Authored by kpdev42 on Apr 27 2023, 2:12 AM.

Details

Reviewers
courbet
tstellar
Summary

To make it possible to dump multiple objects during a single run, the
output files are named /path/to/snippet-OPCODE-REPETITOR.o with constant
parts omitted (for example, if dumping a single object file, its name is
exactly the value of --dump-object-to-disk option).

In dbc76ef791, the call to writeObjectFile() function was moved to
runConfiguration() because the latter is inherently serial to make the
"Check generated assembly with: ..." lines readable. Because now file
names are predictable, this message is not needed anymore, so the
writeObjectFile() function can be called at any suitable place.

~~

Huawei RRI, OS Lab

Diff Detail

Event Timeline

kpdev42 created this revision.Apr 27 2023, 2:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 2:12 AM
kpdev42 requested review of this revision.Apr 27 2023, 2:12 AM
kpdev42 updated this revision to Diff 518036.Apr 28 2023, 1:20 PM

Update patch

courbet added inline comments.May 10 2023, 12:53 AM
llvm/docs/CommandGuide/llvm-exegesis.rst
362–364

Why not always add the OPCODE and REPETITOR parts ? Consistency is good :)

llvm/tools/llvm-exegesis/lib/FileNameGenerator.cpp
27–41

Don't roll your own code for this - use llvm/include/llvm/Support/Path.h.

llvm/tools/llvm-exegesis/llvm-exegesis.cpp
365

Let's remove the special case and be consistent