#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
/**
* Visitor class for replacing expressions with ir_constant values.
*/
bool progress;
};
+} /* unnamed namespace */
+
static inline bool
is_vec_zero(ir_constant *ir)
{
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
/**
* Visitor class for replacing expressions with ir_constant values.
*/
bool progress;
};
+} /* unnamed namespace */
+
void
ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue)
{
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
this->acp->push_tail(entry);
}
+} /* unnamed namespace */
+
/**
* Does a constant propagation pass on the code present in the instruction stream.
*/
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
struct assignment_entry {
exec_node link;
int assignment_count;
exec_list list;
};
+} /* unnamed namespace */
+
static struct assignment_entry *
get_assignment_entry(ir_variable *var, exec_list *list)
{
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
void *mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_visitor::visit_enter(ir_function_signature *ir)
{
static bool debug = false;
+namespace {
+
class acp_entry : public exec_node
{
public:
void *shader_mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir)
{
static bool debug = false;
+namespace {
+
class assignment_entry : public exec_node
{
public:
ir_hierarchical_visitor *visitor;
};
+} /* unnamed namespace */
/**
* Adds an entry to the available copy list if it's a plain assignment
#include "ir_expression_flattening.h"
#include "glsl_types.h"
+namespace {
+
class signature_entry : public exec_node
{
public:
void *mem_ctx;
};
+} /* unnamed namespace */
signature_entry *
ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
ir_variable *sampler,
ir_dereference *deref);
+namespace {
+
class ir_function_inlining_visitor : public ir_hierarchical_visitor {
public:
ir_function_inlining_visitor()
bool progress;
};
+} /* unnamed namespace */
bool
do_function_inlining(exec_list *instructions)
#include "ir.h"
+namespace {
+
class ir_if_simplification_visitor : public ir_hierarchical_visitor {
public:
ir_if_simplification_visitor()
bool made_progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level "if" instructions, so don't
* descend into expressions.
*/
#include "ir_print_visitor.h"
#include "glsl_types.h"
+namespace {
+
class ir_noop_swizzle_visitor : public ir_rvalue_visitor {
public:
ir_noop_swizzle_visitor()
bool progress;
};
+} /* unnamed namespace */
+
void
ir_noop_swizzle_visitor::handle_rvalue(ir_rvalue **rvalue)
{
#include "ir.h"
+namespace {
+
class redundant_jumps_visitor : public ir_hierarchical_visitor {
public:
redundant_jumps_visitor()
bool progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level instructions, so don't descend
* into expressions.
*/
#include "ir_rvalue_visitor.h"
#include "glsl_types.h"
+namespace {
+
static bool debug = false;
// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined
return visit_continue;
}
+} /* unnamed namespace */
+
bool
do_structure_splitting(exec_list *instructions)
{
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class ir_swizzle_swizzle_visitor : public ir_hierarchical_visitor {
public:
ir_swizzle_swizzle_visitor()
bool progress;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_swizzle_swizzle_visitor::visit_enter(ir_swizzle *ir)
{
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
static bool debug = false;
class ir_tree_grafting_visitor : public ir_hierarchical_visitor {
}
}
+} /* unnamed namespace */
+
/**
* Does a copy propagation pass on the code present in the instruction stream.
*/