You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the documentation and the proposed feature is not implemented.
Description
Currently, we have several custom type traits (in include/vast/Dialect/Core/Utils.td and include/vast/Dialect/Core/TypeTraits.hpp) to generate traits for Operation verifiers.
E.g.
class IsPointer< string arg > : PredOpTrait< "value is of a pointer type",
CPred< "$" # arg # ".getType().hasTrait< mlir::TypeTrait::PointerTypeTrait >()" >
>;
and(CORE_TRAIT is our own macro):
CORE_TRAIT(PointerTypeTrait);
and adding the trait to the relevant types (in this case PointerType and DecayedType).
Instead, we could have (in include/vast/Dialect/Highlevel/HighlevelTypes.td):
To me it seems a bit more uniform with how the rest of the verification is done
I vaguely remember, that having to write the C++ code (in TypeTraits.hpp) might be problematic for dynamic dialects or something like that (@xlauko might remember more?)
Disadvantages:
TypeTraits are a bit more flexible (anyone can pass their type into our operations by adding the trait to it)
TypeTraits can be used by multiple dialects in VAST (although I don't believe that's the case right now)
The information about the predicate is further from the type itself
The text was updated successfully, but these errors were encountered:
Prerequisites
Description
Currently, we have several custom type traits (in
include/vast/Dialect/Core/Utils.td
andinclude/vast/Dialect/Core/TypeTraits.hpp
) to generate traits for Operation verifiers.E.g.
and(
CORE_TRAIT
is our own macro):and adding the trait to the relevant types (in this case
PointerType
andDecayedType
).Instead, we could have (in
include/vast/Dialect/Highlevel/HighlevelTypes.td
):without any additional code.
Advantages:
TypeTraits.hpp
) might be problematic for dynamic dialects or something like that (@xlauko might remember more?)Disadvantages:
TypeTrait
s are a bit more flexible (anyone can pass their type into our operations by adding the trait to it)TypeTrait
s can be used by multiple dialects inVAST
(although I don't believe that's the case right now)The text was updated successfully, but these errors were encountered: