compiling a function multiple times

Is there any way in LLVM to compile a function multiple times so that you can chose among various methods as to which generates the best code?