mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 23:05:21 +00:00
Reorganize optimization levels 4 and 5, to use --no-lazy-code, --use-local-vars
Estimated hours taken: 1 Branches: main Reorganize optimization levels 4 and 5, to use --no-lazy-code, --use-local-vars and --delay-construct instead of --lazy-code and --optimize-value-number. The new meanings of those optimization levels are the following: opt_level(4, _, [ use_local_vars - bool(yes), inline_simple_threshold - int(8), inline_compound_threshold - int(20), higher_order_size_limit - int(30) ]). opt_level(5, _, [ optimize_repeat - int(5), delay_construct - bool(yes), inline_compound_threshold - int(100), higher_order_size_limit - int(40) ]). compiler/options.m: Implement the new scheme for optimization levels 4 and 5.
This commit is contained in:
@@ -1534,13 +1534,13 @@ opt_level(3, _, [
|
||||
% Optimization level 4: apply optimizations which may have some
|
||||
% payoff even if they increase compilation time quite a bit
|
||||
|
||||
% Currently this enables value_number
|
||||
% Currently this enables the use of local variables
|
||||
% and increases the inlining thresholds
|
||||
|
||||
opt_level(4, _, [
|
||||
delay_construct - bool(yes),
|
||||
lazy_code - bool(yes),
|
||||
optimize_value_number - bool(yes),
|
||||
% lazy_code - bool(yes),
|
||||
% optimize_value_number - bool(yes),
|
||||
use_local_vars - bool(yes),
|
||||
inline_simple_threshold - int(8),
|
||||
inline_compound_threshold - int(20),
|
||||
higher_order_size_limit - int(30)
|
||||
@@ -1549,13 +1549,15 @@ opt_level(4, _, [
|
||||
% Optimization level 5: apply optimizations which may have some
|
||||
% payoff even if they increase compilation time a lot
|
||||
|
||||
% Currently this enables pred_value_number
|
||||
% and runs a second pass of value numbering
|
||||
% Currently this enables the search for construction unifications that can be
|
||||
% delayed past failing computations, allows more passes of the low-level
|
||||
% optimizations, and increases the inlining thresholds still further.
|
||||
|
||||
opt_level(5, _, [
|
||||
pred_value_number - bool(yes),
|
||||
% pred_value_number - bool(yes),
|
||||
% optimize_vnrepeat - int(2),
|
||||
optimize_repeat - int(5),
|
||||
optimize_vnrepeat - int(2),
|
||||
delay_construct - bool(yes),
|
||||
inline_compound_threshold - int(100),
|
||||
higher_order_size_limit - int(40)
|
||||
]).
|
||||
|
||||
Reference in New Issue
Block a user