[PATCH] D100137: [JumpThreading] merge debug info when merging select+br
    Nick Desaulniers via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Apr  8 18:10:27 PDT 2021
    
    
  
nickdesaulniers added a comment.
In D100137#2678335 <https://reviews.llvm.org/D100137#2678335>, @nickdesaulniers wrote:
>> I guess it'd probably be worth fixing that code to do something to add a valid location to those function calls too
>
> Yeah, that sounds like the best long term solution to me; otherwise we'll be playing whack-a-mole with destructive transforms losing debug and results in confusing-for-developers error messages.  When splitting a critical edge, what location do we use if neither contain debug info?  If only one is missing debug info, I'd guess that `Instruction::applyMergedLocation` will pick the one existing one?
Created https://reviews.llvm.org/D100158 to followup and pursue that idea (though this issue addressed by this patch should still be fixed IMO). It looks like `llvm::SplitCriticalEdge` utilizes the debug location from the predecessors branch instruction; if it has none, oh well. So my previous question about multiple locations doesn't make much sense, as we only have 1 edge.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100137/new/
https://reviews.llvm.org/D100137
    
    
More information about the llvm-commits
mailing list