Make function bodies rely on the parameter variable declarations.
Previously, generating inlined function bodies was going to be difficult, as there was no mapping between the body's declaration of variables where parameter values were supposed to live and the parameter variables that a caller would use in paramater setup. Presumably this also have been a problem for actual codegen.
This commit is contained in:
committed by
Ian Romanick
parent
6173312d84
commit
fbc7c0b8f2
@@ -224,13 +224,9 @@ generate_function_instance(ir_function *f,
|
||||
for (i = 0; i < n_args; i++) {
|
||||
ir_variable *var = new ir_variable(type, arg_names[i]);
|
||||
|
||||
var = new ir_variable(type, arg_names[i]);
|
||||
var->mode = ir_var_in;
|
||||
sig->parameters.push_tail(var);
|
||||
|
||||
var = new ir_variable(type, arg_names[i]);
|
||||
var->mode = ir_var_in;
|
||||
sig->body.push_tail(var);
|
||||
declarations[i] = var;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user