[cfe-dev] Implementing front-end of a user-directed optimization

Probir Roy via cfe-dev cfe-dev at lists.llvm.org
Thu Jun 11 10:54:31 PDT 2020


The user will annotate callee as well as a few callers and their error
handling code.

#pragma xTool caller
{
      try{
          ret = callee();
      }catch(e)
      { ... }
}

I am not sure how to handle the compound statements enclosed in {}. I
will check the usages of AttributedStmt.

On Thu, Jun 11, 2020 at 1:40 PM Michael Kruse <llvm at meinersbur.de> wrote:
>
> 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



-- 
Probir Roy


More information about the cfe-dev mailing list