[llvm-dev] CCAction definition?

Daniel Sanders via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 10 12:48:57 PDT 2019



> On Apr 10, 2019, at 11:15, Chris Sears via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Simple TableGen question, where is the definition for CCAction? It's given a forward declaration in TargetCallingConv.td alongside another forward declaration for CallingConv.
> 
> class CCAction;

That's actually the whole declaration. It defines a tablegen class with no fields and is only really there to allow tablegen to type check CallingConv's argument.

> class CallingConv;
> 
> As I'd expect, CallingConv is defined later in the file:
> 
> class CallingConv<list<CCAction> actions> { ... }
> But I can't find any definition for CCAction anywhere in the LLVM sources. I thought this might be idiomatically referring to an underlying C++ type but I couldn't find that either. Any explanation?

There's no correspondence with C++. Tablegen is essentially a database of records that the llvm-tblgen command can use to generate other files (usually C++). In this case, the code generator is in utils/TableGen/CallingConvEmitter.cpp and you'll see checks like 'Action->isSubClassOf("CCAssignToReg")' for each of CCAction's subclasses.

Hope that helps

> thanks,
> 
> C
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

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


More information about the llvm-dev mailing list