llvm pass command

Hello all,

I am Shreyas Mysore Shankar, Master student from western michigan university. This semester i am doing a project on llvm. I have selected dead loop deletion as my project. I rigorously searched for the command to execute dead loop deletion pass but couldn't find it. I have my final project demo due next week. So kindly help me by suggesting the process. Since this llvm is completely new for me, brief explanation would be of great help.

When i discussed with my classmates they said we have to use the command with opt. i will be waiting for your response.

Thank you,

Regards,
Shreyas

Hi Shreyas,

It would be helpful if you could post a sample code for your example.
Have you tried -O3 and checked if the loop is deleted or not?

Regards,
Kamal

Hi Shreyas,

I think you need to call "opt" with this flag: -loop-deletion

You can find more flags using -help option for opt tool (and for other LLVM
tools also)

Also I have looked and found this documentation in the web:
http://llvm.org/docs/Passes.html#loop-deletion-delete-dead-loops

Also you can find corresponding llvm pass bassicaly in lib/Transforms
directory.

Regards,
Arsen