Dataflow optimization apparatus and method for low-power operation of multicore systems