extra information in rtx data structure.

Viktor Pobedin viktor.pobedin@gmail.com
Mon May 13 06:33:00 GMT 2013


Hello,

What is the proper way of storing additional information in insn rtx object?
I'm adding two rtl passes to the gcc. The first pass does some analysis work
and needs to store information for each rtx while the second pass expected
do the optimization based on the information added  by the first pass.
Currently I see few options for that:
1. In the first pass insert notes before the insn and then look for them in
the second pass.
2. Define and use my special REG_NOTE. Then it can be added to the insn rtx.
3. Define my own array/hash with UID as a key.

Is there more elegant way of doing that? If not what of the 3 mentioned
above you think is the best?

BR, Viktor.




More information about the Gcc-help mailing list