[cfe-dev] Delay Clang CodeGen until AST is fully populated

Srinivas Kakarla1 via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 1 20:33:10 PDT 2019


Hi  ,


I Want to unsubscribe emails.
Please do need full.


Regards,
Srinivas

-----"cfe-dev" <cfe-dev-bounces at lists.llvm.org> wrote: -----
To: Fangqing Du <fangqingdu at gmail.com>
From: Alexandre Isoard via cfe-dev
Sent by: "cfe-dev"
Date: 07/02/2019 04:23AM
Cc: Clang Dev <cfe-dev at lists.llvm.org>
Subject: Re: [cfe-dev] Delay Clang CodeGen until AST is fully populated


"External email. Open with Caution"

We are really struggling with separating Sema and CodeGen.


Here are the few dead-end we hit:


1) We tried to use -emit-ast to get a PCH-like AST, but it seems it does not do template specialization.
That is, when we feed it again into clang, some of the Sema is still run after CodeGen.
We stopped there, because we are not sure this can help us.


2) We tried -traditional-cpp and -no-integrated-cpp which is supposed to forbid clang driver to merge the different stages (it didn't help). I do not know if this was effective, but we didn't see any difference. So maybe it is the same issue as the previous one? We also stopped there, because we use clang -cc1 anyway.


3) We started looking into ASTConsumer(s) and we are thinking if it is possible to write an ASTConsumer that "forward" the AST to the CodeGen and only implement the HandleTranslationUnit so that it ensure it receive the entire AST before forwarding it. But I guess we need to explore it then run manually each of the CodeGen method? Will it have the same issue about template instantiation?


We would really appreciate if anybody could shed some light, we don't know that part of the infrastructure.
Are we even going into the right direction? Is there already an option that does that?


--

Alexandre Isoard

_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190702/f31fc3c4/attachment.html>


More information about the cfe-dev mailing list