[llvm] [RemoveDIs] Account for DPVAssigns in isIdenticalToWhenDefined (PR #82257)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 10 00:10:56 PST 2024


eaeltsin wrote:

Heads-up - we got a crash during LTO that reduced to this commit. 

The error message is:
```
fragment covers entire variable
#dbg_value(i64 %37, !12949, !DIExpression(DW_OP_LLVM_fragment, 0, 64), !13072)
!12949 = !DILocalVariable(name: "foo", scope: !12950, file: !7650, line: 744, type: !553)
fragment is larger than or outside of variable
#dbg_value(i64 %43, !12949, !DIExpression(DW_OP_LLVM_fragment, 64, 64), !13072)
!12949 = !DILocalVariable(name: "foo", scope: !12950, file: !7650, line: 744, type: !553)
fatal error: error in backend: Broken module found, compilation aborted!
```

Stack trace fragment:
```
...
 #8 0x0000562ac005fc72 llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
 #9 0x0000562ac4a5aa55 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
#10 0x0000562ac0209b48 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::__u::vector<unsigned char, std::__u::allocator<unsigned char>> const&)
#11 0x0000562ac020bfa5 llvm::lto::thinBackend(
...
```

We are working on a reduced reproducer, but I'm not sure how much time we need.

In the meantime, does the information above give you any hints? Any ideas how to fix this forward?

We definitely need this commit, because it fixes non-determinism. If we decide to revert, we need another fix for non-determinism instead.


https://github.com/llvm/llvm-project/pull/82257


More information about the llvm-commits mailing list