Skip to content

Type sizes and boolean #4

@rengolin

Description

@rengolin

Types don't seem to have fixed sizes in Rise.

def IntType : Type<CPred<"$_self.isa<Int>()">, "int type">;
def FloatType : Type<CPred<"$_self.isa<Float>()">, "float type">;

I'm assuming it becomes a decision of the dialect conversion which underlying standard type to use, perhaps using the native type of the underlying hardware (word size, FPR width, etc).

However, MLIR (and LLVM) use i1 to represent boolean values, and without a direct boolean type in Rise or a way to define bit-width, it's impossible to represent boolean values in Rise.

If/once conditionals are introduced as a first-class citizen, boolean values would be required. In that case, I'd assume creating a new BoolType would make more sense than allowing IntType to define the bit-width.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions