A question about DBG_VALUE and Frame Index

Hi,

I have a case that is causing me grief in the form of an assert. The prolog
Epilog inserter tries to remove Frame Index references. I have a DBG_VALUE
instruction that looks like this (alongwith the Frame Index). This is for
the Hexagon backend.

The offset field on a DBG_VALUE instruction refers to the user variable, not the first register argument.

Your DBG_VALUE above is saying that fooBar[-84] can be found in %R30.

You want something like:

  DBG_VALUE %R30, -84, 0, !"fooBar"

That is a target-dependent DBG_VALUE, you will need to implement the target hooks to create and parse it. Target-dependent DBG_VALUE instrs are recognized by having more than 3 operands.

/jakob

The offset field on a DBG_VALUE instruction refers to the user
variable, not the first register argument.

Your DBG_VALUE above is saying that fooBar[-84] can be found in %R30.

You want something like:

  DBG_VALUE %R30, -84, 0, !"fooBar"

That is a target-dependent DBG_VALUE, you will need to implement the
target hooks to create and parse it. Target-dependent DBG_VALUE instrs
are recognized by having more than 3 operands.

/jakob

Right, thanks for the information Jakob.

I'll dig through the source code / documentation, looking for the necessary
target hooks and bother folks on this list, if I have questions regarding
this.

Thanks again,
Pranav