Need help on how to write MachineFunctionPass

Deer All,

I wanted to write MachineFunctionPass which needs to be run after global register allocation pass.
I have read LLVM documentation and blogs and able to write simple pass which will is invoked through opt command line.

However, I could able to find any blogs or document to explains clear steps for writing MachineFunctionPass.

Please suggest some documents or blogs which will help me write MachineFunctionPass.

Any help is going to be appreciated.

Thanks,

Bala

sorry for typo,

Dear All,

I wanted to write MachineFunctionPass which needs to be run after global register allocation pass.
I have read LLVM documentation and blogs and able to write simple pass which is invoked through opt commands.

However, I could able to find any blogs or document to explains clear steps for writing MachineFunctionPass.

Please suggest some documents or blogs which will help me write MachineFunctionPass.

Any help is going to be appreciated.

Thanks,

Bala