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 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1137
Closed
Open
Created Sep 11, 2012 by Robert Bernecky@rbeDeveloper

Catch-22: LIR won't lift

Bugzilla Link 1022
Created on Sep 11, 2012 22:32
Version svn
OS Linux
Architecture PC

Extended Description

I just traced an AWLF failure partway back to this loopfun code:
int  loopfun( int _lacs_2325) {
...
 _uprf_1573, _uprf_1574 = _non_neg_val_S_( _lacs_2325);
  loopfun( _uprf_1573);
There are two distinct problems here:
a. LACS won't propagate AVIS_MINVAL( _lacs_2325) = 0 into the loopfun,
   because the variable is not loop-invariant.
b. DLIR won't lift the guard expression out of the loopfun, for the 
   same reason, I think.
As I write this, I realize that, in this particular case, I may
be able to resolve the issue this enhancement to LACS:
In the calling environment, _lacs_2325 has AVIS_MINVAL = 0;
In the recursive call, _uprf_1573 has AVIS_MINVAL = 0.
In that case, LACS can happily set AVIS_MINVAL( _lacs_2325) = 0,
and the code should get better.
However, I suspect this is not the case in general, so welcome
ideas on better ways to tackle this problem.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
 developer rev 18218:MODIFIED linux-gnu_x86_64
 (Tue Sep 11 16:07:19 EDT 2012 by sac)
cd ~/sac/testsuite/optimizations/lacs$ 
sac2c simpleLoopAKD.sac -bopt:saacyc:lof:5 -doawlf -nowlf  -v1 -#d,LIR,WLIR,DLIR &> crud
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking