Page MenuHomePhabricator

[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

Unit TestsFailed

TimeTest
60,070 msx64 debian > libFuzzer.libFuzzer::fuzzer-leak.test
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/LeakTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/fuzzer-leak.test.tmp-LeakTest
60,060 msx64 debian > libFuzzer.libFuzzer::minimize_crash.test
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/NullDerefTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/minimize_crash.test.tmp-NullDerefTest

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

43–48

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
15–19

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.