Save dag dot files


I am using llvm to analyze a set of applications, for example I use the ``-view-isel-dags option to visualize the dag during the selection phase. Now I would like to save the temp files used to generate those DAGs and also convert them to text if possible.

Is there a way to do this?