r600g: compute support for evergreen
[mesa.git] / src / glsl / ir_basic_block.cpp
index f9953ea42dafa47b89276472b7990b4d8025b918..86e0cf795a13b903eba4a242a0b35c2ebe240c54 100644 (file)
 #include "ir_basic_block.h"
 #include "glsl_types.h"
 
-class ir_has_call_visitor : public ir_hierarchical_visitor {
-public:
-   ir_has_call_visitor()
-   {
-      has_call = false;
-   }
-
-   virtual ir_visitor_status visit_enter(ir_call *ir)
-   {
-      (void) ir;
-      has_call = true;
-      return visit_stop;
-   }
-
-   bool has_call;
-};
-
 /**
  * Calls a user function for every basic block in the instruction stream.
  *
@@ -114,27 +97,6 @@ void call_for_basic_blocks(exec_list *instructions,
 
            call_for_basic_blocks(&ir_sig->body, callback, data);
         }
-      } else if (ir->as_assignment()) {
-        ir_has_call_visitor v;
-
-        /* If there's a call in the expression tree being assigned,
-         * then that ends the BB too.
-         *
-         * The assumption is that any consumer of the basic block
-         * walker is fine with the fact that the call is somewhere in
-         * the tree even if portions of the tree may be evaluated
-         * after the call.
-         *
-         * A consumer that has an issue with this could not process
-         * the last instruction of the basic block.  If doing so,
-         * expression flattener may be useful before using the basic
-         * block finder to get more maximal basic blocks out.
-         */
-        ir->accept(&v);
-        if (v.has_call) {
-           callback(leader, ir, data);
-           leader = NULL;
-        }
       }
       last = ir;
    }