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.

Reply via email to