This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Remove overly defensive AllocaInst assertion
ClosedPublic

Authored by Orlando on Apr 25 2023, 1:45 AM.

Details

Summary

Remove assert from AssignmentTrackingAnalysis that fires if a local variable has non-alloca storage. The analysis can emit these locations but the assignment tracking code in SelectionDAG isn't ready to handle non-alloca storage for locals yet. The AssignmentTrackingPass (pass that adds assignment tracking metadata) ignores non-alloca dbg.declares, so the only variables affected are those who's backing storage is changed from an alloca during optimisation, and the result is the variables are dropped.

Fixes: https://ci.chromium.org/ui/p/pigweed/builders/toolchain/toolchain-ci-pigweed-linux/b8783274592206481489/overview

Diff Detail

Event Timeline

Orlando created this revision.Apr 25 2023, 1:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 1:45 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Apr 25 2023, 1:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 1:45 AM
StephenTozer accepted this revision.Apr 26 2023, 2:41 AM
StephenTozer added a subscriber: StephenTozer.

Description seems clear enough, changing the assert seems reasonable, LGTM with the tiniest nit.

llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
17–24
This revision is now accepted and ready to land.Apr 26 2023, 2:41 AM
Orlando marked an inline comment as done.Apr 26 2023, 3:22 AM

Thanks