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 402
    • Issues 402
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1085
Closed
Open
Created Nov 19, 2010 by Robert Bernecky@rbeDeveloper

CF fails to kill modarray in constantfolding/SCCFprf_modarray5.sac

Bugzilla Link 778
Created on Nov 19, 2010 19:57
Version svn
OS Linux
Architecture PC

Extended Description

If the above unit test is compiled with:
-maxwlur 1 -docf -extrema -nowlf -doawlf -ecc
the modarray() call in tghe code is left there. Although CF properly
eliminates the modarray() from the result-using part of the code,
we are left with guards that refer to the modarray result, in order
to get its shape:
 _flat_1 = true;
  _flat_0 = 1;
  one = _MAIN::id( _flat_0, _flat_1) ;
  _isaa_49_one = _dim_A_( one);
  _isaa_50_one = _shape_A_( one);
  _isaa_51_one = _saabind_( _isaa_49_one, _isaa_50_one, one);
  _idc_38, _icc_27_pred = _type_constraint_( int, _isaa_51_one);
  _icc_28 = _add_SxS_( _idc_38, _flat_0);
  _flat_2 = _afterguard_( _icc_28, _icc_27_pred);
  cltwo = _MAIN::id( _flat_2, _flat_1) ;
  _isaa_52_cltwo = _dim_A_( cltwo);
  _isaa_53_cltwo = _shape_A_( cltwo);
  _isaa_54_cltwo = _saabind_( _isaa_52_cltwo, _isaa_53_cltwo, cltwo);
  _flat_5 = 5;
  five = _MAIN::id( _flat_5, _flat_1) ;
  _isaa_55_five = _dim_A_( five);
  _isaa_56_five = _shape_A_( five);
  _isaa_57_five = _saabind_( _isaa_55_five, _isaa_56_five, five);
  _idc_39, _icc_29_pred = _type_constraint_( int, _isaa_57_five);
  _flat_7 = [:int];
  _idc_40, _icc_30_pred = _shape_matches_dim_VxA_( _flat_7, _isaa_54_cltwo);
  _idc_42, _icc_32_pred = _val_lt_shape_VxA_( _flat_7, _isaa_54_cltwo);
  _icc_33 = _modarray_AxVxS_( _isaa_54_cltwo, _flat_7, _idc_39);
  x3 = _afterguard_( _icc_33, _icc_32_pred, _icc_30_pred, _icc_29_pred);
  _idc_44, _icc_34_pred = _shape_matches_dim_VxA_( _flat_7, x3);
  _idc_45, _icc_36_pred = _val_lt_shape_VxA_( _idc_44, x3);
  z = _afterguard_( _idc_39, _icc_36_pred, _icc_34_pred);
  _esd_48 = -5;
  z__SSA0_1 = _add_SxS_( z, _esd_48);
  return( z__SSA0_1);
I think the best approach here is to replace guards that refer to
dim or shape by new guards that use _shape_A_ or _dim_A_.
Other CF code would then replace those by the SAA shape/dim
of the array.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking