[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: questions about Tags and Jimple and Baf
From what I understand, when you add a tag to a valuebox or a stmt in
Jimple and then convert to Baf the tags are not propagated to the Baf
units. So, I think you need some kind of aggregator to decide which Baf
unit(s) gets the tags from the Jimple stmt and to propagate them.
Jennifer
On Thu, 11 Dec 2003, Chris Pickett wrote:
> Hi,
>
> Here is what I would like to do:
>
> 1) In Jimple, determine if a method return value is consumed or not. I
> already have this working, I just check if an InvokeExpr appears as the
> rvalue of an AssignStmt (it's can't be consumed otherwise because Jimple
> is stackless).
>
> 2) Attach a Tag to the InvokeExpr in question saying whether or not the
> method return value is consumed.
>
> 3) In Baf, recognize all <X>InvokeInst's that have Tags from the
> preceding Jimple phase, and insert two StaticInvokeInst's of my own, one
> immediately before, and one immediately after the <X>InvokeInst. The
> specific call in the second StaticInvokeInst will depend on whether or
> not the Tag says the method return value is consumed or not.
>
>
> It seems that using a TagAggregrator is not appropriate in this case,
> since I'm just passing information between Jimple and Baf and not
> actually creating any attributes. Is that right?
>
> Also, will it work if I attach Tags to the ValueBox returned by either
> InvokeStmt.getInvokeExprBox() or AssignStmt.getRightOpBox(), and then
> retrieve them in Baf using <X>InvokeInst.getTag()? Is there an
> obviously better way of doing things? I'm avoiding doing this with
> attributes for now because I think it would take longer to get working.
>
> Cheers,
> Chris
>
>