Pregunta

I want to insert the getelementpr instruction in my code, like the one shown below.

%i1 = getelementptr inbounds [16 x i64]* @Counters, i64 0, i64 %8

How can I insert that? I can insert load and store instructions by using the constructors of LoadInst and StoreInst classes, but the constructor for GetElementPtrInst is declared private, so can't use it. So, my question is how to add this instruction from my code for an LLVM pass.

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top