I have created a new intrinsic in RISCV and I am trying to insert it at the start of every function based on Command-Line argument which determines the list of functions to omit. I expect this intrinsic to be inserted at the start of function as first instruction, i.e. even before the function prologue. Is this possible with a normal Module/Function pass using opt command? Or, should I look into MachineFunction pass?
Please guide me in this.