This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Make sure all DBG_VALUEs' reguse operands have IsDebug property
ClosedPublic

Authored by JesperAntonsson on Jun 19 2018, 5:45 AM.

Details

Summary

In some cases, these operands lacked the IsDebug property, which is meant to signal that
they should not affect codegen. This patch adds a check for this property in the
MachineVerifier and adds it where it was missing.

This includes refactorings to use MachineInstrBuilder construction functions instead of
manually setting up the intrinsic everywhere.

Diff Detail

Repository
rL LLVM

Event Timeline

Thank you very much for tracking this down! I think it would be more principled to use the appropriate construction function for DBG_VALUEs in MachineInstrBuilder in all of these instances instead of manually setting up the intrinsic in all of these places. Do you think that would be feasible? If not, could we still somehow wrap this in a common function so that users don't need to know about how to correctly build a DBG_VALUE?

JesperAntonsson edited the summary of this revision. (Show Details)

Thanks Adrian for your feedback. The new diff includes refactorings to use MachineInstrBuilder construction functions where possible.

aprantl accepted this revision.Jun 20 2018, 9:00 AM

Great! Looks much nicer.

This revision is now accepted and ready to land.Jun 20 2018, 9:00 AM

I'll push this for Jesper since he doesn't have commit rights yet.

This revision was automatically updated to reflect the committed changes.