[cfe-dev] Implementing front-end of a user-directed optimization
Michael Kruse via cfe-dev
cfe-dev at lists.llvm.org
Thu Jun 11 10:39:29 PDT 2020
Am Do., 11. Juni 2020 um 07:23 Uhr schrieb Probir Roy <proy.cse at gmail.com>:
> For this should I consider approach (2): IR-gen in the front-end? If
> that's the case, I will need to modify Clang to insert a new AST node
> class, right? Where should I write the pass to generate the module
> summary? Also, how to get the associated CapturedStmt? Code examples
> would be very helpful.
What kind of directives are you adding to statements that are useful
for LTO? Naivly, I'd assume annotations on functions would be more
interesting.
Consider using attributes and AttributedStmt instead of CapturedStmt.
CapturedStmt are intended for e.g. lambda which need the info which
variables are accessed inside of it. It's implementation is also
somewhat tied to its use cases.
Michael
More information about the cfe-dev
mailing list