How to invoke LLVM Xray runtime library?

New to LLVM. Was going through LLVM Xray to patch/unpatch my functions during runtime. Is it possible to use the functionality as xray_patch_function(id) without recompiling a program?