Re: [rvm-research] Quesiton on passing the object operand of getfield instruction to an instrumented function call inserted after the getfield in opt

Chunbai YANG <[email protected]> Tue, 15 Dec 2015 11:30:29 +0800
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CABpGBxbiVuSqo9fNx=CWP08ZTxdYCe6mhpxj-C=W+NxJnCCgoA@mail.gmail.com>
Dear Mike,

Thanks for your suggestion. I use

> RegisterOperand refCopy = IRTools.moveIntoRegister(..);

, which creates a new symbolic register and inserts a move operation before
the getfield instruction to copy the value of the original operand. Now the
problem is solved.

Thank you for your help.

Regards,
Chunbai

Hi Chunbai,

I think the issue may be that your instrumentation is encountering an IR
> instruction like this:
> r = r.f;
> That is, the result and the ref are the same symbolic register. Although
> the opt compiler's generated IR mostly generates "SSA-ish" code, it
> still sometimes generates instructions like r = r.f.
> Perhaps the easiest way to deal with this case is to introduce a new
> symbolic register:
> newTempRegister = r.f;
> /* insert your instrumentation here */
> r = newTempRegister;
> Cheers,
> Mike

------------------------------------------------------------------------------

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers