Re: Long calls and short calls

2008-05-03 Thread Richard Sandiford
"Mohamed Shafi" <[EMAIL PROTECTED]> writes:
> The gcc port that i am currently working on has both long calls and
> short calls. If no 'shortcall' attribute is provided in the function
> declaration then calls to that function is made as long call. This is
> happening when no optimization is enabled. But when optimization is
> enabled combine pass is merging the instructions to replace the long
> call with short call.

I assume you're currently handling this in the call and call_value
expanders?  You need to handle it in the define_insns too, by making
the predicates and constraints forbid direct calls to longcall symbols.
See the MIPS port for an example.

Richard


Pipeline hazards and delay slots

2008-05-03 Thread Mohamed Shafi
Hello all,

In the gcc port that i am currently working on delay slots are getting
filled with instructions that require a nop between them.
Say,

call fun
lw R0, R8
add R1, R0

This is an example where both the delay slots have been filled.
But 'add' instruction has a true data dependency on 'lw' instructions
and require a delay of one cycle between them. Noramlly this is done
by inserting a nop between such instructions if instruction scheduler
doesn't schedule instructions properly. Currently i am doing this in
final_prescan just like in MorphoRISC1 (mt).
But how can i handle instances like this? Should i be doing insertion
of nops in reorg pass?

Thanks for your time.

Regards,
Shafi


Re: Long calls and short calls

2008-05-03 Thread Mohamed Shafi
On Sat, May 3, 2008 at 3:13 PM, Richard Sandiford
<[EMAIL PROTECTED]> wrote:
> "Mohamed Shafi" <[EMAIL PROTECTED]> writes:
>  > The gcc port that i am currently working on has both long calls and
>  > short calls. If no 'shortcall' attribute is provided in the function
>  > declaration then calls to that function is made as long call. This is
>  > happening when no optimization is enabled. But when optimization is
>  > enabled combine pass is merging the instructions to replace the long
>  > call with short call.
>
>  I assume you're currently handling this in the call and call_value
>  expanders?  You need to handle it in the define_insns too, by making
>  the predicates and constraints forbid direct calls to longcall symbols.
>  See the MIPS port for an example.
>
 That solved the problem. Thank you for the response.

Regards,
Shafi


Re: Question regarding C++ frontend

2008-05-03 Thread Doug Gregor
On Fri, May 2, 2008 at 11:39 AM, Peter Collingbourne <[EMAIL PROTECTED]> wrote:
>  In the C++ frontend, record_types maintain list(s) of the parameters
>  which were used to instantiate the type, one list for each "level" of
>  the instantiation.  I would like to know how to determine the list of
>  parameters that were used to instantiate "this" type e.g. in the case of
>  a type foo::bar I would like the tree_vec containing the type
>  "long".  Note that we can't always simply extract the last list of
>  parameters e.g. for the type foo::baz the tree_vec required would
>  be empty or null whereas the tree_vec available has a single level for
>  "int".

INNERMOST_TEMPLATE_ARGS can be used to get at the "innermost" TREE_VEC
of template arguments for a class template specialzation such as
foo::bar. CLASSTYPE_USE_TEMPLATE != 0 tells you whether a
RECORD_TYPE is actually a template

  - Doug


Current failures on Cygwin

2008-05-03 Thread Jerry DeLisle
Here are gfortran failures I am seeing on Cygwin as of a few hours ago.  I 
noticed some of these are at -O3, implying some optimization passes at fault. 
IIRC nint_2.f90 and default_format_denormal_1.f90 are not new.  The rest of 
these are fairly recent.


Maybe we need a meta-bug to track these.

Regards,

Jerry

Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/dg.exp ...
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/nint_2.f90 execution test
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce executable
FAIL: gfortran.dg/g77/970915-0.f (internal compiler error)
FAIL: gfortran.dg/g77/970915-0.f (test for excess errors)
Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/gomp/gomp.exp ...
Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/vect/vect.exp ...
Running 
/home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp ...
Running 
/home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp ...

FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution,  -O0
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution,  -O1
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution,  -O2
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 execution,  -Os


Re: Current failures on Cygwin

2008-05-03 Thread Tim Prince

Jerry DeLisle wrote:
Here are gfortran failures I am seeing on Cygwin as of a few hours 
ago.  I noticed some of these are at -O3, implying some optimization 
passes at fault. IIRC nint_2.f90 and default_format_denormal_1.f90 are 
not new.  The rest of these are fairly recent.


Maybe we need a meta-bug to track these.

Regards,

Jerry

Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/dg.exp ...
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/array_constructor_24.f execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/default_format_denormal_1.f90 execution test
FAIL: gfortran.dg/nint_2.f90 execution test
FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/use_only_1.f90 (internal compiler error)
FAIL: gfortran.dg/use_only_1.f90 (test for excess errors)
WARNING: gfortran.dg/use_only_1.f90 compilation failed to produce 
executable

FAIL: gfortran.dg/g77/970915-0.f (internal compiler error)
FAIL: gfortran.dg/g77/970915-0.f (test for excess errors)
Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/gomp/gomp.exp ...
Running /home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.dg/vect/vect.exp ...
Running 
/home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp 
...
Running 
/home/Jerry/gcc/gcc44/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp 
...
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 
execution,  -O0
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 
execution,  -O1
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 
execution,  -O2
FAIL: gfortran.fortran-torture/execute/intrinsic_integer.f90 
execution,  -Os
intrinsic_integer.f90 has been failing on cygwin, powerpc, and 
i386-freebsd since 4.3.0 20080215


gfortran 4.4 still segfaults many tests at run-time when -g is set.  
Pretty good otherwise.


I verified your report of 2 new problems (new since 2 weeks ago, the 
last time I could bootstrap on cygwin):

use_only_1.f90 segfaults the compiler at all optimization levels.
array_constructor_24.f seems to get into a non-terminating loop at 
run-time, which segfaults eventually, with the problem showing up only 
at -O3.


Re: Current failures on Cygwin

2008-05-03 Thread Jerry DeLisle

Tim Prince wrote:

I verified your report of 2 new problems (new since 2 weeks ago, the 
last time I could bootstrap on cygwin):

use_only_1.f90 segfaults the compiler at all optimization levels.
array_constructor_24.f seems to get into a non-terminating loop at 
run-time, which segfaults eventually, with the problem showing up only 
at -O3.




g77/970915-0.f is also segfaulting on compilation with no optimization.

Jerry


Re: Current failures on Cygwin

2008-05-03 Thread Janus Weil

Jerry DeLisle wrote:

Tim Prince wrote:
I verified your report of 2 new problems (new since 2 weeks ago, the 
last time I could bootstrap on cygwin):

use_only_1.f90 segfaults the compiler at all optimization levels.
array_constructor_24.f seems to get into a non-terminating loop at 
run-time, which segfaults eventually, with the problem showing up 
only at -O3.

g77/970915-0.f is also segfaulting on compilation with no optimization.


I'm afraid use_only_1.f90 and g77/970915-0.f are actually my fault 
(caused by rev. 134867). Will fix them soon.

Cheers,
Janus



Re: Current failures on Cygwin

2008-05-03 Thread Jerry DeLisle

Janus Weil wrote:

Jerry DeLisle wrote:

Tim Prince wrote:
I verified your report of 2 new problems (new since 2 weeks ago, the 
last time I could bootstrap on cygwin):

use_only_1.f90 segfaults the compiler at all optimization levels.
array_constructor_24.f seems to get into a non-terminating loop at 
run-time, which segfaults eventually, with the problem showing up 
only at -O3.

g77/970915-0.f is also segfaulting on compilation with no optimization.


I'm afraid use_only_1.f90 and g77/970915-0.f are actually my fault 
(caused by rev. 134867). Will fix them soon.

Cheers,
Janus


The patch for the use_only_1.f90 and gcc/970915-0.f has been committed and I 
confirm these two are fixed on Cygwin.  The array_constructor_24.f is a 
different issue and still hangs.


Jerry