[llvm-dev] [SelectionDAG] DbgValue nodes aren't transferred

Jonas Devlieghere via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 14 04:07:29 PDT 2018


Hi Sejong,

Indeed, I think you are right and we should call transferDbgValues in SetPromotedInteger.

I couldn’t immediately find a suitable in-tree test to verify this though. Can you check and let me know whether this works for your target?

Thanks,
Jonas

> On Mar 13, 2018, at 7:45 PM, Se Jong Oh <sejooh at microsoft.com> wrote:
> 
> Thanks for help! I think that sign extension is not involved here. PromoteIntegerResult is called since i32 is not a legal type in my target and the legalizer promotes operations with i32 result type to i64 operations. I think that SetPromotedInteger seems to be a common place for all promotions like SetExpandedInteger.
>  
> Jonas, I would appreciate it if you can guide me about whether my understanding is correct or not.
>  
> Thanks,
> Sejong
>  
>  
>  
> From: vsk at apple.com <vsk at apple.com> 
> Sent: Friday, March 9, 2018 3:19 PM
> To: Se Jong Oh <sejooh at microsoft.com>
> Cc: llvm-dev at lists.llvm.org; Jonas Devlieghere <jdevlieghere at apple.com>; Adrian Prantl <aprantl at apple.com>; pidgeot18 at gmail.com
> Subject: Re: [llvm-dev] [SelectionDAG] DbgValue nodes aren't transferred
>  
> + Adrian, Joshua
> + Jonas, since he contributed the transferDbgValues change in DAGTypeLegalizer::SetExpandedInteger
>  
> On Mar 8, 2018, at 5:44 PM, Se Jong Oh via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>  
> Hi,
>  
> I have a problem that dbg_value nodes are not transferred when integer DAG nodes are promoted. For example, an i32 add node is promoted to a i64 add node by DAGTypeLegalizer::PromoteIntegerResult and its dbg_value node is not transferred to the new node. 
>  
> t9: i32 = add nsw t5, t8 à  t31: i64 = add t30, t7   ; the dbg_value node is not transferred to the new i64 add node.
>  
> For expansion, DAGTypeLegalizer::SetExpandedInteger calls transferDbgValues() but I couldn’t find any place to call trasnferDbgValues() for integer type promotion in DAGTypeLegalizer ::SetPromotedInteger and other places.
>  
> Maybe the right place to do this is within the PromoteIntRes_ helper for sign extensions?
>  
> best,
> vedant
> 
> 
> I am wondering If I miss anything or the legalization needs to call transferDbgValues() for this case.
>  
> I found this problem because a recently added unittest, DebugInfo/X86/linear-dbg-value.ll fails for my project, and the x86 and aarch64 backends don’t have this problem since they don’t promote i32 add nodes.
>  
> Thanks,
> Sejong
>  
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=04%7C01%7Csejooh%40microsoft.com%7Cf8d9536de7c74f3a20ce08d586141eb2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636562343324953221%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-2&sdata=S9HQs6h1fxCU2LhD0zPjI%2BO4BBSVgTnn6a8Cz9ji7iA%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180314/b6c1cc82/attachment.html>


More information about the llvm-dev mailing list