1

I build the LLVM from source in release edtion.Now get the loop or cycle information is what i need.But it just can't work.

    $opt -passes=print<cycles>  input.ll -o /dev/null               
    zsh: no such file or directory: cycles
dongjibin
  • 11
  • 1
  • "opt -enable-new-pm=0 -analyze -loops input.bc" This one get work, but it use the legacy pass manager. And "passes=print" still can't work. Don't konw why.. – dongjibin Jul 29 '22 at 11:18

1 Answers1

0

The unix command opt -passes=print<cycles> input.ll means to run the command opt -passes=print while reading from the file named cycles and writing to the file named input.ll.

Have a look at the answers to this question for more about this shell syntax.

You may want to use opt -passes='print<cycles>', that will at least not be interpreted by the shell, but I fear that won't work either. I've no idea what print<cycles> is supposed to achieve.

arnt
  • 8,949
  • 5
  • 24
  • 32