diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-11-06 21:10:26 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-11-06 21:10:26 +0000 |
commit | 49a5e4e6e433dc206e05833d83d5edb41fe0ddec (patch) | |
tree | aca3ace20664b5d8ae7d5d451dbae001eeaa2c73 /compiler/psub.pas | |
parent | 82e39ee84eea94b94b302fcc340470a230802b0f (diff) | |
download | fpc-49a5e4e6e433dc206e05833d83d5edb41fe0ddec.tar.gz |
+ dead store elimination, based on a patch by Jeppe Johansen
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25962 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/psub.pas')
-rw-r--r-- | compiler/psub.pas | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/psub.pas b/compiler/psub.pas index cff7e15312..e09701c8d2 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -115,7 +115,8 @@ implementation opttail, optcse, optloop, - optconstprop + optconstprop, + optdeadstore {$if defined(arm) or defined(avr) or defined(fpc_compiler_has_fixup_jmps)} ,aasmcpu {$endif arm} @@ -1253,7 +1254,7 @@ implementation (pi_is_recursive in flags) then do_opttail(code,procdef); - if (cs_opt_constant_propagate in current_settings.optimizerswitches) then + if cs_opt_constant_propagate in current_settings.optimizerswitches then do_optconstpropagate(code); if (cs_opt_nodedfa in current_settings.optimizerswitches) and @@ -1293,6 +1294,9 @@ implementation include(flags,pi_dfaavailable); end; + if (pi_dfaavailable in flags) and (cs_opt_dead_store_eliminate in current_settings.optimizerswitches) then + do_optdeadstoreelim(code); + if (cs_opt_loopstrength in current_settings.optimizerswitches) { our induction variable strength reduction doesn't like for loops with more than one entry } |