public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* CLI-FE merge 4.3 to 4.5
@ 2010-05-10 14:32 Kevin Williams
  2010-05-13 21:20 ` Diego Novillo
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Williams @ 2010-05-10 14:32 UTC (permalink / raw)
  To: gcc

Hello,

We have just merged the branch st/cli-fe (a gcc front end for CLI)
from a 4.3 realse to 4.5.

This merge has broken the compiler and for a simple helloworld test it
fails with the error

cil1: internal compiler error: in execute_one_pass, at passes.c:1525

This error is reporting that the 'cfun' variable is not set correctly.
I have observed that IPA passes are being executed (even when i
attempt to turn them off with the relevant -fno-ipa-* flags). Setting
of both cfun and current_function_declaration remains the same now as
before the merge (with the exception that we now use
the updated API for set_cfun).

I have three questions:

1. What is the correct behaviour for a FE in terms of setting the
global variables cfun and current_function_declaration?

2. It seems that the new api for set_cfun has some side effects on
optimization flags? is this correct?

3. How should DECL_FUNCTION_SPECIFIC_
OPTIMIZATION be controled, should the front end be setting these per
function? (I am looking to avoid IPA passes for now)

Thank you in advance,
Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CLI-FE merge 4.3 to 4.5
  2010-05-10 14:32 CLI-FE merge 4.3 to 4.5 Kevin Williams
@ 2010-05-13 21:20 ` Diego Novillo
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Novillo @ 2010-05-13 21:20 UTC (permalink / raw)
  To: Kevin Williams; +Cc: gcc

On 5/10/10 10:31 , Kevin Williams wrote:

> 1. What is the correct behaviour for a FE in terms of setting the
> global variables cfun and current_function_declaration?

They should be set to the current function being parsed.  These will be
set to NULL when the compiler is working in IPA mode.

> 2. It seems that the new api for set_cfun has some side effects on
> optimization flags? is this correct?

Yes, but only when function-specific optimizations are used.

> 3. How should DECL_FUNCTION_SPECIFIC_
> OPTIMIZATION be controled, should the front end be setting these per
> function? (I am looking to avoid IPA passes for now)

Function-specific optimizations are set an attribute, the FE does not
really need to do anything about them (other than making sure they are
preserved.


Diego.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-13 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 14:32 CLI-FE merge 4.3 to 4.5 Kevin Williams
2010-05-13 21:20 ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).