Converted LoopPass to FunctionPass