Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1041
Closed
Open
Created Jun 19, 2009 by Robert Bernecky@rbeDeveloper

Loop fn contains superfluous parameters, causing 2.5X slowdown

Bugzilla Link 512
Created on Jun 19, 2009 16:38
Version 1.00beta
OS Linux
Architecture PC

Extended Description

This is a care of the APEX apex/testlcv/testlcv.sac versus the
apex/testlcvAKD/testlcvAKD.sac benchmarks. Here is the inner loop code
for both of them; the only difference is whether n is statically known:
inline double testlcvXID(int n)
{
r_0=tod(( false));
 j_0=( 9);
 A_40=iota( n);
 A_CTR41_= 0;
 A_CTR41z_ = (shape(A_40)[[0]])-1;
 r_2=tod(r_0);
 j_2=tod(j_0);
for(; A_CTR41_ <= A_CTR41z_; A_CTR41_++){
 i_0 = A_40[[A_CTR41_]]; 
 A_44=r_2, + i_0;
 r_2=( A_44);
 A_46=r_2 + 1.0;
 j_2=( A_46);
}
A_49=r_2 + j_2;
 r_3=( A_49);
 return(r_3);
}
In the AKD version, we find this function:
* Loop function:
 * _MAIN::_dup_659__testlcvXID__Loop_0(...)
 ****************************************************************************/
#3194: in [ double, double] le < 3203> ge < 3205>, #3195: in [ double, double] le < 3204> ge < 3206> _MAIN::_dup_659__testlcvXID__Loop_0( #3189: in [ int[1], int[1]] le <> ge <> _isaa_2231_A_40 { dim: 1, shape: [ 1 ] } , #3190: in [ int[.], int[.]] le <> ge <> A_40 { dim: 1, shape: _isaa_2231_A_40 } , #3191: in [ int, int] le <> ge <> A_CTR41_ { dim: 0, shape: [:int] } , #3192: in [ int, int] le <> ge <> A_CTR41z_ { dim: 0, shape: [:int] } , #3193: in [ double, double] le <> ge <> r_2 { dim: 0, shape: [:int] } )
...
_cf_2498_A_40 = _idx_shape_sel_( 0, A_40);
  _cf_2499 = [ _cf_2498_A_40 ];
  if (_pinl_2014__flat_41)
  {
    _lirmov_711_A_46, r_2__SSA0_2 = _MAIN::_dup_659__testlcvXID__Loop_0( _cf_2499, A_40, _pinl_2013__flat_69, A_CTR41z_, _pinl_2006___flat_53);
The only notable differences in the two codes is the _cf_2499 set,
the _cf_2498_A_40 set, and the fact that _cf_2499 is passed into each
call, even though it is never explicitly referenced. 
I am guessing that the SAA code is generating the extra parameter, but it would be nice if we could get rid of it in cases like this.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking