: "$TopPwd/${CURRENT_DIR}/${GHC_HSCPP}";
@HsCpp_flags = ();
-$genSPECS_flag = ''; # See ../utils/hscpp/hscpp.prl
$HsC = ( $INSTALLING ) ? "$InstLibExecDirGhc/hsc"
: "$TopPwd/${CURRENT_DIR}/${GHC_HSC}";
\begin{code}
sub setupOptFlags {
- $Oopt_UnfoldingUseThreshold = '-fsimpl-uf-use-threshold3';
$Oopt_MaxSimplifierIterations = '-fmax-simplifier-iterations4';
$Oopt_PedanticBottoms = '-fpedantic-bottoms'; # ON by default
$Oopt_MonadEtaExpansion = '';
# '-fsimpl-uf-use-threshold0',
# '-fessential-unfoldings-only',
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
']',
'-freuse-con',
$Oopt_PedanticBottoms,
$Oopt_MonadEtaExpansion,
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
#
# '-freuse-con',
# $Oopt_PedanticBottoms,
# $Oopt_MonadEtaExpansion,
-# $Oopt_UnfoldingUseThreshold,
# $Oopt_MaxSimplifierIterations,
# $Oopt_ShowSimplifierProgress,
# ']',
'-freuse-con',
$Oopt_PedanticBottoms,
$Oopt_MonadEtaExpansion,
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
']',
# but do reductions if you see them!
$Oopt_PedanticBottoms,
$Oopt_MonadEtaExpansion,
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
']',
'-flet-to-case', # Aha! Only done after strictness analysis
$Oopt_PedanticBottoms,
$Oopt_MonadEtaExpansion,
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
']',
# ( ($OptLevel != 2)
# ? ''
-# : "-fliberate-case -fsimplify [ $Oopt_FB_Support -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim -fcase-merge -fdo-eta-reduction -fdo-lambda-eta-expansion -freuse-con -flet-to-case $Oopt_PedanticBottoms $Oopt_MonadEtaExpansion $Oopt_UnfoldingUseThreshold $Oopt_MaxSimplifierIterations $Oopt_ShowSimplifierProgress ]" ),
+# : "-fliberate-case -fsimplify [ $Oopt_FB_Support -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim -fcase-merge -fdo-eta-reduction -fdo-lambda-eta-expansion -freuse-con -flet-to-case $Oopt_PedanticBottoms $Oopt_MonadEtaExpansion $Oopt_MaxSimplifierIterations $Oopt_ShowSimplifierProgress ]" ),
# Final clean-up simplification:
# but still do reductions if you see them!
$Oopt_PedanticBottoms,
$Oopt_MonadEtaExpansion,
- $Oopt_UnfoldingUseThreshold,
$Oopt_MaxSimplifierIterations,
$Oopt_ShowSimplifierProgress,
']',
&run_something($to_do, 'Ineffective C pre-processor');
} else {
local($includes) = '-I' . join(' -I',@Include_dir);
- $to_do .= "$HsCpp $Verbose $genSPECS_flag @HsCpp_flags -D__HASKELL1__=$Haskell1Version -D__GLASGOW_HASKELL__=$GhcVersionInfo $includes $lit2pgm_hscpp >> $hscpp_hsc";
+ $to_do .= "$HsCpp $Verbose @HsCpp_flags -D__HASKELL1__=$Haskell1Version -D__GLASGOW_HASKELL__=$GhcVersionInfo $includes $lit2pgm_hscpp >> $hscpp_hsc";
push(@Files_to_tidy, $hscpp_hsc );
&run_something($to_do, 'Haskellised C pre-processor');
}
/^-D(.*)/ && do { push(@HsCpp_flags, "'-D".&grab_arg_arg(*Args,'-D',$1)."'"); next arg; };
/^-U(.*)/ && do { push(@HsCpp_flags, "'-U".&grab_arg_arg(*Args,'-U',$1)."'"); next arg; };
- /^-genSPECS/ && do { $Cpp_flag_set = 1;
- $genSPECS_flag = $_;
- next arg; };
-
#---------- post-Haskell "assembler"------------------------------------
/^-ddump-raw-asm$/ && do { $Dump_raw_asm = 1; next arg; };
/^-ddump-asm-splitting-info$/ && do { $Dump_asm_splitting_info = 1; next arg; };
# ---------------
- /^(-funfolding-use-threshold)(.*)$/
- && do { $Oopt_UnfoldingUseThreshold = $1 . &grab_arg_arg(*Args,$1, $2);
- next arg; };
+ /^-funfolding-.*$/
+ && do { push(@HsC_flags, $_); next arg };
/^(-fmax-simplifier-iterations)(.*)$/
&& do { $Oopt_MaxSimplifierIterations = $1 . &grab_arg_arg(*Args,$1, $2);