This is an archive of the discontinued LLVM Phabricator instance.

[DWARF] Add printout for op-index
ClosedPublic

Authored by dstenb on Jun 9 2023, 6:59 AM.

Details

Summary

This is a preparatory patch for extending DWARFDebugLine to properly
parse line number programs with maximum_operations_per_instruction > 1
for VLIW targets.

Add some scaffolding for handling op-index in line number programs, and
add printouts for that in the table. As this affects a lot of tests,
this is done in a separate commit to get a cleaner review for the actual
op-index implementation.

Verbose printouts are not present in many tests, and adding op-index to
those will require a bit more code changes, so that is done in the
actual implementation patch.

Diff Detail

Event Timeline

dstenb created this revision.Jun 9 2023, 6:59 AM
Herald added a project: Restricted Project. · View Herald Transcript
dstenb requested review of this revision.Jun 9 2023, 6:59 AM

As values in this column will always be 0 for non-VLIW targets, it might perhaps add a bit of clutter. If you prefer, I can instead upload a patch that makes the emission of the column conditional (for line number programs with maximum_operations_per_instruction > 1).

dstenb updated this revision to Diff 532136.Jun 16 2023, 7:01 AM

Update two bolt test cases.

StephenTozer accepted this revision.Jul 3 2023, 3:11 AM
StephenTozer added a subscriber: StephenTozer.

As values in this column will always be 0 for non-VLIW targets, it might perhaps add a bit of clutter. If you prefer, I can instead upload a patch that makes the emission of the column conditional (for line number programs with maximum_operations_per_instruction > 1).

This sounds preferable to me, but we don't currently make columns conditional based on whether or not they're needed, even when we could (isa and discriminator are also all-0 for many targets); defensively I'd suggest leaving it as it is.

This revision is now accepted and ready to land.Jul 3 2023, 3:11 AM
This revision was automatically updated to reflect the committed changes.