[llvm-dev] CCAction definition?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] CCAction definition?

Amara Emerson via llvm-dev
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;
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?

thanks,

C

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] CCAction definition?

Amara Emerson via llvm-dev


On Apr 10, 2019, at 11:15, Chris Sears via llvm-dev <[hidden email]> 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
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev