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: replace_rtx


Rajkishore Barik <rajbarik@in.ibm.com> writes:

> I am doing some modification to gcc's RTL code. I am trying to split a 
> pseudo (old) into two pseudos (old and new)
> and rewriting some part of the code to replace the "old" pseudo by the 
> "new" pseudo. I am using the "replace_rtx" function
> to perform the replacement. However I get "fatal error: internal 
> consistency failure" when I try to execute any program.
> 
> The specific call that I make is:
> 
> replace_rtx (insn, old_rtx, new_rtx);
> 
> I notice that "replace_rtx" actually performs the replacement when I try 
> to print the "insn" before and after the call. However, later on I get the 
> error
> "internal consistency failure".
> 
> I would like to know what are the cases in which this error is thrown. Is 
> there any document which I can refer to?

Your first step should be to fire up the debugger and find out where
the error occurs.  That will most likely tell you the kind of thing
you need to do to fix it.

You neglected to mention where in the compiler you are creating the
new pseudo--e.g., which pass.  However, the problem is most likely a
failure to call reg_scan_update or update_life_info.

Ian


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