Graph Rewriting-based Superoptimisation