I have created a custom ModulePass which works fine when no optimization flag is enabled i.e. on -O0 level. I am trying to order the passes such that I run my ModulePass first and then the O2/O3 optimizations. Currently I am doing it in multiple steps, where at each step I getting the transformed IR and providing as input. Is it possible to specify this order in when invoking via clang itself.
Kindly guide me in this.