This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Ignore VLA-backed variables
ClosedPublic

Authored by Orlando on Apr 12 2023, 9:02 AM.

Details

Summary

VLA backed variables currently trip an assertion in SROA with D146987 (enabling assignment tracking). For now I think it is best to disable assignment tracking for VLA variables as this should be very low impact for debug-info overall.

See https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.arm64-release-subbuild/b8784015690983714641/overview

Diff Detail

Event Timeline

Orlando created this revision.Apr 12 2023, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 9:02 AM
Orlando requested review of this revision.Apr 12 2023, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 9:02 AM
jmorse accepted this revision.Apr 12 2023, 9:05 AM

LGTM, I think assignment tracking can naturally support VLAs in the same way that SROA does, but apparently we had reason to not think that when that assertion was added, and it's worth investigating.

This revision is now accepted and ready to land.Apr 12 2023, 9:05 AM
This revision was landed with ongoing or failed builds.Apr 12 2023, 9:11 AM
This revision was automatically updated to reflect the committed changes.

Hi, I think we're still seeing issues with your patch series, can you take a look? If this will take a while to address, can you revert until a fix is ready?

Error message:

fragment is larger than or outside of variable
  call void @llvm.dbg.assign(metadata i1 undef, metadata !8664, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 256), metadata !8727, metadata ptr undef, metadata !DIExpression()), !dbg !8672
!8664 = !DILocalVariable(name: "r_command_pool", scope: !8660, file: !2, line: 28, type: !5693)
fragment is larger than or outside of variable
  call void @llvm.dbg.assign(metadata i1 undef, metadata !8664, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 256), metadata !8727, metadata ptr undef, metadata !DIExpression()), !dbg !8672
!8664 = !DILocalVariable(name: "r_command_pool", scope: !8660, file: !2, line: 28, type: !5693)
fatal error: error in backend: Broken module found, compilation aborted!

related bots:
https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8784000953022145169/overview
https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8784018552980036737/overview

Thanks for the info. Patch D146987 (enabling the feature) has been reverted for now by others.

Hi, I think we're still seeing issues with your patch series, can you take a look? If this will take a while to address, can you revert until a fix is ready?

Error message:

fragment is larger than or outside of variable
  call void @llvm.dbg.assign(metadata i1 undef, metadata !8664, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 256), metadata !8727, metadata ptr undef, metadata !DIExpression()), !dbg !8672
!8664 = !DILocalVariable(name: "r_command_pool", scope: !8660, file: !2, line: 28, type: !5693)
fragment is larger than or outside of variable
  call void @llvm.dbg.assign(metadata i1 undef, metadata !8664, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 256), metadata !8727, metadata ptr undef, metadata !DIExpression()), !dbg !8672
!8664 = !DILocalVariable(name: "r_command_pool", scope: !8660, file: !2, line: 28, type: !5693)
fatal error: error in backend: Broken module found, compilation aborted!

related bots:
https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8784000953022145169/overview
https://ci.chromium.org/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.x64-release/b8784018552980036737/overview

D148536 fixes this one, thanks again.