From 18879f8ec5dd284670c00f24c8b1f68d9f50b7a9 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 30 Apr 1998 20:43:45 +0000 Subject: [PATCH] [project @ 1998-04-30 20:43:45 by sof] -O setup: enable -fclone-binds in simplifier pass immediately preceeding -ffull-laziness (see comment) new option: -hi-with-
to selectively output contents of interface file. --- ghc/driver/ghc.lprl | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 3737ad2..25e3deb 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -475,6 +475,7 @@ $HscOut = '-S=' # TEMP: disable x86 if $HaveNativeCodeGen && $TargetPlatform =~ /^(i386|alpha|sparc)-/; $ProduceHi = '-hifile='; $HiOnStdout = 0; +$HiWith = ''; $HiDiff_flag = ''; $Keep_HiDiffs = 0; @@ -767,6 +768,15 @@ sub setupOptimiseFlags { $Oopt_UnfoldingUseThreshold, $Oopt_MaxSimplifierIterations, $Oopt_ShowSimplifierProgress, + # + # The presence of -fclone-binds is *crucial* here as + # -ffull-laziness (which we're about to do next) floats + # bindings outwards, so we better make sure that this + # doesn't result in the floating out of bindings + # with identical uniques, i.e., -ffull-laziness needs + # to be preceeded by a simplifier pass with -fclone-binds + # set. + '-fclone-binds', ']', #LATER: '-fcalc-inlinings1', -- pointless for 2.01 @@ -1966,18 +1976,18 @@ sub makeHiMap { foreach $d ( @Import_dir ) { if ($HiIncludeString) { - $HiIncludeString = "$HiIncludeString:${d}/%.${HiSuffix}"; + $HiIncludeString = "$HiIncludeString:${d}%.${HiSuffix}"; } else { - $HiIncludeString = "$d/%.${HiSuffix}"; + $HiIncludeString = "$d%.${HiSuffix}"; } } foreach $d ( @SysImport_dir ) { if ($HiIncludeString) { - $HiIncludeString = "$HiIncludeString:${d}/%.${HiSuffix_prelude}"; + $HiIncludeString = "$HiIncludeString:${d}%.${HiSuffix_prelude}"; } else { - $HiIncludeString = "${d}/%.${HiSuffix_prelude}"; + $HiIncludeString = "${d}%.${HiSuffix_prelude}"; } } @@ -2603,8 +2613,11 @@ arg: while($_ = $Args[0]) { next arg; }; # leave out actual C generation (debugging) [also turns off interface gen] - /^-hi$/ && do { $HiOnStdout = 1; $ProduceHi = '-hifile='; next arg; }; + + /^-hi$/ && do { $HiOnStdout = 1; $ProduceHi = '-hifile='; next arg; }; # _do_ generate an interface; usually used as: -noC -hi + /^-hi-with-(.*)$/ && do { $HiOnStdout = 1; $HiWith .= " $1" ; $ProduceHi = '-hifile='; next arg; }; + # limit ourselves to outputting a particular section. /^-nohi$/ && do { $ProduceHi = '-nohifile='; next arg; }; # don't generate an interface (even if generating C) -- 1.7.10.4