@paxteam say, do you know how to build a tmp variable in gcc plugin of "**" ? ptr_type only create "*" but i never found how to create "**" tmp var...
1
sorry, i don't quite get the question. are you trying to create a ptr-to-ptr-to-something type? or are you trying to create a variable whose value would be the address of another variable of ptr-to-something type?
1
since its a complex question on what i'm trying to do i have paste the entire background and code and work i have done here: justpaste.it/5kxo5 would appreciate the help since there is no resources / places that ppl help in regards to GCC plugins...
1
Replying to @LolyRoP
i'm afraid you can't do this as is. SSA_NAMEs are 'abstract' variables, you can't take their address, etc. what you need is a VAR_DECL and that implies a whole lot more transformations. also look into the pointer alias analysis parts of gcc.

Sep 18, 2020 · 7:50 AM UTC

1
Replying to @paxteam
Yea I was afraid of that... I'm going to hack another pass in RTL to inject a PUSh of LEA to scratch register of the pointer (x86) instead of the existing push of just a pointer (just lhs without converting)...
1
why do you even need the address of such ptrs? what if they never hit memory and are kept in registers? what if they spill to/reload from the stack at arbitrary points in the function?
2