This is an archive of the discontinued LLVM Phabricator instance.

Add control over debug lines dropping
AbandonedPublic

Authored by jacek-galazka on Jul 28 2020, 2:35 PM.

Details

Reviewers
echristo
Summary

Control if GVN and LICM pass should retain debug locations of moved instructions.

Diff Detail

Event Timeline

jacek-galazka created this revision.Jul 28 2020, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2020, 2:35 PM
jacek-galazka requested review of this revision.Jul 28 2020, 2:35 PM
asbirlea removed a subscriber: asbirlea.Jul 28 2020, 3:15 PM

No test?

I'm curious what motivated this. I'm sure there are more places that do this kind of thing.

llvm/lib/Transforms/Scalar/LICM.cpp
138

s/lines/line/

These changes are based on D60913. I can search if there are more DL drops on Monday.
Do you think duplicating and adjusting a test like DebugInfo/Generic/licm-hoist-debug-loc.ll is sufficient?

llvm/lib/Transforms/Scalar/LICM.cpp
138

What do you mean by that?

Adding a flag for this seems worthy of a broader design discussion - so far we've been able to align the needs of profilers (never wanting to attribute a sample to a location that didn't actually execute - so hoisted or merged code cannot use one of its original locations) and debugger users. If that alignment is no longer going to be sufficient - I think an llvm-dev discussion about what the goals/priorities/policies are going forward would be good.

(also followed up on the previous review/commit - I've got general doubts about that patch too, that this one would not address)

jacek-galazka abandoned this revision.Aug 26 2020, 7:37 AM