[llvm] [RemoveDIs] Fix spliceDebugInfo splice-to-end edge case (PR #105671)

Karthika Devi C via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 08:09:10 PDT 2024


https://github.com/kartcq commented:

Thanks for looking into this @OCHyams 

Could you please clarify couple of things here.
1. In the splice function of test
`NewBB->splice(NewBB->end(), &BB, B, BB.end());`
The B here refers to first instruction
`%b = add i16 %a, 0`
Is that what we are testing? Shouldn't we split at the return instruction ?

2. Consider a scenario in a pass we want to split from return instruction. And the debug record just above belongs to that return instruction. When we try to splice here, can we expect the DebugInfo to tag along with the return instruction 
(or)
Is it responsibility of pass owners using splice to set HeadBit of the instruction(in case if it has DebugRecords). So that the debug record will be tagged along with return instruction.


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


More information about the llvm-commits mailing list