This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][NFC] Fixup the UserValue methods to use FragmentInfo
ClosedPublic

Authored by Orlando on Feb 5 2020, 8:13 AM.

Details

Summary

Fixup the UserValue methods to use FragmentInfo instead of DIExpression because
the DIExpression is only ever used to get the to get the FragmentInfo. The
DIExpression is meaningless in the UserValue class because each definition point
added to a UserValue may have a unique DIExpression.

Diff Detail

Event Timeline

Orlando created this revision.Feb 5 2020, 8:13 AM
Orlando created this object with visibility "No One".
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2020, 8:13 AM
Orlando added a project: debug-info.
Orlando changed the visibility from "No One" to "Public (No Login Required)".
aprantl added inline comments.Feb 5 2020, 8:50 AM
llvm/lib/CodeGen/LiveDebugVariables.cpp
163

Personally, I'd prefer Fragment or FragmentInfo for readability

Orlando updated this revision to Diff 242658.Feb 5 2020, 9:26 AM
Orlando marked an inline comment as done.

Address comments:

+ UserValue FragInfo -> Fragment

aprantl accepted this revision.Feb 5 2020, 4:07 PM
aprantl added inline comments.
llvm/lib/CodeGen/LiveDebugVariables.cpp
211–212

matches?

This revision is now accepted and ready to land.Feb 5 2020, 4:07 PM
Orlando marked an inline comment as done.Feb 6 2020, 1:23 AM

Thanks for looking at these patches. When they are all ready to land would it be better to land them independently or all together as one?

llvm/lib/CodeGen/LiveDebugVariables.cpp
211–212

It hadn't crossed my mind to rename this. The UserLabel class has a match() method too. Would you like me to update both?

Thanks for looking at these patches. When they are all ready to land would it be better to land them independently or all together as one?

I would land them as individual commits, but you can roll them into one push. Doin separate pushes makes it easier to debug bot breakage though.

llvm/lib/CodeGen/LiveDebugVariables.cpp
211–212

Sure, why not.

Orlando updated this revision to Diff 243140.Feb 7 2020, 4:47 AM

+ Rebase

Orlando updated this revision to Diff 243141.Feb 7 2020, 4:50 AM

Address review comments:
+ match() -> matches()

This revision was automatically updated to reflect the committed changes.