[PATCH] D68633: fix debug info affects output when opt inline
    Bjorn Pettersson via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 10 09:27:16 PDT 2019
    
    
  
bjope added a comment.
I'm still confused. IMO moving or not moving dbg instructions is a different question (not being discussed here). Still no explanation why result differs depending on if we move dbg instructuons or not. And this patch now blindly moves some dbg instructions, regardless if they are related to the allocas or not. Consider an instruction sequence like this:
  alloca
  bitcast
  dbg.declare
  bitcast
  alloca
  bitcast
  dbg.value
The scanning for allocas will find the two alloca instructions and call splice twice, only moving the alloca instructions, right?
The input IR could probably have looked like this instead:
  alloca
  dbg.declare
  bitcast
  bitcast
  alloca
  dbg.value
  bitcast 
and then suddenly (with this patch) we start to move the dbg intrinsics (but we still do not move the bitcasts, nor dbg intrinsics that do not have an alloca as predecessor).
I simply do not see the logic with this change.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68633/new/
https://reviews.llvm.org/D68633
    
    
More information about the llvm-commits
mailing list