This is an archive of the discontinued LLVM Phabricator instance.

Modular Codegen: Add/use a bit in serialized function definitions to track whether they are the subject of modular codegen
ClosedPublic

Authored by dblaikie on Feb 13 2017, 11:54 AM.

Details

Summary

Some decls are created not where they are written, but in other module
files/users (implicit special members and function template implicit
specializations). To correctly identify them, use a bit next to the definition
to track the modular codegen property.

Possible improvement would be to store this bit on the Decl itself, rather than
a sidemap - happy to give that a whirl if it seems better. (actually it'd be
two bits, since 3 states are required - currently reflected by "not in the
map", "in the map with Always", "in the map with Never")

Discussed whether the module file bit could be omitted in favor of
reconstituting from the modular codegen decls list - best guess today is that
the efficiency improvement of not having to deserialize the whole list whenever
any function is queried by a module user is worth it for the small size
increase of this redundant (list + bit-on-def) representation.

Diff Detail

Repository
rL LLVM

Event Timeline

dblaikie created this revision.Feb 13 2017, 11:54 AM
dblaikie updated this revision to Diff 88792.Feb 16 2017, 2:58 PM
  • Simplify ModuleFile lookup
dblaikie updated this revision to Diff 89931.Feb 27 2017, 1:55 PM
  • Simplify ModuleFile lookup
  • Build ModularCodegenDecls list from the same place the modular codegen bit is set on the decl
  • Cleanup no-longer-needed changes to DeclMustBeEmitted/isRequiredDecl
dblaikie updated this revision to Diff 91193.Mar 9 2017, 11:00 AM

sync/resolve

Ping

I've got a relatively small patch to add support for debug info types after this one & working on a patch on top of that to enable one/the other/both of these (to test their value independently/together). Might be more expedient to sit down & push through them all together side-by-side? Or not, not sure.

This revision was automatically updated to reflect the committed changes.