}
}
+
+class MallocPoolRelease {
+public:
+ ~MallocPoolRelease() {
+ r600::release_pool();
+ }
+};
+
int r600_shader_from_nir(struct r600_context *rctx,
struct r600_pipe_shader *pipeshader,
r600_shader_key *key)
{
+ MallocPoolRelease pool_release;
+
struct r600_pipe_shader_selector *sel = pipeshader->selector;
bool lower_64bit = (rctx->b.gfx_level < CAYMAN &&
const pipe_stream_output_info *m_so_info {nullptr};
- std::unordered_map<int, RegisterVec4 *> m_output_registers;
+ template <typename Key, typename T>
+ using unordered_map_alloc = std::unordered_map<Key, T, std::hash<Key>, std::equal_to<Key>,
+ Allocator<std::pair<const Key, T>>>;
+
+ unordered_map_alloc<int, RegisterVec4 *> m_output_registers;
};
#include <cassert>
#include <ostream>
#include <unordered_map>
+#include <list>
struct r600_shader;
using ROValueMap = unordered_reg_map_alloc<RegisterKey, PVirtualValue>;
RegisterMap m_registers;
- std::vector<PRegister> m_pinned_registers;
+ std::list<PRegister, Allocator<PRegister>> m_pinned_registers;
ROValueMap m_values;
unordered_map_alloc<uint32_t, PLiteralVirtualValue> m_literal_values;
unordered_map_alloc<uint32_t, InlineConstant::Pointer> m_inline_constants;