From 7c9ac125a9f13db81bf505616f665a9c35d7fc2e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 24 Jan 2015 04:41:45 -0800 Subject: [PATCH] nouveau/codegen: Remove tr1 namespace. Fix build error on FreeBSD 10. CXX codegen/nv50_ir.lo In file included from codegen/nv50_ir.cpp:23: ./codegen/nv50_ir.h:585:9: error: no member named 'tr1' in namespace 'std' std::tr1::unordered_set uses; ~~~~~^ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88766 Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 8 ++++---- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 ++-- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h | 4 ++-- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h b/src/gallium/drivers/nouveau/codegen/nv50_ir.h index 0ff5e5d..ebfcbf1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "codegen/nv50_ir_util.h" #include "codegen/nv50_ir_graph.h" @@ -582,10 +582,10 @@ public: static inline Value *get(Iterator&); - std::tr1::unordered_set uses; + std::unordered_set uses; std::list defs; - typedef std::tr1::unordered_set::iterator UseIterator; - typedef std::tr1::unordered_set::const_iterator UseCIterator; + typedef std::unordered_set::iterator UseIterator; + typedef std::unordered_set::const_iterator UseCIterator; typedef std::list::iterator DefIterator; typedef std::list::const_iterator DefCIterator; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index c234131..72412fc 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -178,7 +178,7 @@ NVC0LegalizePostRA::findFirstUses( const Instruction *texi, const Instruction *insn, std::list &uses, - std::tr1::unordered_set& visited) + std::unordered_set& visited) { for (int d = 0; insn->defExists(d); ++d) { Value *v = insn->getDef(d); @@ -272,7 +272,7 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn) if (!uses) return false; for (size_t i = 0; i < texes.size(); ++i) { - std::tr1::unordered_set visited; + std::unordered_set visited; findFirstUses(texes[i], texes[i], uses[i], visited); } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h index d8ff5cd..8e013b3 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h @@ -20,7 +20,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include #include "codegen/nv50_ir.h" #include "codegen/nv50_ir_build_util.h" @@ -72,7 +72,7 @@ private: inline bool insnDominatedBy(const Instruction *, const Instruction *) const; void findFirstUses(const Instruction *tex, const Instruction *def, std::list&, - std::tr1::unordered_set&); + std::unordered_set&); void findOverwritingDefs(const Instruction *tex, Instruction *insn, const BasicBlock *term, std::list&); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 898653c..7a62f6a 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include namespace nv50_ir { @@ -1551,7 +1551,7 @@ SpillCodeInserter::run(const std::list& lst) // 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). - std::tr1::unordered_set to_del; + std::unordered_set to_del; for (Value::DefIterator d = lval->defs.begin(); d != lval->defs.end(); ++d) { @@ -1593,7 +1593,7 @@ SpillCodeInserter::run(const std::list& lst) } } - for (std::tr1::unordered_set::const_iterator it = to_del.begin(); + for (std::unordered_set::const_iterator it = to_del.begin(); it != to_del.end(); ++it) delete_Instruction(func->getProgram(), *it); } -- 2.2.1