Help using getSUnit

Hello,
I’m a grad student working on project using LLVM.
I’m trying to reorder machine instructions within a basic block using a pre emit pass. the pass relies on checking dependencies therefore getSUnit is a critical method for this pass. The issue I’m having is I can not access the method SUnit* getSUnit( MachineInstr *MI) const. I tried declaring my pass class as a ScheduleDAGInstrs friend but I still can’t have access. Please advice.
Thanks,
Hamza Halli

If I remember correctly about friend classes

class YourClass {
friend class ScheduleDAGInstrs;

}

This only allows ScheduleDAGInstr to access the private/protected members of YourClass, not the other way around.

Hope this helps,
Patrick