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
  • #1976
Closed
Open
Created Jun 19, 2012 by Robert Bernecky@rbeDeveloper

Lost extrema values cause AWLF unit test prd2AKD.sac to fail

Bugzilla Link 984
Created on Jun 19, 2012 21:45
Resolution FIXED
Resolved on Jul 08, 2012 19:07
Version svn
OS Linux
Architecture PC

Extended Description

A simple unit test for AWLF now fails, due to lost extrema.
The problem is that, if I compile with this:
cd ~/sac/testsuite/optimizations/awlf
sac2c prd2AKD.sac -doawlf -nowlf -nocyc -bopt:glf  >crud.glf
I get this code fragment in crud.glf:
  _flat_5 = [ shp ];
  _idc_46, _icc_34_pred = _non_neg_val_V_( _flat_5);
...
  _flat_0 = [ shp ];
What we want is to have all references to _flat_5 that
follow the _non_neg_val_V_( _flat_5) to become references
to _idc_46. The assignment of _flat_0 is, in a sense,
a violation of this, because _flat_0 does not carry the
AVIS_MIN generated by the guard.
The code that inserts the guards is correct as it stands.
The _flat_0 assign exists by the end of TC (phase 7).
So, we want to get rid of the common expression before
we insert constraints, so we clearly need a CSE/DCR traversal
in CWC, just before ICC. Ah, you mean, like this?
      cse      : Applying common subexpression elimination
      dcr      : Removing dead code
      icc      : Inserting Conformity Checks
Hmmm. Let's look at what we have in iota() after that DCR:
  _flat_5 = [ shp ];
  _flat_4 = [ shp ];
  _flat_3 = 0;
  _flat_2 = _mul_SxV_( _flat_3, _flat_4);
  _flat_1 = 0;
  _flat_0 = [ shp ];
Not exactly what we were hoping for.
CSE never traverses iota(), but it does traverse a lot of wrappers:
grep CSEfundef crud.cwcdcr 
   CSEfundef: CSE: Begin traversing (wrapper) partitionIntersectMax
   CSEfundef: CSE: Done traversing (wrapper) partitionIntersectMax
   CSEfundef: CSE: Begin traversing (wrapper) partitionSlicer
   CSEfundef: CSE: Done traversing (wrapper) partitionSlicer
   CSEfundef: CSE: Begin traversing (wrapper) isPartitionIntersectNull
   CSEfundef: CSE: Done traversing (wrapper) isPartitionIntersectNull
   CSEfundef: CSE: Begin traversing (wrapper) partitionIntersectMin
   CSEfundef: CSE: Done traversing (wrapper) partitionIntersectMin
   CSEfundef: CSE: Begin traversing (wrapper) adjustLacFunParams
   CSEfundef: CSE: Done traversing (wrapper) adjustLacFunParams
   CSEfundef: CSE: Begin traversing (wrapper) main
   CSEfundef: CSE: Done traversing (wrapper) main
   CSEfundef: CSE: Begin traversing (wrapper) prod
   CSEfundef: CSE: Done traversing (wrapper) prod
   CSEfundef: CSE: Begin traversing (wrapper) adjustLacFunParamsReshape
   CSEfundef: CSE: Done traversing (wrapper) adjustLacFunParamsReshape
   CSEfundef: CSE: Begin traversing (wrapper) eq
   CSEfundef: CSE: Done traversing (wrapper) eq
   CSEfundef: CSE: Begin traversing (wrapper) eq
   CSEfundef: CSE: Done traversing (wrapper) eq
   CSEfundef: CSE: Begin traversing (wrapper) eq
   CSEfundef: CSE: Done traversing (wrapper) eq
   CSEfundef: CSE: Begin traversing (wrapper) eq
   CSEfundef: CSE: Done traversing (wrapper) eq
   CSEfundef: CSE: Begin traversing (wrapper) eq
   CSEfundef: CSE: Done traversing (wrapper) eq
   CSEfundef: CSE: Begin traversing (wrapper) gridFiller
   CSEfundef: CSE: Done traversing (wrapper) gridFiller
   CSEfundef: CSE: Begin traversing (wrapper) zero
   CSEfundef: CSE: Done traversing (wrapper) zero
   CSEfundef: CSE: Begin traversing (wrapper) zero
   CSEfundef: CSE: Done traversing (wrapper) zero
   CSEfundef: CSE: Begin traversing (wrapper) zero
   CSEfundef: CSE: Done traversing (wrapper) zero
   CSEfundef: CSE: Begin traversing (wrapper) zero
   CSEfundef: CSE: Done traversing (wrapper) zero
   CSEfundef: CSE: Begin traversing (wrapper) zero
   CSEfundef: CSE: Done traversing (wrapper) zero
   CSEfundef: CSE: Begin traversing (wrapper) partitionMax
   CSEfundef: CSE: Done traversing (wrapper) partitionMax
   CSEfundef: CSE: Begin traversing function iota__Cond_0
   CSEfundef: CSE: Done traversing function iota__Cond_0
I am not sure where to go from here. This unit test did work
properly some time ago.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking