Integrate my pass into opt?

I wrote a pass for myself. But the only way I know to run my pass is using the “-load” options of opt. I want to make my pass as a default pass integrated into opt so that I will not have to use the “-load” option every time. How could I do that? Thanks.

You can update one of the PassManagerBuilder::populate* methods to insert your pass at desired point.