Hi all,
if I have a getElemtPrt instruction, acessing e.g. a datafield of a struct,
like I32 0, i64 1, i32 3, the instructin has 4 operands (the value and the
index sequence).
Suppose I want to alter the instruction to access an array, I would neet only
2 indices instead of three. How can I correct the instruction for this?
I could setOpernad 0 - 2, and would need to delete Operand 3.
simply by pop_back the operand list?
Thx
Alex.
Btw.: is the llvm-dev list available vial news server, and if so on which?
Up to now I used g.comp.compiler.llvm.devel which is the old an not the new
llvm-dev.
Hi all,
if I have a getElemtPrt instruction, acessing e.g. a datafield of a struct,
like I32 0, i64 1, i32 3, the instructin has 4 operands (the value and the
index sequence).
Suppose I want to alter the instruction to access an array, I would neet only
2 indices instead of three. How can I correct the instruction for this?
I could setOpernad 0 - 2, and would need to delete Operand 3.
simply by pop_back the operand list?
The easiest thing to do would be to create a new GEP instruction that has all of the operands of the original GEP except for the operand that you want to delete. You should then replace all uses of the old GEP with the new GEP.
Regards,
John Criswell