Re: [PATCH] D28845: Prototype of modules codegen

2017-01-29 Thread David Blaikie via cfe-commits
On Sun, Jan 29, 2017 at 10:21 AM Richard Smith via Phabricator < revi...@reviews.llvm.org> wrote: > rsmith accepted this revision. > rsmith added inline comments. > This revision is now accepted and ready to land. > > > > Comment at: lib/AST/ExternalASTSource.cpp:33 > +ExternalAST

[PATCH] D28845: Prototype of modules codegen

2017-01-29 Thread David Blaikie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dblaikie marked 2 inline comments as done. Closed by commit rL293456: Prototype of modules codegen (authored by dblaikie). Changed prior to commit: https://reviews.llvm.org/D28845?vs=86200&id=86239#toc Repository: rL LL

[PATCH] D28845: Prototype of modules codegen

2017-01-29 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/AST/ExternalASTSource.cpp:33 +ExternalASTSource::hasExternalDefinitions(unsigned ID) { + return EK_ReplyHazy; +} dblaikie wrote: > rsmit

[PATCH] D28845: Prototype of modules codegen

2017-01-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie marked 6 inline comments as done. dblaikie added a comment. Addressed CR feedback Comment at: lib/AST/ExternalASTSource.cpp:33 +ExternalASTSource::hasExternalDefinitions(unsigned ID) { + return EK_ReplyHazy; +} rsmith wrote: > You should add support f

[PATCH] D28845: Prototype of modules codegen

2017-01-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 86200. dblaikie added a comment. - Address code review feedback - Formatting https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSource.h include/clang/Basic/LangOptions.def include/clang/Basic/Module.

[PATCH] D28845: Prototype of modules codegen

2017-01-27 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Comment at: include/clang/AST/ASTContext.h:2490 /// it is not used. - bool DeclMustBeEmitted(const Decl *D); + bool DeclMustBeEmitted(const Decl *D, bool WritingModule = false); I think the name of this flag might be out of sync

[PATCH] D28845: Prototype of modules codegen

2017-01-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 86140. dblaikie added a comment. - More test coverage (for local static variables) https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSource.h include/clang/Basic/LangOptions.def include/clang/Basic/M

Re: [PATCH] D28845: Prototype of modules codegen

2017-01-24 Thread David Blaikie via cfe-commits
Richard: This ought to be ready for another round of review at this point, I Think. Got test cases (showing opt and non-opt behavior, direct and indirect modular dependencies, unused modular code, etc - might need some more comments?), flag, moved the linkage code to GetGVALinkageForFunction. One

[PATCH] D28845: Prototype of modules codegen

2017-01-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 85686. dblaikie added a comment. - Add test coverage https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSource.h include/clang/Basic/LangOptions.def include/clang/Basic/Module.h include/clang/Driver

[PATCH] D28845: Prototype of modules codegen

2017-01-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 85649. dblaikie added a comment. - Add cc1 flag for modular codegen, -fmodule-codegen https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSource.h include/clang/Basic/LangOptions.def include/clang/Basi

[PATCH] D28845: Prototype of modules codegen

2017-01-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 85599. dblaikie added a comment. - Move linkage handling into GetGVALinkageForFunction https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSource.h include/clang/Basic/LangOptions.def include/clang/Bas

[PATCH] D28845: Prototype of modules codegen

2017-01-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 85484. dblaikie added a comment. Add bit to the Module record for when modular codegen decls are included in the MODULAR_CODEGEN_DECLS bitcode record https://reviews.llvm.org/D28845 Files: include/clang/AST/ASTContext.h include/clang/AST/ExternalASTSo

Re: [PATCH] D28845: Prototype of modules codegen

2017-01-18 Thread David Blaikie via cfe-commits
Oh, remembered I had one other question/idea: Tangentially related to the question about non-inline functions in headers: Currently .pcm files have the 'interesting decls' list. Are there any interesting decls once modules codegen is in use? It seems mostly the interesting decls are things like n

Re: [PATCH] D28845: Prototype of modules codegen

2017-01-18 Thread David Blaikie via cfe-commits
On Wed, Jan 18, 2017 at 4:12 AM Hal Finkel via Phabricator < revi...@reviews.llvm.org> wrote: > hfinkel added a comment. > > Can you provide a high-level description of what you're trying to > accomplish and the usage model? > Oh, for sure - sorry for the assumption/missing info. Stuff that's bee

[PATCH] D28845: Prototype of modules codegen

2017-01-18 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Can you provide a high-level description of what you're trying to accomplish and the usage model? https://reviews.llvm.org/D28845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D28845: Prototype of modules codegen

2017-01-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. First pass at generating weak definitions of inline functions from module files (& currently skipping definitions of those functions in uses) I've done some manual testing (haven't delved into the preferred testing strategy for modules). Seems to work for simplest