This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking][NFC] Only calculate fragment overlaps for partially stack homed variables
ClosedPublic

Authored by Orlando on Mar 7 2023, 8:46 AM.

Details

Summary

This filter is already applied to the rest of the analysis - this change simply prevents some unnecessary work.

Diff Detail

Event Timeline

Orlando created this revision.Mar 7 2023, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 8:46 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Mar 7 2023, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 8:46 AM
scott.linder added inline comments.Mar 14 2023, 3:57 PM
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
1853–1854

I would prefer a reference type, assuming there is no possibility that it is nullptr.

Orlando updated this revision to Diff 505435.Mar 15 2023, 4:10 AM
Orlando marked an inline comment as done.

/me squints -- so if no part of the variable ends up on the stack, this is effectively early-exiting this portion of analysis?

llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
1853–1854

+1,

/me squints -- so if no part of the variable ends up on the stack, this is effectively early-exiting this portion of analysis?

Effectively yes. We already have this filter applied to the rest of the analysis; this patch just adds it to this initialisation step too.

llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
1853–1854

I have already changed VarsWithStackSlot (the parameter added in this patch) to a reference type - just checking, @jmorse are you asking for me to change FnVarLocs (not added in this patch) too?

jmorse accepted this revision.Mar 28 2023, 3:34 AM

LGTM

llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
1853–1854

Oh, right, this patch isn't adding that parameter. That can probably be improved some other time then.

This revision is now accepted and ready to land.Mar 28 2023, 3:34 AM