| Optimizing Applications on the Cray X1TM System - S-2315-50 | ||
|---|---|---|
| Prev Section | Appendix A. Performance Tools | Next Section |
Decompiled listings represent the program listing after loop restructuring and other optimizations. While decompiled listings can be useful, they are also closer to machine language and correspondingly harder to read.
To produce decompiled listings, use the -rd option (Fortran) or -hdecomp option (C/C++) when compiling the program. For example:
ftn -rd foo.f |
generates the file foo.opt, which shows the program listing after loop restructuring, and foo.cg, which shows the program listing after further optimizations.
Note: The .opt file is generally larger than the loopmark listing, while the .cg file may be as much as ten times larger than the original source file.
Decompiled listings correspond to an internal representation of the code and are therefore harder to read than loopmark listings. For example, here is an excerpt from the .opt file produced for the same program used in Section A.2:
!
! Cray Inc. Decompilation
! WARNING - This output is provided for information only.
!
! Cray Inc. reserves the right to change the format of this
! information at any time and does not guarantee the
! readability or accuracy of this information.
!
! This information may not be compilable and corresponds to
! the internal representation of the program during the
! optimization phase of the compilation process.
!
! Source : arc2d.f
! File : arc2d.opt
! Format : Fortran
!
236.
236. program arc2d
273. IREAD = 5
274. IWRIT = 7
275. IVER = 6
278. _substr(t$5,1,8) = 'arc2d7 '
278. _substr(t$6,1,8) = 'UNKNOWN '
278. _substr(t$7,1,9) = 'FORMATTED'
278. t$8(1) = 0
278. r_suppress ( IWRIT )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. t$8(2) = int( loc( IWRIT ) )
278. t$8(3) = 0
278. t$8(4) = 0
278. r_suppress ( substr(t$5,1,6) )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. t$8(5) = int( loc( _substr(t$5,1,6) ) )
278. t$8(6) = 6
278. r_suppress ( substr(t$6,1,7) )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. t$8(7) = int( loc( _substr(t$6,1,7) ) )
278. t$8(8) = 7
278. t$8(9) = 0
278. r_suppress ( substr(t$7,1,9) )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. t$8(11) = int( loc( _substr(t$7,1,9) ) )
278. t$8(12) = 9
278. t$8(13) = 0
278. t$8(14) = 0
278. t$8(16) = 0
278. t$8(18) = 0
278. t$8(20) = 0
278. t$8(22) = 0
278. call _open( t$8 )
281. call cputim( T1 )
282. call elapse( T2 )
286. NP = 10000
286. NPCP = 1
286. IPRINT = 1
286. JACDT = 1
286. PERIDC = .FALSE.
286. NSTEPS = 100
286. DT = 1.0
286. _fwrite( _clist( 0, 0, 3, IWRIT, Null_Arg, Null_Arg,
286. . Null_Arg, Null_Arg, Null_Arg, Null_Arg ),
286. . _iolist( _iotype( ' ', 100665344 ),
286. . _iotype( ' * ****** ****
286. . ***** ***** ', 100665344 ) ) )
286. _fwrite( _clist( 0, 0, 3, IWRIT, Null_Arg, Null_Arg,
286. . Null_Arg, Null_Arg, Null_Arg, Null_Arg ),
286. . _iolist( _iotype( ' ', 100665344 ),
286. . _iotype( ' * * * * *
286. . * * * * ', 100665344 ) ) )
|
The following example is taken from the .cg file for the same program:
!
! Cray Inc. Decompilation
! WARNING - This output is provided for information only.
!
! Cray Inc. reserves the right to change the format of this
! information at any time and does not guarantee the
! readability or accuracy of this information.
!
! This information may not be compilable and corresponds to
! the internal representation of the program during the
! optimization phase of the compilation process.
!
! Source : arc2d.f
! File : arc2d.cg
! Format : Fortran
!
236.
236. program arc2d
273. $LCS_IREAD_0 = loc( IREAD )
273. 0[$LCS_IREAD_0,0].L = 5
274. 1[$LCS_IREAD_0,0].L = 7
275. 2[$LCS_IREAD_0,0].L = 6
278. substr[t$5,0:8] = 'arc2d7 '
278. substr[t$6,0:8] = 'UNKNOWN '
278. substr[t$7,0:9] = 'FORMATTED'
278. 0[loc( t$8 ),0].L = 0
278. r_suppress ( 1[ _<IREAD>,0].L )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. $MR_t_21 = int( loc( 1[loc( IREAD ),0].L ) )
278. 1[loc( t$8 ),0].L = $MR_t_21
278. 2[loc( t$8 ),0].L = 0
278. 3[loc( t$8 ),0].L = 0
278. r_suppress ( substr[t$5,0:6] )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. $MR_t_22 = int( loc( substr[t$5,0:6] ) )
278. 4[loc( t$8 ),0].L = $MR_t_22
278. 5[loc( t$8 ),0].L = 6
278. r_suppress ( substr[t$6,0:7] )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. $MR_t_23 = int( loc( substr[t$6,0:7] ) )
278. 6[loc( t$8 ),0].L = $MR_t_23
278. 7[loc( t$8 ),0].L = 7
278. 8[loc( t$8 ),0].L = 0
278. r_suppress ( substr[t$7,0:9] )
278. _lsync( 3 )
278. _lsync( 1 )
278. _lsync( 0 )
278. $MR_t_24 = int( loc( substr[t$7,0:9] ) )
278. 10[loc( t$8 ),0].L = $MR_t_24
278. 11[loc( t$8 ),0].L = 9
278. 12[loc( t$8 ),0].L = 0
278. 13[loc( t$8 ),0].L = 0
278. 15[loc( t$8 ),0].L = 0
278. 17[loc( t$8 ),0].L = 0
278. 19[loc( t$8 ),0].L = 0
278. 21[loc( t$8 ),0].L = 0
278. call _open( t$8 )
281. call cputim( T1 )
282. call elapse( T2 )
286. $LCS_JMAX_1 = loc( JMAX )
286. 2011[$LCS_JMAX_1,0].L = 10000
286. 2028[$LCS_JMAX_1,0].L = 1
286. 2027[$LCS_JMAX_1,0].L = 1
286. 2025[$LCS_JMAX_1,0].L = 1
286. 2010[$LCS_JMAX_1,0].L = .FALSE.
286. 2033[$LCS_JMAX_1,0].L = 100
286. 2012[$LCS_JMAX_1,0].L = 1.0
286. @StackCntrl_O5 = @StaticCntrl_O4
286. 1[loc( @StackCntrl_O5 ),0].L = loc( 1[loc( IREAD ),0].L )
286. _fwf( @StackCntrl_O5, 0[loc( @StaticIolist_O6 ),0].L,
286. . @IO_Lib_Stack_O9 )
286. @StackCntrl_O5 = @StaticCntrl_O10
286. 1[loc( @StackCntrl_O5 ),0].L = loc( 1[loc( IREAD ),0].L )
286. _fwf( @StackCntrl_O5, 0[loc( @StaticIolist_O11 ),0].L,
286. . @IO_Lib_Stack_O9 )
|
| Prev Section | Table of Contents | Title Page | Index | Next Section |
| Loopmark Listings | Up one level | CrayPat |