[llvm-dev] [LLVM][DISubprogram][LL format updation query] Question regarding moving DISubprogram DIFlags to DISPFlag.

Djordje Todorovic via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 20 00:45:43 PST 2020


Hi Chirag,

On 20.2.20. 07:51, Chirag Patel via llvm-dev wrote:
> Hello,
> 
>  
> 
> In regard to the review request https://reviews.llvm.org/D74470,
> 
> I am trying to move five of the DIFlags to DISPFlag for the moment namely DIFlagExplicit, DIFlagPrototyped, DIFlagNoReturn, DIFlagThunk, DIFlagAllCallsDescribed.
> 
> The llvm ir format for DISubprogram currently has backword compatibility where the isLocal, isDefinition, virtuality, isOptimized and SPFlags are mutually exclusive.
> 
> My question is,
> 
> is it a good idea to remove the booleans support’(isLocal, isDefinition) and move most of it to spflags and flags in llvm ir? 

But it was already "done", we currently have the 'DISPFlagLocalToUnit' and 'DISPFlagDefinition' (please take a look into the https://reviews.llvm.org/D54755 and https://reviews.llvm.org/D59288).

The llvm ir backward compatibility does not list the clear requirements on documentations page. This change affects more then 750 ll files.
> 

I am not sure what change will take 750 ll files? Removing the 'isLocal' and 'isDefinition'? I think the role of LLVM IR backward compatibility is to support interpretation of the old metadata in terms of the newest one. Therefore, if there is an 'isDefinition' metadata field, that should be interpreted as 'DISPFlagDefinition'.


> 
> Regards,
> 
> Chirag Partel.
> 


More information about the llvm-dev mailing list