Mesa as a whole requires C++14 nowadays, so this isn't needed any more.
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17307>
'nv50_ir_target_nv50.h',
'nv50_ir_util.cpp',
'nv50_ir_util.h',
- 'unordered_set.h',
'nv50_ir_emit_gv100.cpp',
'nv50_ir_emit_gv100.h',
'nv50_ir_emit_gk110.cpp',
#include <stdint.h>
#include <deque>
#include <list>
+#include <unordered_set>
#include <vector>
-#include "unordered_set.h"
#include "nv50_ir_util.h"
#include "nv50_ir_graph.h"
static inline Value *get(Iterator&);
- unordered_set<ValueRef *> uses;
+ std::unordered_set<ValueRef *> uses;
std::list<ValueDef *> defs;
- typedef unordered_set<ValueRef *>::iterator UseIterator;
- typedef unordered_set<ValueRef *>::const_iterator UseCIterator;
+ typedef std::unordered_set<ValueRef *>::iterator UseIterator;
+ typedef std::unordered_set<ValueRef *>::const_iterator UseCIterator;
typedef std::list<ValueDef *>::iterator DefIterator;
typedef std::list<ValueDef *>::const_iterator DefCIterator;
#include "nv50_ir_util.h"
#include "tgsi/tgsi_from_mesa.h"
-#if __cplusplus >= 201103L
#include <unordered_map>
-#else
-#include <tr1/unordered_map>
-#endif
#include <cstring>
#include <list>
#include <vector>
namespace {
-#if __cplusplus >= 201103L
-using std::hash;
-using std::unordered_map;
-#else
-using std::tr1::hash;
-using std::tr1::unordered_map;
-#endif
-
using namespace nv50_ir;
int
bool run();
private:
typedef std::vector<LValue*> LValues;
- typedef unordered_map<unsigned, LValues> NirDefMap;
- typedef unordered_map<unsigned, nir_load_const_instr*> ImmediateMap;
- typedef unordered_map<unsigned, BasicBlock*> NirBlockMap;
+ typedef std::unordered_map<unsigned, LValues> NirDefMap;
+ typedef std::unordered_map<unsigned, nir_load_const_instr*> ImmediateMap;
+ typedef std::unordered_map<unsigned, BasicBlock*> NirBlockMap;
CacheMode convert(enum gl_access_qualifier);
TexTarget convert(glsl_sampler_dim, bool isArray, bool isShadow);
int minGPR = texi->def(0).rep()->reg.data.id;
int maxGPR = minGPR + texi->def(0).rep()->reg.size / 4 - 1;
- unordered_set<const BasicBlock *> visited;
+ std::unordered_set<const BasicBlock *> visited;
findFirstUsesBB(minGPR, maxGPR, texi->next, texi, uses, visited);
}
NVC0LegalizePostRA::findFirstUsesBB(
int minGPR, int maxGPR, Instruction *start,
const Instruction *texi, std::list<TexUse> &uses,
- unordered_set<const BasicBlock *> &visited)
+ std::unordered_set<const BasicBlock *> &visited)
{
const BasicBlock *bb = start->bb;
void findFirstUses(Instruction *texi, std::list<TexUse> &uses);
void findFirstUsesBB(int minGPR, int maxGPR, Instruction *start,
const Instruction *texi, std::list<TexUse> &uses,
- unordered_set<const BasicBlock *> &visited);
+ std::unordered_set<const BasicBlock *> &visited);
void addTexUse(std::list<TexUse>&, Instruction *, const Instruction *);
const Instruction *recurseDef(const Instruction *);
#include <algorithm>
#include <stack>
#include <limits>
-#if __cplusplus >= 201103L
#include <unordered_map>
-#else
-#include <tr1/unordered_map>
-#endif
namespace nv50_ir {
-#if __cplusplus >= 201103L
-using std::hash;
-using std::unordered_map;
-#else
-using std::tr1::hash;
-using std::tr1::unordered_map;
-#endif
-
#define MAX_REGISTER_FILE_SIZE 256
class RegisterSet
struct PhiMapHash {
size_t operator()(const std::pair<Instruction *, BasicBlock *>& val) const {
- return hash<Instruction*>()(val.first) * 31 +
- hash<BasicBlock*>()(val.second);
+ return std::hash<Instruction*>()(val.first) * 31 +
+ std::hash<BasicBlock*>()(val.second);
}
};
-typedef unordered_map<
+typedef std::unordered_map<
std::pair<Instruction *, BasicBlock *>, Value *, PhiMapHash> PhiMap;
// Critical edges need to be split up so that work can be inserted along
// Keep track of which instructions to delete later. Deleting them
// inside the loop is unsafe since a single instruction may have
// multiple destinations that all need to be spilled (like OP_SPLIT).
- unordered_set<Instruction *> to_del;
+ std::unordered_set<Instruction *> to_del;
std::list<ValueDef *> &defs = mergedDefs(lval);
for (Value::DefIterator d = defs.begin(); d != defs.end();
}
}
- for (unordered_set<Instruction *>::const_iterator it = to_del.begin();
+ for (std::unordered_set<Instruction *>::const_iterator it = to_del.begin();
it != to_del.end(); ++it) {
mergedDefs.removeDefsOfInstruction(*it);
delete_Instruction(func->getProgram(), *it);
virtual void reset() { assert(0); } // only for graph iterators
};
-#if __cplusplus >= 201103L
typedef std::unique_ptr<Iterator> IteratorRef;
-#else
-typedef std::auto_ptr<Iterator> IteratorRef;
-#endif
class ManipIterator : public Iterator
{
+++ /dev/null
-#ifndef __NV50_UNORDERED_SET_H__
-#define __NV50_UNORDERED_SET_H__
-
-#if (__cplusplus >= 201103L)
-#include <unordered_set>
-#else
-#include <tr1/unordered_set>
-#endif
-
-namespace nv50_ir {
-
-#if __cplusplus >= 201103L
-using std::unordered_set;
-#else
-using std::tr1::unordered_set;
-#endif
-
-} // namespace nv50_ir
-
-#endif // __NV50_UNORDERED_SET_H__