Help. LLVM Loop Pass

I am new to LLVM, and trying to make a LoopPass in order to optimize a loop. I have no clue how should I go about this. Can anyone please help?

There are tutorials on LLVM and on writing a pass on YT, start there.