This is an archive of the discontinued LLVM Phabricator instance.

[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

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