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
  • #1300
Closed
Open
Created May 15, 2009 by Robert Bernecky@rbeDeveloper

WLSIMP broken

Bugzilla Link 492
Created on May 15, 2009 20:17
Version 1.00beta
OS Linux
Architecture PC
Attachments emptygeneratorModarray.sac, emptygeneratorFold.sac

Extended Description

WLSIMP claims to remove/replace at least one class of degenerate WLs.
Specifically, ones generated by this sort of code:
use Array: {genarray,<=,-,+,iota,sel};
int[*] id(int[*] y)
{ return(y);
}
int main()
{
 x = id(genarray([10,10],4));
 z = with {
   (. <= iv <= .) : x[iv] + iota(3);
   } : genarray(_shape_A_(x), [1,2, 3]);
return(z[0,0,0]-4);
}
----------------------------------------------
 sac2c nested.sac -b11:ivext  -nowlur 
Produces the following. Note the flat_10 WL bounds:
       ([ 0, 0 ] <= iv=[_eat_18, _eat_17] < [ _cf_548_x, _cf_547_x ] genwidth [ _cf_548_x, _cf_547_x ])
        {
          _pinl_227__flat_95 = _sel_VxA_( iv, x);
          _flat_10 = with {
                ([:int] <= _pinl_225_iv < [:int])
                {
                  /* empty */
                } : _pinl_227__flat_95 ;
 } :
              genarray( [:int], _pinl_224__flat_92);
          _pinl_237_res = with {
                ([ 0 ] <= _pinl_234_iv=[_pinl_238__eat_19] < [ 3 ] genwidth [ 3 ])
                {
                  _pinl_236__flat_1072 = _add_SxS_( _flat_10, _pinl_238__eat_19);
                } : _pinl_236__flat_1072 ;
 } :
              genarray( [ 3 ], _pinl_233__flat_1067);
        } : _pinl_237_res ;
 } :
      genarray( [ _cf_548_x, _cf_547_x ], _flat_4);
-------------------------------
It looked to me that WLSIMPwith has a backwards conditional 
for this check, but there's more to it than than, because inverting
the test produces poorly flavored goulash.
Not sure how bad these are affecting performance #s.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking