[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-31 Thread Jeremy Morse via cfe-commits
jmorse wrote: ...ah, actually is it malformed because there's a DICompositeType in the retainedNodes list for a DISubprogram? I remember that the verifier considered that illegal before your patch landed, but not after. https://github.com/llvm/llvm-project/pull/75385

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-31 Thread Jeremy Morse via cfe-commits
jmorse wrote: Rats; we should be able to pin down where the problem originates from -- would you be able to describe what's malformed about the metadata, as it's not clear to us (sorry). We'll probably be able to llvm-reduce (or similar) around that description. Unfortunately IIRC it comes

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-31 Thread Vladislav Dzhidzhoev via cfe-commits
dzhidzhoev wrote: > Hi, > > We're seeing a crash with this commit and reproducer > https://gist.github.com/jmorse/b0248c3c9f9195487ffd7c7431a8d15e > > llc: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2338: virtual void > llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *):

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-23 Thread Jeremy Morse via cfe-commits
jmorse wrote: Hmmm, that's unexpected -- I reverted the revert (tree here, contains one unrelated commit: https://github.com/jmorse/llvm-project/tree/reapply-localvars-patch) and rebuilt. The assertion-failure occurs just with `llc foobar.ll -o out.o -filetype=obj`, where foobar.ll is the

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-23 Thread Vladislav Dzhidzhoev via cfe-commits
dzhidzhoev wrote: > Hi, > > We're seeing a crash with this commit and reproducer > https://gist.github.com/jmorse/b0248c3c9f9195487ffd7c7431a8d15e > > llc: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2338: virtual void > llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *):

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-16 Thread Davide Italiano via cfe-commits
dcci wrote: Hitting the same problem on a bunch of services. I am going to revert this to unblock people, our repro is similar enough to the one Jeremy shared. ``` $ ./exe clang -cc1 version 18.0.0git based upon LLVM 18.0.0git default target x86_64-redhat-linux-gnu clang++:

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-16 Thread via cfe-commits
zmodem wrote: We're hitting the same assert (tracking in https://crbug.com/1518841) but don't have a good reproducer to share (it's during lto of a large binary). Jeremy's reproducer seems good though. Can we revert this while it's being investigated, please?

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-16 Thread Jeremy Morse via cfe-commits
jmorse wrote: Hi, We're seeing a crash with this reproducer https://gist.github.com/jmorse/b0248c3c9f9195487ffd7c7431a8d15e llc: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2338: virtual void llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *): Assertion