diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp')
-rw-r--r-- | lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp b/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp index d31a1b76d..a85537c2a 100644 --- a/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp +++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp @@ -212,21 +212,20 @@ void value_table::get_values(vvec& v) { } } -void value::add_use(node* n, use_kind kind, int arg) { +void value::add_use(node* n) { if (0) { sblog << "add_use "; dump::dump_val(this); sblog << " => "; dump::dump_op(n); - sblog << " kind " << kind << " arg " << arg << "\n"; } - uses.push_back(new use_info(n, kind, arg)); + uses.push_back(n); } struct use_node_comp { explicit use_node_comp(const node *n) : n(n) {} - bool operator() (const use_info *u) { - return u->op->hash() == n->hash(); + bool operator() (const node *o) { + return o->hash() == n->hash(); } private: @@ -239,9 +238,7 @@ void value::remove_use(const node *n) { if (it != uses.end()) { - // TODO assert((*it)->kind == kind) ? - // TODO assert((*it)->arg == arg) ? - delete *it; + // We only ever had a pointer, so don't delete it here uses.erase(it); } } @@ -291,12 +288,8 @@ bool value::is_prealloc() { } void value::delete_uses() { - for (uselist::iterator it = uses.begin(); it != uses.end(); ++it) - { - delete *it; - } - - uses.clear(); + // We only ever had pointers, so don't delete them here + uses.erase(uses.begin(), uses.end()); } void ra_constraint::update_values() { |