This commit is contained in:
Violet 2025-09-19 00:40:19 +00:00
commit c9cc62de33
3 changed files with 10 additions and 8 deletions

View file

@ -123,10 +123,9 @@ impl<'a, 'input> ModuleEmitContext<'a, 'input> {
let fn_type = get_function_type(
self.context,
method.return_arguments.iter().map(|v| &v.info.v_type),
method
.input_arguments
.iter()
.map(|v| get_input_argument_type(self.context, &v.info.v_type, v.info.state_space)),
method.input_arguments.iter().map(|v| {
get_input_argument_type(self.context, &v.info.v_type, v.info.state_space)
}),
)?;
fn_ = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type) };
self.emit_fn_attribute(fn_, "amdgpu-unsafe-fp-atomics", "true");

View file

@ -1004,7 +1004,10 @@ pub enum MultiVariable<ID> {
name: ID,
count: u32,
},
Names { info: VariableInfo<ID>, names: Vec<ID> },
Names {
info: VariableInfo<ID>,
names: Vec<ID>,
},
}
#[derive(Clone)]

View file

@ -993,7 +993,7 @@ fn multi_variable<'a, 'input: 'a>(
state_space,
array_init: Vec::new(),
},
name: name,
name,
count,
});
}
@ -1019,9 +1019,9 @@ fn multi_variable<'a, 'input: 'a>(
Ok(MultiVariable::Names {
info: VariableInfo {
align,
v_type: Type::maybe_array(vector, type_, array_dimensions.clone()),
v_type: Type::maybe_array(vector, type_, array_dimensions),
state_space,
array_init: initializer.clone().unwrap_or(Vec::new()),
array_init: initializer.unwrap_or(Vec::new()),
},
names,
})