My LLVM project has reached a point that the complexity and inter-pass dependency often cause circular dependencies using opt tool.
I have the following individual/dependent/independent passes over opt:
I want to write a control pass (e.g., call it ABC pass) which can be used to precisely control the ordering of all my passes. When I say:
opt xyz.so -abc < input.bc > output.bc
It will actually create a pass manager, insert all individual passes, while precisely specifying the dependencies among them.
This way, I can avoid the circular dependency dead lock.
However, this (local) pass manager should still cooperate well with the rest of the LLVM system.
Could someone point me to a code sample, a tutorial section or a file currently under LLVM 2.7/2.8 release?