This is the mail archive of the gcc-bugs@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]

Re: GAP and PERLBMK broken


> >> I've also tried building 252.eon and got an ICE:
> >> mrScene.cc: In member function `ggBoolean mrScene::Read(std::istream&)':
> >> mrScene.cc:779: Internal compiler error in compensate_edge, at reg-stack.c:2555
> >> Please submit a full bug report,
> >> 
> >> Can you have a look, please?
> > Oh yes, can you send me preprocessed file?
> 
> Appended with some debug information.
Hmm, this appears to be somewhat involved problem.  The crash is caused
because of call:

(call_insn 3059 3058 21708 (call (mem:QI (symbol_ref:SI ("_ZN9ggVector3C1Eddd")) 0)
        (const_int 32 [0x20])) -1 (nil)
    (expr_list:REG_EH_REGION (const_int 24 [0x18])
        (nil))
    (nil))
;; End of basic block 120, registers live:
 6 [bp] 7 [sp] 16 [] 20 [frame] 59 60 61 62 63 64 65 66 67 88 89 93 99 324 369 440 2671 2673 2676 2677 2678

After reload situation looks like:

(call_insn 3059 25351 25352 (call (mem:QI (symbol_ref:SI ("_ZN9ggVector3C1Eddd")) 0)
        (const_int 32 [0x20])) 509 {*call_0} (nil)
    (expr_list:REG_EH_REGION (const_int 24 [0x18])
        (nil))
    (nil))

(insn 25352 3059 21708 (set (reg:DF 9 st(1))
        (mem:DF (plus:SI (reg/f:SI 6 ebp)
                (const_int -2584 [0xfffff5e8])) 556)) 95 {*movdf_integer} (nil)
    (nil))
;; End of basic block 120, registers live:
 3 [bx] 4 [si] 5 [di] 6 [bp] 7 [sp] 9 [st(1)] 20 [frame]

This is already wrong.  The block has been terminated by abnormal edge. Reload
added an caller save spilling code, that already appears in the wrong basic
block now.  As the CFG is not rebuilt, we get it wrong in reg-stack too.

I see 3 sollutions:
1) teach reload to emit compensation code to the edges (similary to reg-stack).
   This can be done by augumenting it to accept not only block, but also
   edge, but still it can be somewhat tricky to do.
2) teach caller save code to split the edge early at time the instruction is
   inserted. This sounds like pleasant solution, but need my patch to turn
   reload into BB pointer, instead of indexes I sent some time ago.
3) Kill abnormal edges and re-generate them by abusing find_sub_basic_block
   after reload.  Hackery :(

Richard, what does sound best for you?
Honza


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