Displaying 3 results from an estimated 3 matches for "derived_m".
2012 Mar 23
0
[LLVMdev] tablegen question
...gt;From my understanding, NAME is a special builtin entry and dedicated for
things related multiclass,
So, is the following rewrite what you want?
class Base<int V> {
int Value = V;
}
class Derived<string Truth> :
Base<!if(!eq(Truth, "true"), 1, 0)>;
multiclass Derived_m<string T> {
def #NAME# : Derived<T>;
}
defm TRUE : Derived_m<"true">;
defm FALSE : Derived_m<"false">;
tablegen result:
------------- Classes -----------------
class Base<int Base:V = ?> {
int Value = Base:V;
string NAME = ?;
}
class Derive...
2012 Mar 16
2
[LLVMdev] tablegen question
Trying to resolve some general tablegen questions.
Consider the test case for Tablegen called eq.td
class Base<int V> {
int Value = V;
}
class Derived<string Truth> :
Base<!if(!eq(Truth, "true"), 1, 0)>;
def TRUE : Derived<"true">;
def FALSE : Derived<"false">;
If I process this through tablegen I get:
------------- Classes
2012 Mar 24
2
[LLVMdev] tablegen question
...d dedicated for
> things related multiclass,
>
> So, is the following rewrite what you want?
>
> class Base<int V> {
> int Value = V;
> }
>
> class Derived<string Truth> :
> Base<!if(!eq(Truth, "true"), 1, 0)>;
>
> multiclass Derived_m<string T> {
> def #NAME# : Derived<T>;
> }
>
> defm TRUE : Derived_m<"true">;
> defm FALSE : Derived_m<"false">;
>
> tablegen result:
>
> ------------- Classes -----------------
> class Base<int Base:V = ?> {
>...