Page MenuHomePhabricator

[GlobalISel] Remove debug locations when emitting constants

Authored by davide on Apr 27 2020, 10:30 AM.



See for the full rationale.

The tl;dr story is that this causes jumps in the emitted line tables, even at -O0.
We could at some point consider more fancy solutions to preserve locations for them, but it doesn't seem to be worth the effort for now.

Diff Detail

Event Timeline

davide created this revision.Apr 27 2020, 10:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2020, 10:30 AM
This revision is now accepted and ready to land.Apr 27 2020, 11:04 AM
This revision was automatically updated to reflect the committed changes.
vsk added a subscriber: dsanders.Apr 27 2020, 1:29 PM
vsk added inline comments.

@davide It looks like there are a number of sites in this file which require the same fix (e.g; the isVector case, the G_FCONSTANT case).

What's the plan for tackling that? @dsanders introduced a lost location observer for GISel; we could use that + -mir-debugify to find issues.

For this file in particular, I think we should consider introducing a buildInstrNoLoc method and using that where appropriate.