RE: extra information in rtx data structure.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian, thank you for your help.


-----Original Message-----
From: Ian Lance Taylor [mailto:iant@xxxxxxxxxx] 
Sent: Tuesday, May 14, 2013 8:03 AM
To: Viktor Pobedin
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: extra information in rtx data structure.

On Sun, May 12, 2013 at 11:25 PM, Viktor Pobedin <viktor.pobedin@xxxxxxxxx>
wrote:
>
> 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?

I wouldn't use choice 1, because insns get rearranged in various ways by
different passes.  Either choice 2 or 3 ought to work, and those are both
typical approaches for this kind of thing.  It depends on how much
information you have to store, and how you will work with information that
is lost between the two passes.

Ian





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux