1. A method comprising: obtaining code of a superblock; building a directed acyclic graph (DAG); sorting a plurality of nodes of the DAG into a topological order; forming a plurality of strands from the plurality of nodes based on hardware constraints, rule constraints, and scheduling constraints, each of the strands including at least one node; optimizing at least some of the plurality of strands; and generating executable code for each of the plurality of strands and storing the executable code in a storage.