search for: pragma_instrument_mem_add

Displaying 2 results from an estimated 2 matches for "pragma_instrument_mem_add".

2010 Oct 25
4
[LLVMdev] Prevent instruction elimination
...ike 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. I used an add instruction: %0 = add i8 1, 2, !pragma_instrument_mem_add !0 ; <i8> [#uses=0] which should not carry any dependencies, if inserted inside a loop for instance. But the problem is that it is removed when I use the optimization level -O2. Is there a way to prevent this? I would like to attach metadata to instructions rather than using intrinsics th...
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
...earch for MDNode in the doxygen docs for some information on how to create metadata. Alternatively, you can use calls to external functions. These are seldomly optimized since optimizations assume that external functions can have undetermined side effects. -- John T. > %0 = add i8 1, 2, !pragma_instrument_mem_add !0 ;<i8> [#uses=0] > > which should not carry any dependencies, if inserted inside a loop for > instance. But the problem is that it is removed when I use the optimization > level -O2. Is there a way to prevent this? > I would like to attach metadata to instructions rather...