This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [dataflow][PATCH] Compute dominance information in ce2 pass.


Andrey Belevantsev wrote:
> Seongbae Park (ëìë, ææå) wrote:
>> I think we probably want to add
>> df-based routines that do equivalent to
>> propagate_one_insn() so that people can compute
>> live sets at arbitrary points in the instruction stream
>> (without directly using df infrastructure).
>> I'll try to do that sometime.
> I'd take this opportunity to ask.  Yes, we'd want to use it in the
> scheduler in the end.  What do we actually need is:
>
> 1. Registers that are set/used/clobbered by an insn.  Now we get this
> from the dependence analysis.
>
> 2. Update these register sets for new insns.
>
> 3. Liveness sets at any points on a code motion path.  Now we compute
> this by ourselves using the above sets.
>
> 4. Update liveness sets along certain paths, which we know, and don't
> touch them on the other paths.
>
> The reason we need all this is to find registers that are available
> for renaming, i.e. could be destination registers for an insn at a
> given point.  We'd also want a quick update of those, as the sets get
> invalidated after each code motion.
>
> AFAIK I can do 1 and 2 with df infrastructure via df_rescan_insn.  How
> can we do 3 and 4?
>
> Andrey
This is there and it works, at least for lr.  if you want to compute
live, it is more difficult/expensive because you have to approach the
insn from both directions in the block.

see
df_lr_simulate_artificial_refs_at_end
and df_lr_simulate_one_insn

if you change and insn and validate the change (and are in immediate
rescan mode) it will see the changed insn when you rescan.

This is a linear process, you start at the end of a block with
df_lr_simulate_artificial_refs_at_end to get things started and work
backwards with df_lr_simulate_one_insn.

kenny


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]