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]

Re: RTL type checking


Zack

Excellent work.

I have a couple cf comments.

It installed the patch and configured with --enable-checking
it picked up a few nits which I've fixed in my local tree and
posted details to egcs-bugs.

Was there any reason other than speed for doing the checking
inline rather than using procedures to do the checking. The
reason I ask is that I was unable to complete a bootstrap
using inline checks (exhausted memory compiling insn-recog.c).
I had to hack my local tree to get the RTL_CEHCK1, RTL_CHECK2
and RTVEC_ELT to call rtl_check1, rtl_check2 and rtvec_elt 
procedures to do the actual checking to reduce the memory 
consumption during compilation. 

An advantage of moving the checking to these procedures is 
it doesn't require a GCC extension and we reduce memory
consumption.


As you reported bootstrap fails in gcc/except.c when compiling
the C++ support routines in libgcc2.c. The failure occurs
in expand_fixup_region_end on the following statement.

    dont_issue = ((INSN_UID (node->entry->outer_context) == 0) 
                   && (ehstack.top->entry != node->entry));

This is because outer_context is a SYMBOL_REF and not a CODE_LABEL.

I think the code needs to be aware of the flag_new_exceptions flag
because when this is enabled then outer_context is always a 
"SYMBOL_REF" and when disabled is always is a "CODE_LABEL".

I think the most obvious fix would the following and also handles
the other suspect use of INSN_UID() in this routine. It looks very
much like this block of code got missed when the flag_new_exceptions
were added.

  if (flag_new_exceptions)
    dont_issue = 0;
  else
    dont_issue = ((INSN_UID (node->entry->outer_context) == 0) 
                   && (ehstack.top->entry != node->entry));


Graham


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