summaryrefslogtreecommitdiff
path: root/builtin_function.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-04-07 14:32:53 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-07 17:23:23 -0700
commitfbc7c0b8f2e161bce1c048c63d2d5cfcdeb096f1 (patch)
tree844b220fd9ba21041473312f5d1f847221ea41f2 /builtin_function.cpp
parent6173312d84daabaf6dbe8fa15558cba4c9cb9f5e (diff)
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.
Diffstat (limited to 'builtin_function.cpp')
-rw-r--r--builtin_function.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/builtin_function.cpp b/builtin_function.cpp
index 9cefbd4..e537141 100644
--- a/builtin_function.cpp
+++ b/builtin_function.cpp
@@ -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;
}