What's the difference between a transform pass and another pass?
A transform pass is a pass that may invalidate the results of other passes.
How to I express this dependency for my pass?
First of all, I recommend reading the pass-dependency section of the official "how to write a pass" guide. In any case, the correct way to add a dependency between transformation passes is to add one before the other in your pass manager (see the guide section on the pass manager), or, if you just invoke opt
, then add all the passes you want in the order you want them to occur, e.g.:
opt -load mypass.so -mem2reg -mypass