LLVM pass for vector init and loop

This is Ashwin studying M.Tech CSE I year in VIT University. would you please help me for creating this pass.

  1. Write a pass (or a set of passes) that
    recognizes the vector init (initialization of a
    vector with a constant)
    • Example: for(i=0;i<5;i++)
    • The pass should report:
    – Matched computation, operand, size etc.
    – Alternatively replace matched loops by an
    equivalent function call

  2. Write a pass to find all loops in the given program?

Hi Ashwin, this sounds a lot like a homework problem. I hope you are not
asking us to do your homework for you?

Ciao, Duncan.