Post-process the LLVM IR generated by new/new []/delete/delete []

Hello everyone,

I am new to Clang. I want to post-process/manipulate the LLVM IR generated by new/new /delete/delete .

For example, if I write:

int *p = new int(3);

Its generated LLVM IR may be:

%11 = tail call noalias i8* @_Znwj(i32 4) #9
%12 = bitcast i8* %11 to i32*
store i32 3, i32* %12, align 4, !tbaa !6

Now I want to manipulate (eg. add specific metadata to) these corresponding IR during AST → LLVM IR stage (CodeGenFunction?). Is there anyway I can do that?

Many thanks