Porting to 3.7 rises error "Pass 'MachineDominator Tree Construction' is not initialized."

Hi, Everyone!

I’m working on a framework that applies IR level optimizations to a given code. So,

it was working properly with LLVM 3.6, but then, I decided to port it to the version

3.7. For that, I add the Passes in the legacy::PassManager with PassInfo’s, and then,

run it.

Of course, it raised some problems, which I managed to fix, until sometime ago. I

noticed that when it was trying to compile the code with a given set of optimizations,

it raised this error (any set of optimizations raised this error):

Pass ‘MachineDominator Tree Construction’ is not initialized.

Verify if there is a pass dependency cycle.

Required Passes:

(There was no required Passes specified after that)

So, I tried initializing it before applying the optimizations with:
initializeMachineDominatorTreePass(*Registry);

But, unfortunately, nothing changed. So, I’m lost.

Any Ideas??

-Marcos