epiqc / ScaffCC

Compilation, analysis and optimization framework for the Scaffold quantum programming language.
BSD 2-Clause "Simplified" License
188 stars 53 forks source link

[scripts] Fix gen-ll issue. #6

Closed xiangzhai closed 6 years ago

xiangzhai commented 6 years ago

Hi ScaffCC developers,

$ ./scripts/gen-ll.sh Algorithms/Binary_Welded_Tree/binary_welded_tree.n100s100.scaffold
[gen-ll.sh] binary_welded_tree.n100s100: Creating output directory ...
[gen-ll.sh] binary_welded_tree.n100s100: Compiling ...
[Scaffold.makefile] Compiling binary_welded_tree.n100s100_merged.scaffold ...
[Scaffold.makefile] Transforming cbits ...
[Scaffold.makefile] O1 optimizations ...
[Scaffold.makefile] Unrolling Loops (1) ...
[Scaffold.makefile] Cloning Functions (1) ...
Functions Cloned: 16
[Scaffold.makefile] Dead Argument Elimination (1) ...
[Scaffold.makefile] Unrolling Loops (2) ...
[Scaffold.makefile] Cloning Functions (2) ...
Functions Cloned: 0
[Scaffold.makefile] Dead Argument Elimination (2) ...
[Scaffold.makefile] Decomposing Rotations ...
Calling './scripts/../Rotations/gridsynth/gridsynth "(-114.590000)" -d 4'
Calling './scripts/../Rotations/gridsynth/gridsynth "(114.590000)" -d 4'
[Scaffold.makefile] Internalizing and Removing Unused Functions ...
[Scaffold.makefile] Toffoli Decomposition ...
[Scaffold.makefile] Inserting Reverse Functions...
[Scaffold.makefile] Generating resource count ...
[Scaffold.makefile] Resources written to binary_welded_tree.n100s100.resources ...
mv: cannot stat 'binary_welded_tree.n100s10011.ll': No such file or directory
mv: cannot stat 'binary_welded_tree.n100s10011.ll.keep_me': No such file or directory

So I simply add -k to keep LLVM IR files, please review my patch, thanks a lot!

Regards, Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/