Page MenuHomePhabricator

[RegisterCoalescer] Dumper for JoinVals
Needs RevisionPublic

Authored by vpykhtin on Jun 25 2020, 10:16 AM.

Details

Summary

Example:

RHSVals %1:sub0:
              0@128r Write:0000000000000003 Valid:0000000000000003 Keep -> 0@128r
               1@80r Write:0000000000000003 Valid:0000000000000003 Erase Other:1@64r -> 1@64r
          2@160B-phi Write:0000000000000003 Valid:0000000000000003 Merge Other:3@160B-phi -> 3@160B-phi

Helps a lot to understand what's going on.

The output can also be seen at: https://reviews.llvm.org/D82258

Diff Detail

Unit TestsFailed

TimeTest
9,950 mslinux > libomp.env::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test -I /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/src -L /mnt/disks/ssd0/agent/llvm-project/build/lib -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/ompt /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/env/kmp_set_dispatch_buf.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/env/Output/kmp_set_dispatch_buf.c.tmp -lm -latomic && env KMP_DISP_NUM_BUFFERS=0 /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/env/Output/kmp_set_dispatch_buf.c.tmp
1,600 mslinux > libomp.worksharing/for::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test -I /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/src -L /mnt/disks/ssd0/agent/llvm-project/build/lib -I /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/ompt /mnt/disks/ssd0/agent/llvm-project/openmp/runtime/test/worksharing/for/kmp_set_dispatch_buf.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/worksharing/for/Output/kmp_set_dispatch_buf.c.tmp -lm -latomic && /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/test/worksharing/for/Output/kmp_set_dispatch_buf.c.tmp 7

Event Timeline

vpykhtin created this revision.Jun 25 2020, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2020, 10:16 AM
vpykhtin edited the summary of this revision. (Show Details)Jun 25 2020, 10:17 AM
vpykhtin edited the summary of this revision. (Show Details)Jun 25 2020, 10:25 AM
arsenm added inline comments.Jun 25 2020, 11:27 AM
llvm/lib/CodeGen/LiveInterval.cpp
1028

It should print each on a different line?

llvm/lib/CodeGen/RegisterCoalescer.cpp
3338–3339

Merge to one LLVM_DEBUG block

3436–3437

Merge to one LLVM_DEBUG block

vpykhtin marked an inline comment as done.Jun 25 2020, 11:30 AM
vpykhtin added inline comments.
llvm/lib/CodeGen/LiveInterval.cpp
1028

No, why?

arsenm added inline comments.Jun 25 2020, 12:01 PM
llvm/lib/CodeGen/LiveInterval.cpp
1028

You manually corrected the output to make it readable, since the one line is way too long. Why not just print it that way?

vpykhtin marked an inline comment as done.Jun 25 2020, 12:06 PM
vpykhtin added inline comments.
llvm/lib/CodeGen/LiveInterval.cpp
1028

I was trying to keep the style of dump it currently have, having less lines on output. I agree it much easier to read it formatted on different lines, so I'll probable change it.

arsenm added inline comments.Jun 25 2020, 1:53 PM
llvm/lib/CodeGen/LiveInterval.cpp
1028

I think the overly long line style is an obstacle to debugging. Whenever debugging livenes problems I end up manually breaking all of these up too

vpykhtin updated this revision to Diff 273592.Jun 25 2020, 10:25 PM

Rebased, per review issues fixed, moved VNInfo::print definition ot of class.

vpykhtin edited the summary of this revision. (Show Details)Jun 25 2020, 10:26 PM
vpykhtin marked 4 inline comments as done.
arsenm requested changes to this revision.Jul 6 2020, 2:00 PM
arsenm added inline comments.
llvm/lib/CodeGen/RegisterCoalescer.cpp
2343

Comma operator here is definitely weird. Braces and separate lines?

2344–2347

Separate lines

This revision now requires changes to proceed.Jul 6 2020, 2:00 PM