-nowlf beats -doawlf
Bugzilla Link | 1097 |
Created on | Oct 08, 2013 16:04 |
Version | svn |
OS | Linux |
Architecture | PC |
Attachments | bug1096B.sac |
Extended Description
Created an attachment (id=992) source code to reproduce fault This is an outgrowth of Bug #1096, but is likely unrelated to it. The apparent problem with that -nowlf is beating -dowlf. Here are some code fragments showing relative performance and AST code: sac2c bug1096.sac -v1 -O3 -dowlf sac@rattler:~/sac/testsuite/optimizations/wrci$ time a.out; echo $? Dimension: 0 Shape : < > 3550 real 0m7.928s user 0m7.910s sys 0m0.010s 82 sac@rattler:~/sac/testsuite/optimizations/wrci$ sac2c bug1096.sac -v1 -O3 -nowlf sac@rattler:~/sac/testsuite/optimizations/wrci$ time a.out; echo $? Dimension: 0 Shape : < > 3550 real 0m5.203s user 0m5.180s sys 0m0.020s 82 Now, if we look at the with2 in Loop_0, we have this for -nowlf: AAA__SSA0_1 = with2 (_wlsb_495=[_eat_26, _eat_465] (IDXS:_wlidx_1275_AAA__SSA0_1)) /********** operators: **********/ op_0 = { _emal_1442__dup_508__wlsw_494 = _alloc_( 1, 0, [:int]); _dup_508__wlsw_494 = _fill_( _idx_sel_( _eat_465, _dup_472__pinl_314_res), _emal_1442__dup_508__wlsw_494); _emal_1443_val = _wl_assign_( _dup_508__wlsw_494, _emal_1441_AAA__SSA0_1, _wlsb_495, _wlidx_1275_AAA__SSA0_1); _free_( _dup_508__wlsw_494); } : _emal_1443_val ; , op_1 = { _emdr_1662 = _noop_( _wlsb_495); } : _emdr_1662 ; and this for -dowlf (note that op0 and op1 are swapped from the previous code): op_0 = { _emdr_1616 = _noop_( _wlsb_492); } : _emdr_1616 ; , op_1 = { _emal_1398__ivesli_1265 = _alloc_( 1, 0, [:int]); _ivesli_1265 = _fill_( _idxs2offset_( [ 100, 10 ], _iveras_1365, _eat_462), _emal_1398__ivesli_1265); _ivesli_1266 = _fill_( _add_SxS_( 30, _ivesli_1265), _ivesli_1265); _emal_1396__dup_472__pinl_297__flat_23__SSA2_1__SSA3_1 = _alloc_( 1, 0, [:int]); _dup_472__pinl_297__flat_23__SSA2_1__SSA3_1 = _fill_( _idx_sel_( _ivesli_1266, _dup_539_AAA), _emal_1396__dup_472__pinl_297__flat_23__SSA2_1__SSA3_1); _free_( _ivesli_1266); _dup_473__pinl_313__flat_107__SSA3_1 = _fill_( _add_SxS_( _dup_472__pinl_297__flat_23__SSA2_1__SSA3_1, 3), _dup_472__pinl_297__flat_23__SSA2_1__SSA3_1); _emal_1399_val = _wl_assign_( _dup_473__pinl_313__flat_107__SSA3_1, _emal_1391_AAA__SSA0_1, _wlsb_492, _wlidx_1254_AAA__SSA0_1); _free_( _dup_473__pinl_313__flat_107__SSA3_1); } : _emal_1399_val ; -doivecyc and -doive are not, apparently, part of the problem: sac2c bug1096.sac -v1 -O3 -dowlf -noivecyc sac@rattler:~/sac/testsuite/optimizations/wrci$ time a.out; echo $? Dimension: 0 Shape : < > 3550 real 0m7.874s user 0m7.870s sys 0m0.000s 82 sac@rattler:~/sac/testsuite/optimizations/wrci$ sac2c bug1096.sac -v1 -O3 -dowlf -noivecyc -noive sac@rattler:~/sac/testsuite/optimizations/wrci$ time a.out; echo $? Dimension: 0 Shape : < > 3550 real 0m28.403s user 0m28.400s sys 0m0.000s 82 sac2c -V sac2c v1.00-beta (Haggis And Apple) developer rev 18394 linux-gnu_x86_64 (Tue Oct 8 10:24:38 EDT 2013 by sac)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information