davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
197 stars 58 forks source link

Question: live registers per basic block #150

Closed pmatos closed 5 years ago

pmatos commented 5 years ago

I have just sent an email to the GCC mailing and then I remembered about this plugin... Is there a way using this plugin to compile a piece of code and then get a list of all the live registers at the end of each basic block?

davidmalcolm commented 5 years ago

The plugin barely touches the backend/RTL stuff. You ought to be able to walk the basic blocks, and you might be able to get at the RTL insns within them. IIRC there isn't currently a way to walk the operands of the RTL insns.

pmatos commented 5 years ago

Thanks @davidmalcolm . Shame. I remember there was an option that would print some information to with the assembler but can't remember which one. Hopefully, someone will chime in the mailing list.