Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type sizes and boolean #4

Open
rengolin opened this issue Apr 2, 2020 · 0 comments
Open

Type sizes and boolean #4

rengolin opened this issue Apr 2, 2020 · 0 comments

Comments

@rengolin
Copy link

rengolin commented Apr 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant