Change optimization level during compilation

Hello,

Is there a way to change the optimization level in the middle of compilation process when JIT’ing the code lazily? To be more clear, I have code in bitcode format and I am using LLI to execute it using JIT. But during some point of time in the execution, I want to set a different level of optimization for the remainder of the code yet to be compiled and executed. Is there a way to do it?

Your help is much appreciated.

Thanks,
Sumeeth