[PATCH] D90020: [AArch64][SVE] Emit DWARF location expression for SVE stack objects.

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 02:00:02 PST 2021


dstenb added a comment.

In D90020#2477208 <https://reviews.llvm.org/D90020#2477208>, @sdesmalen wrote:

> In D90020#2455122 <https://reviews.llvm.org/D90020#2455122>, @dstenb wrote:
>
>> I'm sorry for chiming in so late here! I have a comment about the `prependOffsetExpression` target hook.
>
> Thanks for the suggestion, you made a good point that this interface was error prone when new flags are added in the future. I've updated the patch and added the virtual interface `getOffsetOpcodes` alongside `prependOffsetExpression` (made non-virtual and now handles the Deref, Stack/Entry Value). Let me know if this is how you imagined it.

Yes, thanks!

Since the `prependOffsetExpression` function is outside DIExpression perhaps it is worth just adding an assert that catches unknown flags?

  assert((PrependFlags & ~(DerefBefore | DerefAfter | StackValue | EntryValue)) == 0 && "Unknown prepend flag");


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90020/new/

https://reviews.llvm.org/D90020



More information about the llvm-commits mailing list