Information in the function Prologue Data is intentionally opaque.
When a function with Prologue Data is duplicated. The self (global
value) references inside Prologue Data is still pointing to the
original function. This may cause errors like fatal error: error in backend: Cannot represent a difference across sections.
This patch detaches the information from function Prologue Data
and attaches it to a function metadata node.
This and D116130 fix https://github.com/llvm/llvm-project/issues/49689.
Are these proxy variables necessary? I think that now that we have custom code generation for this you should be able to use a GOTPCREL relocation to refer to the global.