Move the talloc_parent lookup down in a few hot paths.
talloc_parent is still 80% of our runtime, but likely talloc_parent lookups will be reduced as we improve the handling of memory ownership.
This commit is contained in:
+2
-1
@@ -77,7 +77,6 @@ public:
|
||||
variable_entry *
|
||||
ir_dead_code_visitor::get_variable_entry(ir_variable *var)
|
||||
{
|
||||
void *ctx = talloc_parent(var);
|
||||
assert(var);
|
||||
foreach_iter(exec_list_iterator, iter, this->variable_list) {
|
||||
variable_entry *entry = (variable_entry *)iter.get();
|
||||
@@ -85,6 +84,8 @@ ir_dead_code_visitor::get_variable_entry(ir_variable *var)
|
||||
return entry;
|
||||
}
|
||||
|
||||
void *ctx = talloc_parent(var);
|
||||
|
||||
variable_entry *entry = new(ctx) variable_entry(var);
|
||||
this->variable_list.push_tail(entry);
|
||||
return entry;
|
||||
|
||||
Reference in New Issue
Block a user