Structure declaration with IR builder

Hi,
I test your code and it works!!!
but I didn't understand if "create a function" it necessary for my aims.
What I tried to do is declare a structured to allow after declaration
global or local structured variables.
How I can I do?

Thanks,
Manuele