LLVMSharp icon indicating copy to clipboard operation
LLVMSharp copied to clipboard

ReplaceAllUsesWith is very slow

Open yowl opened this issue 5 years ago • 0 comments

This method is very slow, not actually sure it completes as I gave up waiting. Other replace methods such as listed http://llvm.org/docs/ProgrammersManual.html#replacing-an-instruction-with-another-value are not available which make certain compilation tasks awkward and non optimal. E.g. If I want a gep through out a function but dont know the offset until compilation has analysed all the input function, I can't just replace the geps at the end, but have to use an alloca/store/load and insert instructions to create the correct store once the gep offset is known. Are the other replace operations not possible due to the use of iterators?

yowl avatar Sep 18 '20 14:09 yowl