This is the mail archive of the gcc@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: DF_DU_CHAIN | DF_UD_CHAIN flags in new-ra


Hi,

This is regarding the crash of new register allocator in new-regalloc branch
when def-use chain creation is enabled,
(Pls refer http://gcc.gnu.org/ml/gcc/2003-08/threads.html#01035)

When I do this change in ra.c

diff -u -3 -p -r1.8 ra.c
--- gcc/ra.c    7 Mar 2003 22:06:16 -0000       1.8
+++ gcc/ra.c    11 Sep 2003 09:13:15 -0000
@@ -773,7 +773,7 @@ reg_alloc ()
         chains per insn, and per regno.  In later passes only update
          that info from the new and modified insns.  */
       df_analyse (df, (ra_pass == 1) ? 0 : (bitmap) -1,
-                 DF_HARD_REGS | DF_RD_CHAIN | DF_RU_CHAIN |
DF_FOR_REGALLOC);
+                 DF_HARD_REGS | DF_DU_CHAIN | DF_UD_CHAIN |
DF_FOR_REGALLOC);


GCC aborts at 

BUG_RA.c:25: internal compiler error: in parts_to_webs_1, at ra-build.c:1900
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This problem occurs in the new reg-alloc-branch as well as mainline.
The compiler crashes after 1 round of RegAlloc Pass, and fails in
incrementally building the graph in the function "parts_to_webs_1". However,
I expect this should work, because def-use chain creation is not supposed 
to harm the ra. 

Also, the handling of flags in df_analyse_1 w.r.t def-use/use-def chains is
not clear. 
On calling df_analyse in ra.c as 
	df_analyse (df, (ra_pass == 1) ? 0 : (bitmap) -1,
              DF_HARD_REGS | DF_RD_CHAIN | DF_RU_CHAIN | DF_RU | DF_RD |
DF_RD_CHAIN | DF_RU_CHAIN);

The compiler seems to crash at 
advdomestic.i:1891: internal compiler error: in df_ref_unlink, at df.c:691
The code documentation points out the abort cause as inconsistency in
def-use chains.

Can anyone give an idea of the source of this problem, as assumptions in the
code
are not documented for this part.

Thanks and Best Regards,
Mukta


>>It's possible that this is a problem with the incremental 
>>building.  The
>>later rounds of coloring just update the df information, instead of
>>rebuilding it from scratch.
>
>The problem doesn't seem to be in the incremental web building but the
>initial run itself.
>
>>Because I never used the def-use 
>>chains from
>>df.c I also didn't test if the updating mechanism works 
>>correctly on that
>>part of the information.  The strange thing though is, that 
>>the allocator
>>doesn't make use of this information anyway, so I wonder why 
>>it causes any
>>errors depending on the existence of it.
>
>No idea about this, but there seems to be some patch at
>http://gcc.gnu.org/ml/gcc-patches/2001-09/msg01199.html. Applying this
>change in new-regalloc seems to result in another segmentation 
>fault ICE.
>
>>You would have to debug it
>>further.  The error itself means, that some sanity check went 
>>wrong.  Have
>>you tried also with the newregalloc-branch?
>
>This ICE appears on new-regalloc branch.
>
>~ Mukta
>


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