PATCH COMMITTED: Fix init-regs to handle multi-insn move correctly
Kenneth Zadeck
zadeck@naturalbridge.com
Fri Sep 14 16:57:00 GMT 2007
Paolo Bonzini wrote:
> Kenneth Zadeck wrote:
>> Richard Guenther wrote:
>>> On 9/5/07, Kenneth Zadeck <zadeck@naturalbridge.com> wrote:
>>>
>>>
>>>> i had no idea what the difference between the two functions was.
>>>>
>>> Indeed. They look misnamed ;) Maybe add_single_insn_before
>>> and emit_insns_before instead...
>>>
>>> Richard.
>>>
>> I vote yes.
>
> emit_insn_before works for a single one too. :-) Maybe one could be
> made static.
>
> Paolo
I was thinking about fixing this on the plane to or from europe. I did
a grep to find out all of the occurrences.
dse.c:762: add_insn_before (data->insn,
dse.c:774: add_insn_before (data->insn,
dse.c:788: add_insn_before (data->insn,
emit-rtl.c:3489:add_insn_after (rtx insn, rtx after, basic_block bb)
emit-rtl.c:3551:add_insn_before (rtx insn, rtx before, basic_block bb)
emit-rtl.c:3850: add_insn_before (insn, before, bb);
emit-rtl.c:3864: add_insn_before (last, before, bb);
emit-rtl.c:3893: add_insn_before (insn, before, NULL);
emit-rtl.c:3907: add_insn_before (last, before, NULL);
emit-rtl.c:3936: add_insn_before (insn, before, NULL);
emit-rtl.c:3950: add_insn_before (last, before, NULL);
emit-rtl.c:3967: add_insn_before (insn, before, NULL);
emit-rtl.c:3981: add_insn_before (label, before, NULL);
emit-rtl.c:3998: add_insn_before (note, before, NULL);
emit-rtl.c:4079: add_insn_after (last, after, bb);
emit-rtl.c:4116: add_insn_after (last, after, NULL);
emit-rtl.c:4152: add_insn_after (last, after, NULL);
emit-rtl.c:4169: add_insn_after (insn, after, NULL);
emit-rtl.c:4184: add_insn_after (label, after, NULL);
emit-rtl.c:4200: add_insn_after (note, after, NULL);
modulo-sched.c:522: add_insn_before (reg_move, last_reg_move, NULL);
reorg.c:643: add_insn_after (trial, prev, NULL);
reorg.c:3471: add_insn_after (this_insn, after, NULL);
reorg.c:3589: add_insn_after (this_insn, after, NULL);
sched-deps.c:1400:add_insn_mem_dependence (struct deps *deps, bool read_p,
sched-deps.c:1656: add_insn_mem_dependence (deps, false, insn, dest);
sched-deps.c:1786: add_insn_mem_dependence (deps, true, insn, x);
see.c:1588: add_insn_before (use_se, curr_ref_s->insn, NULL);
rtl.h:2085:extern void add_insn_before (rtx, rtx, struct basic_block_def *);
rtl.h:2086:extern void add_insn_after (rtx, rtx, struct basic_block_def *);
config/frv/frv.c:7643: add_insn_before (insns[from], insns[to - 1],
NULL);
I am leaning towards making add_insn_before and add_insn_after static as
well as changing the name. I have a couple of questions about this:
1) Is this a reasonable change for stage III?
2) Do i want to change all of these uses outside of emit-rtl.c to use
the proper emit version?
3) Should i change the emit_insn_* to emit_insns_* to make it obvious?
Some one with authority to approve this patch should at least answer (1)
before i proceed.
Kenny
More information about the Gcc-patches
mailing list