This is an archive of the discontinued LLVM Phabricator instance.

[Utils] Improved chunk-print-before-all.py script
ClosedPublic

Authored by dbakunevich on Nov 14 2022, 1:37 AM.

Details

Summary

As part of this patch, the ability to work with dump files
containing ir after passes received using the -print-after-all
option was added to script chunk-print-before-all.py.
The names of the output files have also been changed.

Before: chunk-NUM.ll
Now: NUM-STAGE-PASS_NAME.ll

NUM - sequence number of the pass operation.
STAGE - stage of the pass operation (for example: before, after, dump).
PASS_NAME - the name of the pass.

Diff Detail

Event Timeline

dbakunevich created this revision.Nov 14 2022, 1:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 1:37 AM
dbakunevich requested review of this revision.Nov 14 2022, 1:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 1:37 AM
apilipenko added inline comments.Nov 14 2022, 4:32 PM
llvm/utils/chunk-print-before-all.py
1–2

Update the comment

42–47

Extract into a helper and add a comment on what this code is doing?

apilipenko added inline comments.Nov 17 2022, 5:03 PM
llvm/utils/chunk-print-before-all.py
16–20

This should do the trick:

return re.split(' |<', short_line)[0]
reames accepted this revision.Nov 21 2022, 11:09 AM
This revision is now accepted and ready to land.Nov 21 2022, 11:09 AM
This revision was automatically updated to reflect the committed changes.