Connect new parser to LLVM bitcode backend (#269)

This is very incomplete. Just enough code to emit LLVM bitcode and continue further development
This commit is contained in:
Andrzej Janik 2024-09-13 01:07:31 +02:00 committed by GitHub
parent 193eb29be8
commit 46def3e7e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 10125 additions and 7508 deletions

View file

@ -1040,6 +1040,15 @@ pub enum MethodName<'input, ID> {
Func(ID),
}
impl<'input, ID> MethodName<'input, ID> {
pub fn is_kernel(&self) -> bool {
match self {
MethodName::Kernel(_) => true,
MethodName::Func(_) => false,
}
}
}
bitflags! {
pub struct LinkingDirective: u8 {
const NONE = 0b000;
@ -1128,7 +1137,7 @@ impl SetpData {
state.errors.push(PtxError::NonF32Ftz);
None
}
_ => None
_ => None,
};
let type_kind = type_.kind();
let cmp_op = if type_kind == ScalarKind::Float {