> Hmm, let me rephrase your question:
> "I did some GCC hacking that I'm not showing, and it doesn't work,
> please help me fix it."

This is not what I meant. I meant if similar problem has been reported by 
anyone else before. In any case. This is the piece of code that I add
after every integer "set" instruction returned from "single_set()" module.

    // "insn" being the current integer set instruction
    // "value" being the "destination" of the set instruction
    // GCOV_COUNTER_V_RANGE is a new Value Range Counter added by me
    enum machine_mode mode = mode_for_size (GCOV_TYPE_SIZE, MODE_INT, 0);
    start_sequence ();
    rtx stored_val_ref = rtl_coverage_counter_ref(GCOV_COUNTER_V_RANGE, 
0); 
    rtx stored_val = validize_mem (stored_val_ref);
    rtx uval = gen_reg_rtx (mode);
    convert_move (uval, copy_rtx (value), 0);
    rtx tmp=expand_simple_binop(mode, IOR,copy_rtx(uval),
                copy_rtx(stored_val),stored_val,0, OPTAB_WIDEN);
    sequence = get_insns ();
    end_sequence ();
    emit_insn_after(sequence,insn);

Note that I these pieces of code just before register allocation and code
scheduling are done.

> > ./mul_mdmd_md.c: In function âmul_mdmd_md_l1_arb_allâ:
> > ./mul_mdmd_md.c:343: error: unable to find a register to spill in 
class
> > âAD_REGSâ
> > ./mul_mdmd_md.c:343: error: this is the insn:
> > (insn 529 8 530 0 (parallel [
> >             (set (reg:DI 232)
> >                 (sign_extend:DI (reg/v:SI 149 [ M ])))
> >             (clobber (reg:CC 17 flags))
> >             (clobber (scratch:SI))
> >         ]) 82 {*extendsidi2_1} (nil)
> >     (expr_list:REG_UNUSED (scratch:SI)
> >         (expr_list:REG_UNUSED (reg:CC 17 flags)
> >             (nil))))
> > ./mul_mdmd_md.c:343: internal compiler error: in spill_failure, at
> > reload1.c:1885
> What this basically says is that after register allocation some insns
> do not have all their operand constraints satisfied, so reload needs
> to fix up something, but it cannot use the registers it needs.

The same piece of code works fine for me for the whole lot of benchmarks
without having any problem. Its a few which cause this AD_REG spill 
problem.
I am wondering why is this happening.

--R

Reply via email to