[PATCH] D73261: [dwarf5] Support DebugInfo for constexpr for C++ variables and functions

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 12:24:54 PST 2020


aprantl added a comment.

In D73261#1838683 <https://reviews.llvm.org/D73261#1838683>, @probinson wrote:

> In D73261#1838552 <https://reviews.llvm.org/D73261#1838552>, @djtodoro wrote:
>
> > > Is it necessary to use DIFlags? I am willing to do that but generally, it is not welcomed because we have a limited number of DIFlags and most of them are currently in use.
> >
> > Are there any flags within `DIFlags` that could be applied only to functions? If so, we should move them in to the `DISPFlags` in order to make some space within the `DIFlags`.
>
>
> There might be.  The trick is backward compatibility of bitcode.  It looks like Virtual is already replicated to DISPFlags, but wasn't removed from DIFlags.  Other candidates for migration to DISPFlags: Explicit, Prototyped, NoReturn, Thunk, AllCallsDescribed, maybe NonTrivial.
>  Their exact semantics and how they're used would have to be verified.
>
> @dblaikie @aprantl  thoughts on this?
>
> huh. DIFlag bit 21 has no symbol; it used to be DIFlagMainSubprogram but we did not put in a Reserved or Deprecated name for it.  That should be fixed.
>
> > In addition, does it make sense to making something like `DIVarFlags`? And move the flags applying only to variables.
>
> We might have some like that.  BitField and StaticMember, just based on the names.
>
> Note that moving flags around is tricky and requires extreme care to ensure full backward compatibility.  Moving flags would have to be its own patch and this one would depend on it.


One clean way of doing this is to reserve one previously unused bit in DIFlags or DISPFlags to indicate that these flags were moved over and teach MetadataLoader to decode the old and new format accordingly. In that case we'd want a spearate patch that just moves the flag, though, all flags should be moved in the same patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73261/new/

https://reviews.llvm.org/D73261





More information about the llvm-commits mailing list