return num_operands[this->operation];
}
-ir_label::ir_label(const char *label, ir_function_signature *signature)
- : label(label), signature(signature)
-{
- /* empty */
-}
-
ir_constant::ir_constant(const struct glsl_type *type, const void *data)
{
};
-class ir_label : public ir_instruction {
-public:
- ir_label(const char *label, ir_function_signature *signature);
-
- virtual ir_label *as_label()
- {
- return this;
- }
-
- virtual void accept(ir_visitor *v)
- {
- v->visit(this);
- }
-
- const char *label;
-
- ir_function_signature *signature;
-};
-
-
/*@{*/
/**
* The representation of a function instance; may be the full definition or
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_function_signature *);
virtual void visit(ir_function *);
virtual void visit(ir_expression *);
}
-void
-ir_constant_visitor::visit(ir_label *ir)
-{
- (void) ir;
- value = NULL;
-}
-
-
void
ir_constant_visitor::visit(ir_function_signature *ir)
{
}
-void
-ir_constant_folding_visitor::visit(ir_label *ir)
-{
- ir->signature->accept(this);
-}
-
-
void
ir_constant_folding_visitor::visit(ir_function_signature *ir)
{
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_function_signature *);
virtual void visit(ir_function *);
virtual void visit(ir_expression *);
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_loop *);
virtual void visit(ir_loop_jump *);
virtual void visit(ir_function_signature *);
(void) ir;
}
-
-void
-ir_expression_flattening_visitor::visit(ir_label *ir)
-{
- ir->signature->accept(this);
-}
-
void
ir_expression_flattening_visitor::visit(ir_loop *ir)
{
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_loop *);
virtual void visit(ir_loop_jump *);
virtual void visit(ir_function_signature *);
this->remap_variable(ir, new_var);
}
-void
-ir_function_cloning_visitor::visit(ir_label *ir)
-{
- (void)ir;
- this->result = NULL;
-}
-
void
ir_function_cloning_visitor::visit(ir_loop *ir)
{
}
-void
-ir_function_inlining_visitor::visit(ir_label *ir)
-{
- ir->signature->accept(this);
-}
-
void
ir_function_inlining_visitor::visit(ir_loop *ir)
{
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_loop *);
virtual void visit(ir_loop_jump *);
virtual void visit(ir_function_signature *);
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_loop *);
virtual void visit(ir_loop_jump *);
virtual void visit(ir_function_signature *);
}
-void
-ir_if_simplification_visitor::visit(ir_label *ir)
-{
- ir->signature->accept(this);
-}
-
void
ir_if_simplification_visitor::visit(ir_loop *ir)
{
}
-void ir_print_visitor::visit(ir_label *ir)
-{
- printf("\n(label %s\n", ir->label);
-
- ir->signature->accept(this);
- printf(")");
-}
-
-
void ir_print_visitor::visit(ir_function_signature *ir)
{
printf("(signature\n (parameters\n");
*/
/*@{*/
virtual void visit(ir_variable *);
- virtual void visit(ir_label *);
virtual void visit(ir_function_signature *);
virtual void visit(ir_function *);
virtual void visit(ir_expression *);
*/
/*@{*/
virtual void visit(class ir_variable *) = 0;
- virtual void visit(class ir_label *) = 0;
virtual void visit(class ir_function_signature *) = 0;
virtual void visit(class ir_function *) = 0;
virtual void visit(class ir_expression *) = 0;