search for: llvm_dummy_inst

Displaying 4 results from an estimated 4 matches for "llvm_dummy_inst".

2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
...information. I want to keep this > information until I run some passes on the *.bc files and manipulate the > code. Then, I delete those "dummy" instructions. > I want to transform this: > #pragma my_pragma { > > C/C++ code > C/C++ code > } > > into > LLVM_dummy_inst1 , !metadata_info !0 > optimized LLVM code > optimized LLVM code > LLVM_dummy_inst2, !metadata_info !1 > > but if I run this with clang -O2 or with opt -O2, my dummy_inst are removed, > so I cannot find the pragmas in the LLVM IR. > > I know that metadata will not prevent...
2010 Oct 25
2
[LLVMdev] Prevent instruction elimination
...e code and to adapt clang to transform them in metadata information. I want to keep this information until I run some passes on the *.bc files and manipulate the code. Then, I delete those "dummy" instructions. I want to transform this: #pragma my_pragma { C/C++ code C/C++ code } into LLVM_dummy_inst1 , !metadata_info !0 optimized LLVM code optimized LLVM code LLVM_dummy_inst2, !metadata_info !1 but if I run this with clang -O2 or with opt -O2, my dummy_inst are removed, so I cannot find the pragmas in the LLVM IR. I know that metadata will not prevent the elimination, but I am asking if ther...
2010 Oct 25
2
[LLVMdev] Prevent instruction elimination
Devang Patel wrote: > > > What are you going to do if "optimized LLVM code" is hoisted above or > sinked below LLVM_dummy_inst by the optimizer ? It seems you are looking > for a way communicate some info for a block of instructions. If that is > the case then one solution is to extract interesting block of instructions > in a separate function and make sure that function is not inlined. If this > is not feasib...
2010 Oct 25
0
[LLVMdev] Prevent instruction elimination
On Oct 25, 2010, at 12:09 PM, Xinfinity wrote: > > > Devang Patel wrote: >> >> >> What are you going to do if "optimized LLVM code" is hoisted above or >> sinked below LLVM_dummy_inst by the optimizer ? It seems you are looking >> for a way communicate some info for a block of instructions. If that is >> the case then one solution is to extract interesting block of instructions >> in a separate function and make sure that function is not inlined. If this >&g...