[LLVMdev] Prevent instruction elimination

Devang Patel
Mon, 25 Oct 2010 16:29:41 -0000

On Oct 25, 2010, at 2:13 AM, Xinfinity wrote:

>
> Hello,
>
> Does there exist something like a "dummy" instruction that is not
removed by
> the optimizers, even if it seems to be dead code?
> I want to use such instructions to carry metadata information, but they
> should have a minimal impact on the code generation and optimization.

Use of metadata will not prevent optimizer from removing an instruction.
Actually, that is the corner stone of LLVM metadata design.

I am curious, what information you want to carry and until what point ?
-
Devang