diff options
author | simonm <unknown> | 1999-05-13 17:31:14 +0000 |
---|---|---|
committer | simonm <unknown> | 1999-05-13 17:31:14 +0000 |
commit | 589b7946b0847a47d1a5493dcec0976c84814312 (patch) | |
tree | ea1e53441f19b22ce198c65f5fdf61fd756426b8 /ghc/compiler | |
parent | 8997af62ca647b52a3eae314f45d86db346fab45 (diff) | |
download | haskell-589b7946b0847a47d1a5493dcec0976c84814312.tar.gz |
[project @ 1999-05-13 17:30:50 by simonm]
Support for "unregisterised" builds. An unregisterised build doesn't
use the assembly mangler, doesn't do tail jumping (uses the
mini-interpreter), and doesn't use global register variables.
Plenty of cleanups and bugfixes in the process.
Add way 'u' to GhcLibWays to get unregisterised libs & RTS.
[ note: not *quite* working fully yet... there's still a bug or two
lurking ]
Diffstat (limited to 'ghc/compiler')
-rw-r--r-- | ghc/compiler/Makefile | 5 | ||||
-rw-r--r-- | ghc/compiler/absCSyn/AbsCSyn.lhs | 8 | ||||
-rw-r--r-- | ghc/compiler/absCSyn/CLabel.lhs | 29 | ||||
-rw-r--r-- | ghc/compiler/absCSyn/PprAbsC.lhs | 53 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgCase.lhs | 10 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgClosure.lhs | 14 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgHeapery.lhs | 20 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgLetNoEscape.lhs | 17 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgMonad.lhs | 12 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgRetConv.lhs | 17 | ||||
-rw-r--r-- | ghc/compiler/codeGen/CgTailCall.lhs | 6 | ||||
-rw-r--r-- | ghc/compiler/main/CmdLineOpts.lhs | 273 |
12 files changed, 243 insertions, 221 deletions
diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index 6e84f3e923..82ae5a7e48 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.55 1999/05/11 16:37:29 keithw Exp $ +# $Id: Makefile,v 1.56 1999/05/13 17:30:50 simonm Exp $ TOP = .. include $(TOP)/mk/boilerplate.mk @@ -185,6 +185,9 @@ parser/U_qid_HC_OPTS = -fvia-C '-\#include"hspincl.h"' parser/U_tree_HC_OPTS = -H12m -fvia-C '-\#include"hspincl.h"' parser/U_ttype_HC_OPTS = -fvia-C '-\#include"hspincl.h"' +# Avoids Bug in 3.02, it seems +usageSP/UsageSPInf_HC_OPTS = -Onot + prelude/PrimOp_HC_OPTS = -H12m -K3m reader/Lex_HC_OPTS = -K2m -H16m -fvia-C diff --git a/ghc/compiler/absCSyn/AbsCSyn.lhs b/ghc/compiler/absCSyn/AbsCSyn.lhs index a8445bb4ac..d88a523806 100644 --- a/ghc/compiler/absCSyn/AbsCSyn.lhs +++ b/ghc/compiler/absCSyn/AbsCSyn.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: AbsCSyn.lhs,v 1.22 1999/04/26 16:06:27 simonm Exp $ +% $Id: AbsCSyn.lhs,v 1.23 1999/05/13 17:30:52 simonm Exp $ % \section[AbstractC]{Abstract C: the last stop before machine code} @@ -92,9 +92,9 @@ stored in a mixed type location.) -- (for the benefit of the native code generators) -- Equivalent to CJump in C land - | CReturn -- This used to be RetVecRegRel - CAddrMode -- Any base address mode - ReturnInfo -- How to get the return address from the base address + | CReturn -- Perform a return + CAddrMode -- Address of a RET_<blah> info table + ReturnInfo -- Whether it's a direct or vectored return | CSwitch !CAddrMode [(Literal, AbstractC)] -- alternatives diff --git a/ghc/compiler/absCSyn/CLabel.lhs b/ghc/compiler/absCSyn/CLabel.lhs index 9161b280fd..ac0c3d223d 100644 --- a/ghc/compiler/absCSyn/CLabel.lhs +++ b/ghc/compiler/absCSyn/CLabel.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CLabel.lhs,v 1.26 1999/05/11 16:44:04 keithw Exp $ +% $Id: CLabel.lhs,v 1.27 1999/05/13 17:30:52 simonm Exp $ % \section[CLabel]{@CLabel@: Information to make C Labels} @@ -35,7 +35,7 @@ module CLabel ( mkAsmTempLabel, mkErrorStdEntryLabel, - mkUpdEntryLabel, + mkUpdInfoLabel, mkCAFBlackHoleInfoTableLabel, mkSECAFBlackHoleInfoTableLabel, mkRtsPrimOpLabel, @@ -45,7 +45,7 @@ module CLabel ( mkCC_Label, mkCCS_Label, - needsCDecl, isReadOnly, isAsmTemp, externallyVisibleCLabel, + needsCDecl, isAsmTemp, externallyVisibleCLabel, CLabelType(..), labelType, labelDynamic, @@ -156,7 +156,7 @@ data RtsLabelInfo | RtsBlackHoleInfoTbl FAST_STRING -- black hole with info table name - | RtsUpdEntry + | RtsUpdInfo | RtsSelectorInfoTbl Bool{-updatable-} Int{-offset-} -- Selector thunks | RtsSelectorEntry Bool{-updatable-} Int{-offset-} @@ -210,7 +210,7 @@ mkAsmTempLabel = AsmTempLabel -- Some fixed runtime system labels mkErrorStdEntryLabel = RtsLabel RtsShouldNeverHappenCode -mkUpdEntryLabel = RtsLabel RtsUpdEntry +mkUpdInfoLabel = RtsLabel RtsUpdInfo mkCAFBlackHoleInfoTableLabel = RtsLabel (RtsBlackHoleInfoTbl SLIT("CAF_BLACKHOLE_info")) mkSECAFBlackHoleInfoTableLabel = if opt_DoTickyProfiling then RtsLabel (RtsBlackHoleInfoTbl SLIT("SE_CAF_BLACKHOLE_info")) @@ -232,7 +232,6 @@ mkCCS_Label ccs = CCS_Label ccs \begin{code} needsCDecl :: CLabel -> Bool -- False <=> it's pre-declared; don't bother -isReadOnly :: CLabel -> Bool -- lives in C "text space" isAsmTemp :: CLabel -> Bool -- is a local temporary for native code generation externallyVisibleCLabel :: CLabel -> Bool -- not C "static" \end{code} @@ -262,21 +261,6 @@ needsCDecl (CC_Label _) = False needsCDecl (CCS_Label _) = False \end{code} -Whether the labelled thing can be put in C "text space": - -\begin{code} -isReadOnly (IdLabel _ InfoTbl) = True -- info-tables: yes -isReadOnly (IdLabel _ other) = False -- others: pessimistically, no - -isReadOnly (DataConLabel _ _) = True -- and so on, for other -isReadOnly (TyConLabel _) = True -isReadOnly (CaseLabel _ _) = True -isReadOnly (AsmTempLabel _) = True -isReadOnly (RtsLabel _) = True -isReadOnly (CC_Label _) = True -isReadOnly (CCS_Label _) = True -\end{code} - Whether the label is an assembler temporary: \begin{code} @@ -307,6 +291,7 @@ labelType :: CLabel -> CLabelType labelType (RtsLabel (RtsBlackHoleInfoTbl _)) = InfoTblType labelType (RtsLabel (RtsSelectorInfoTbl _ _)) = InfoTblType labelType (RtsLabel (RtsApInfoTbl _ _)) = InfoTblType +labelType (RtsLabel RtsUpdInfo) = InfoTblType labelType (CaseLabel _ CaseReturnInfo) = InfoTblType labelType (CaseLabel _ CaseReturnPt) = CodeType labelType (CaseLabel _ CaseVecTbl) = VecTblType @@ -418,7 +403,7 @@ pprCLbl (CaseLabel u CaseBitmap) pprCLbl (RtsLabel RtsShouldNeverHappenCode) = ptext SLIT("stg_error_entry") -pprCLbl (RtsLabel RtsUpdEntry) = ptext SLIT("Upd_frame_entry") +pprCLbl (RtsLabel RtsUpdInfo) = ptext SLIT("Upd_frame_info") pprCLbl (RtsLabel (RtsBlackHoleInfoTbl info)) = ptext info diff --git a/ghc/compiler/absCSyn/PprAbsC.lhs b/ghc/compiler/absCSyn/PprAbsC.lhs index b17536be87..cd634741b3 100644 --- a/ghc/compiler/absCSyn/PprAbsC.lhs +++ b/ghc/compiler/absCSyn/PprAbsC.lhs @@ -28,7 +28,7 @@ import AbsCUtils ( getAmodeRep, nonemptyAbsC, import Constants ( mIN_UPD_SIZE ) import CallConv ( CallConv, callConvAttribute, cCallConv ) import CLabel ( externallyVisibleCLabel, mkErrorStdEntryLabel, - isReadOnly, needsCDecl, pprCLabel, + needsCDecl, pprCLabel, mkReturnInfoLabel, mkReturnPtLabel, mkClosureTblLabel, mkStaticClosureLabel, CLabel, CLabelType(..), labelType, labelDynamic @@ -143,7 +143,8 @@ pprAbsC (CReturn am return_info) c (hcat [text jmp_lit, target, pp_paren_semi ]) where target = case return_info of - DirectReturn -> hcat [char '(', pprAmode am, rparen] + DirectReturn -> hcat [ptext SLIT("ENTRY_CODE"), lparen, + pprAmode am, rparen] DynamicVectoredReturn am' -> mk_vector (pprAmode am') StaticVectoredReturn n -> mk_vector (int n) -- Always positive mk_vector x = hcat [text "RET_VEC", char '(', pprAmode am, comma, @@ -498,32 +499,24 @@ pprAbsC stmt@(CRetDirect uniq code srt liveness) _ LvLarge _ -> SLIT("RET_BIG") pprAbsC stmt@(CRetVector label amodes srt liveness) _ - = vcat [ - pp_vector, + = case (pprTempAndExternDecls stmt) of { (_, pp_exts) -> + vcat [ + pp_exts, hcat [ - ptext SLIT(" }"), comma, ptext SLIT("\n VEC_INFO_TABLE"), - lparen, - pp_liveness liveness, comma, -- bitmap liveness mask - pp_srt_info srt, -- SRT - ptext type_str, -- or big, depending on the size - -- of the liveness mask. - rparen - ], - text "};" + ptext SLIT("VEC_INFO_") <> int size, + lparen, + pprCLabel label, comma, + pp_liveness liveness, comma, -- bitmap liveness mask + pp_srt_info srt, -- SRT + ptext type_str, comma, + ppLocalness label, comma + ], + nest 2 (sep (punctuate comma (map ppr_item amodes))), + text ");" ] + } where - pp_vector = - case (pprTempAndExternDecls stmt) of { (_, pp_exts) -> - vcat [ - pp_exts, - hcat [ppLocalness label, - ptext SLIT(" vec_info_"), int size, space, - pprCLabel label, text "= { {" - ], - nest 2 (sep (punctuate comma (map ppr_item (reverse amodes)))) - ] } - ppr_item item = (<>) (text "(F_) ") (ppr_amode item) size = length amodes @@ -538,14 +531,9 @@ pprAbsC (CCostCentreStackDecl ccs) _ = pprCostCentreStackDecl ccs \begin{code} ppLocalness label - = (<>) static const - where - static = if (externallyVisibleCLabel label) + = if (externallyVisibleCLabel label) then empty else ptext SLIT("static ") - const = if not (isReadOnly label) - then empty - else ptext SLIT("const") -- Horrible macros for declaring the types and locality of labels (see -- StgMacros.h). @@ -559,10 +547,7 @@ ppLocalnessMacro include_dyn_prefix clabel = CodeType -> ptext SLIT("F_") InfoTblType -> ptext SLIT("I_") ClosureTblType -> ptext SLIT("CP_") - DataType -> ptext SLIT("D_") <> - if isReadOnly clabel - then ptext SLIT("RO_") - else empty + DataType -> ptext SLIT("D_") ] where is_visible = externallyVisibleCLabel clabel diff --git a/ghc/compiler/codeGen/CgCase.lhs b/ghc/compiler/codeGen/CgCase.lhs index a99a8fe754..aa09d5db6d 100644 --- a/ghc/compiler/codeGen/CgCase.lhs +++ b/ghc/compiler/codeGen/CgCase.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgCase.lhs,v 1.27 1999/04/27 12:34:52 simonm Exp $ +% $Id: CgCase.lhs,v 1.28 1999/05/13 17:30:55 simonm Exp $ % %******************************************************** %* * @@ -470,7 +470,7 @@ cgEvalAlts cc_slot bndr srt alts if is_alg && isUnboxedTupleTyCon spec_tycon then case alts of [alt] -> let lbl = mkReturnInfoLabel uniq in - cgUnboxedTupleAlt lbl cc_slot True alt + cgUnboxedTupleAlt uniq cc_slot True alt `thenFC` \ abs_c -> getSRTLabel `thenFC` \srt_label -> absC (CRetDirect uniq abs_c (srt_label, srt) @@ -515,7 +515,7 @@ cgEvalAlts cc_slot bndr srt alts (srt_label,srt) liveness_mask) `thenC` -- Return an amode for the block - returnFC (CaseAlts (CLbl (mkReturnPtLabel uniq) RetRep) Nothing) + returnFC (CaseAlts (CLbl (mkReturnInfoLabel uniq) RetRep) Nothing) \end{code} @@ -654,7 +654,7 @@ cgAlgAlt gc_flag uniq cc_slot must_label_branch lbl = mkAltLabel uniq tag cgUnboxedTupleAlt - :: CLabel -- label of the alternative + :: Unique -- unique for label of the alternative -> Maybe VirtualSpOffset -- Restore cost centre -> Bool -- ctxt switch -> (DataCon, [Id], [Bool], StgExpr) -- alternative @@ -978,7 +978,7 @@ possibleHeapCheck -> Bool -- True <=> algebraic case -> [MagicId] -- live registers -> [(VirtualSpOffset,Int)] -- stack slots to tag - -> Maybe CLabel -- return address + -> Maybe Unique -- return address unique -> Code -- continuation -> Code diff --git a/ghc/compiler/codeGen/CgClosure.lhs b/ghc/compiler/codeGen/CgClosure.lhs index 86f90af8ca..edcb089862 100644 --- a/ghc/compiler/codeGen/CgClosure.lhs +++ b/ghc/compiler/codeGen/CgClosure.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgClosure.lhs,v 1.29 1999/05/11 16:44:02 keithw Exp $ +% $Id: CgClosure.lhs,v 1.30 1999/05/13 17:30:56 simonm Exp $ % \section[CgClosure]{Code generation for closures} @@ -41,7 +41,7 @@ import CgUsages ( setRealAndVirtualSp, getVirtSp, getSpRelOffset, getHpRelOffset ) import CLabel ( CLabel, mkClosureLabel, mkFastEntryLabel, - mkRednCountsLabel, mkStdEntryLabel + mkRednCountsLabel, mkInfoTableLabel ) import ClosureInfo -- lots and lots of stuff import CmdLineOpts ( opt_GranMacros, opt_SccProfilingOn, opt_DoTickyProfiling ) @@ -401,7 +401,7 @@ closureCodeBody binder_info closure_info cc all_args body enterCostCentreCode closure_info cc IsFunction False `thenC` -- Do the business - funWrapper closure_info arg_regs stk_tags slow_label (cgExpr body) + funWrapper closure_info arg_regs stk_tags info_label (cgExpr body) in -- Make a labelled code-block for the slow and fast entry code forkAbsC (if slow_code_needed then slow_entry_code else absC AbsCNop) @@ -429,7 +429,7 @@ closureCodeBody binder_info closure_info cc all_args body -- Manufacture labels name = closureName closure_info fast_label = mkFastEntryLabel name stg_arity - slow_label = mkStdEntryLabel name + info_label = mkInfoTableLabel name \end{code} For lexically scoped profiling we have to load the cost centre from @@ -572,10 +572,10 @@ thunkWrapper closure_info label thunk_code funWrapper :: ClosureInfo -- Closure whose code body this is -> [MagicId] -- List of argument registers (if any) -> [(VirtualSpOffset,Int)] -- tagged stack slots - -> CLabel -- slow entry point for heap check ret. + -> CLabel -- info table for heap check ret. -> Code -- Body of function being compiled -> Code -funWrapper closure_info arg_regs stk_tags slow_label fun_body +funWrapper closure_info arg_regs stk_tags info_label fun_body = -- Stack overflow check nodeMustPointToIt (closureLFInfo closure_info) `thenFC` \ node_points -> let @@ -587,7 +587,7 @@ funWrapper closure_info arg_regs stk_tags slow_label fun_body else absC AbsCNop) `thenC` -- heap and/or stack checks - fastEntryChecks arg_regs stk_tags slow_label node_points ( + fastEntryChecks arg_regs stk_tags info_label node_points ( -- Finally, do the business fun_body diff --git a/ghc/compiler/codeGen/CgHeapery.lhs b/ghc/compiler/codeGen/CgHeapery.lhs index 6fa82c94f9..ba26f4d622 100644 --- a/ghc/compiler/codeGen/CgHeapery.lhs +++ b/ghc/compiler/codeGen/CgHeapery.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgHeapery.lhs,v 1.15 1999/03/08 17:05:41 simonm Exp $ +% $Id: CgHeapery.lhs,v 1.16 1999/05/13 17:30:56 simonm Exp $ % \section[CgHeapery]{Heap management functions} @@ -31,6 +31,7 @@ import ClosureInfo ( closureSize, closureGoodStuffSize, closureSMRep ) import PrimRep ( PrimRep(..), isFollowableRep ) +import Unique ( Unique ) import CmdLineOpts ( opt_SccProfilingOn ) import GlaExts import Outputable @@ -226,7 +227,7 @@ altHeapCheck -> [MagicId] -- live registers -> [(VirtualSpOffset,Int)] -- stack slots to tag -> AbstractC - -> Maybe CLabel -- ret address if not on top of stack. + -> Maybe Unique -- uniq of ret address (possibly) -> Code -> Code @@ -251,6 +252,12 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code checking_code tag_assts = case non_void_regs of +{- no: there might be stuff on top of the retn. addr. on the stack. + [{-no regs-}] -> + CCheck HP_CHK_NOREGS + [mkIntCLit words_required] + tag_assts +-} -- this will cover all cases for x86 [VanillaReg rep ILIT(1)] @@ -258,14 +265,14 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code CCheck HP_CHK_UT_ALT [mkIntCLit words_required, mkIntCLit 1, mkIntCLit 0, CReg (VanillaReg RetRep ILIT(2)), - CLbl ret_addr RetRep] + CLbl (mkReturnInfoLabel ret_addr) RetRep] tag_assts | otherwise -> CCheck HP_CHK_UT_ALT [mkIntCLit words_required, mkIntCLit 0, mkIntCLit 1, CReg (VanillaReg RetRep ILIT(2)), - CLbl ret_addr RetRep] + CLbl (mkReturnInfoLabel ret_addr) RetRep] tag_assts several_regs -> @@ -274,7 +281,10 @@ altHeapCheck is_fun regs tags fail_code (Just ret_addr) code CCheck HP_CHK_GEN [mkIntCLit words_required, mkIntCLit (IBOX(word2Int# liveness)), - CLbl ret_addr RetRep] + -- HP_CHK_GEN needs a direct return address, + -- not an info table (might be different if + -- we're not assembly-mangling/tail-jumping etc.) + CLbl (mkReturnPtLabel ret_addr) RetRep] tag_assts -- normal algebraic and primitive case alternatives: diff --git a/ghc/compiler/codeGen/CgLetNoEscape.lhs b/ghc/compiler/codeGen/CgLetNoEscape.lhs index 6d5336c88c..f122b963b4 100644 --- a/ghc/compiler/codeGen/CgLetNoEscape.lhs +++ b/ghc/compiler/codeGen/CgLetNoEscape.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 % -% $Id: CgLetNoEscape.lhs,v 1.12 1998/12/18 17:40:51 simonpj Exp $ +% $Id: CgLetNoEscape.lhs,v 1.13 1999/05/13 17:30:57 simonm Exp $ % %******************************************************** %* * @@ -30,12 +30,13 @@ import CgRetConv ( assignRegs ) import CgStackery ( mkTaggedVirtStkOffsets, allocStackTop, deAllocStackTop, freeStackSlots ) import CgUsages ( setRealAndVirtualSp, getRealSp, getSpRelOffset ) -import CLabel ( mkReturnPtLabel ) +import CLabel ( mkReturnInfoLabel ) import ClosureInfo ( mkLFLetNoEscape ) import CostCentre ( CostCentreStack ) import Id ( idPrimRep, Id ) import Var ( idUnique ) import PrimRep ( PrimRep(..), retPrimRepSize ) +import Unique ( Unique ) import BasicTypes ( RecFlag(..) ) \end{code} @@ -160,7 +161,6 @@ cgLetNoEscapeClosure arity = length args lf_info = mkLFLetNoEscape arity uniq = idUnique binder - lbl = mkReturnPtLabel uniq in -- saveVolatileVarsAndRegs done earlier in cgExpr. @@ -173,7 +173,7 @@ cgLetNoEscapeClosure (deAllocStackTop retPrimRepSize `thenFC` \_ -> buildContLivenessMask uniq `thenFC` \ liveness -> - forkAbsC (cgLetNoEscapeBody binder cc args body lbl) + forkAbsC (cgLetNoEscapeBody binder cc args body uniq) `thenFC` \ code -> getSRTLabel `thenFC` \ srt_label -> absC (CRetDirect uniq code (srt_label,srt) liveness) @@ -188,10 +188,10 @@ cgLetNoEscapeBody :: Id -> CostCentreStack -> [Id] -- Args -> StgExpr -- Body - -> CLabel -- Entry label + -> Unique -- Unique for entry label -> Code -cgLetNoEscapeBody binder cc all_args body lbl +cgLetNoEscapeBody binder cc all_args body uniq = -- this is where the stack frame lives: getRealSp `thenFC` \sp -> @@ -221,12 +221,13 @@ cgLetNoEscapeBody binder cc all_args body lbl -- fill in the frame header only if we fail a heap check: -- otherwise it isn't needed. getSpRelOffset sp `thenFC` \sp_rel -> - let frame_hdr_asst = CAssign (CVal sp_rel RetRep) (CLbl lbl RetRep) + let lbl = mkReturnInfoLabel uniq + frame_hdr_asst = CAssign (CVal sp_rel RetRep) (CLbl lbl RetRep) in -- Do heap check [ToDo: omit for non-recursive case by recording in -- in envt and absorbing at call site] - altHeapCheck False arg_regs stk_tags frame_hdr_asst (Just lbl) ( + altHeapCheck False arg_regs stk_tags frame_hdr_asst (Just uniq) ( cgExpr body ) diff --git a/ghc/compiler/codeGen/CgMonad.lhs b/ghc/compiler/codeGen/CgMonad.lhs index c3e029516a..dea30bf33d 100644 --- a/ghc/compiler/codeGen/CgMonad.lhs +++ b/ghc/compiler/codeGen/CgMonad.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgMonad.lhs,v 1.18 1999/03/02 14:34:38 sof Exp $ +% $Id: CgMonad.lhs,v 1.19 1999/05/13 17:30:57 simonm Exp $ % \section[CgMonad]{The code generation monad} @@ -49,7 +49,7 @@ import {-# SOURCE #-} CgUsages ( getSpRelOffset ) import AbsCSyn import AbsCUtils ( mkAbsCStmts ) import CmdLineOpts ( opt_SccProfilingOn, opt_DoTickyProfiling ) -import CLabel ( CLabel, mkUpdEntryLabel ) +import CLabel ( CLabel, mkUpdInfoLabel ) import Module ( Module ) import DataCon ( ConTag ) import Id ( Id ) @@ -163,13 +163,19 @@ type JoinDetails -- that Sp is pointing to the top word of the return address. This -- seems unclean but there you go. +-- sequelToAmode returns an amode which refers to an info table. The info +-- table will always be of the RET(_VEC)?_(BIG|SMALL) kind. We're careful +-- not to handle real code pointers, just in case we're compiling for +-- an unregisterised/untailcallish architecture, where info pointers and +-- code pointers aren't the same. + sequelToAmode :: Sequel -> FCode CAddrMode sequelToAmode (OnStack virt_sp_offset) = getSpRelOffset virt_sp_offset `thenFC` \ sp_rel -> returnFC (CVal sp_rel RetRep) -sequelToAmode UpdateCode = returnFC (CLbl mkUpdEntryLabel CodePtrRep) +sequelToAmode UpdateCode = returnFC (CLbl mkUpdInfoLabel RetRep) sequelToAmode (CaseAlts amode _) = returnFC amode sequelToAmode (SeqFrame _ _) = panic "sequelToAmode: SeqFrame" diff --git a/ghc/compiler/codeGen/CgRetConv.lhs b/ghc/compiler/codeGen/CgRetConv.lhs index 07f07aba39..d4784b6aae 100644 --- a/ghc/compiler/codeGen/CgRetConv.lhs +++ b/ghc/compiler/codeGen/CgRetConv.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP Project, Glasgow University, 1992-1998 % -% $Id: CgRetConv.lhs,v 1.18 1999/01/22 10:45:21 simonm Exp $ +% $Id: CgRetConv.lhs,v 1.19 1999/05/13 17:30:58 simonm Exp $ % \section[CgRetConv]{Return conventions for the code generator} @@ -21,9 +21,10 @@ module CgRetConv ( import AbsCSyn -- quite a few things import Constants ( mAX_FAMILY_SIZE_FOR_VEC_RETURNS, mAX_Vanilla_REG, mAX_Float_REG, - mAX_Double_REG, mAX_Real_Double_REG, - mAX_Real_Vanilla_REG, mAX_Real_Float_REG, - mAX_Long_REG, mAX_Real_Long_REG + mAX_Double_REG, mAX_Long_REG + ) +import CmdLineOpts ( opt_UseVanillaRegs, opt_UseFloatRegs, + opt_UseDoubleRegs, opt_UseLongRegs ) import Maybes ( catMaybes ) import DataCon ( dataConRawArgTys, DataCon ) @@ -182,10 +183,10 @@ that are guaranteed to map to machine registers. \begin{code} vanillaRegNos, floatRegNos, doubleRegNos, longRegNos :: [Int] -vanillaRegNos = regList mAX_Real_Vanilla_REG -floatRegNos = regList mAX_Real_Float_REG -doubleRegNos = regList mAX_Real_Double_REG -longRegNos = regList mAX_Real_Long_REG +vanillaRegNos = regList opt_UseVanillaRegs +floatRegNos = regList opt_UseFloatRegs +doubleRegNos = regList opt_UseDoubleRegs +longRegNos = regList opt_UseLongRegs allVanillaRegNos, allFloatRegNos, allDoubleRegNos, allLongRegNos :: [Int] allVanillaRegNos = regList mAX_Vanilla_REG diff --git a/ghc/compiler/codeGen/CgTailCall.lhs b/ghc/compiler/codeGen/CgTailCall.lhs index b6953b1ce0..168cde42ae 100644 --- a/ghc/compiler/codeGen/CgTailCall.lhs +++ b/ghc/compiler/codeGen/CgTailCall.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgTailCall.lhs,v 1.18 1999/01/21 10:31:57 simonm Exp $ +% $Id: CgTailCall.lhs,v 1.19 1999/05/13 17:30:58 simonm Exp $ % %******************************************************** %* * @@ -38,7 +38,7 @@ import CgRetConv ( dataReturnConvPrim, import CgStackery ( adjustRealSp, mkTaggedStkAmodes, adjustStackHW ) import CgUsages ( getSpRelOffset ) import CgUpdate ( pushSeqFrame ) -import CLabel ( mkUpdEntryLabel, mkRtsPrimOpLabel ) +import CLabel ( mkUpdInfoLabel, mkRtsPrimOpLabel ) import ClosureInfo ( nodeMustPointToIt, getEntryConvention, EntryConvention(..), LambdaFormInfo @@ -168,7 +168,7 @@ mkStaticAlgReturnCode con sequel UpdateCode -> -- Ha! We can go direct to the update code, -- (making sure to jump to the *correct* update -- code.) - absC (CReturn (CLbl mkUpdEntryLabel CodePtrRep) + absC (CReturn (CLbl mkUpdInfoLabel CodePtrRep) return_info) CaseAlts _ (Just (alts, _)) -> -- Ho! We know the constructor so diff --git a/ghc/compiler/main/CmdLineOpts.lhs b/ghc/compiler/main/CmdLineOpts.lhs index 97a1820287..bdc0bb6df3 100644 --- a/ghc/compiler/main/CmdLineOpts.lhs +++ b/ghc/compiler/main/CmdLineOpts.lhs @@ -14,21 +14,15 @@ module CmdLineOpts ( intSwitchSet, switchIsOn, - opt_AllStrict, - opt_AllowOverlappingInstances, - opt_AllowUndecidableInstances, - opt_AutoSccsOnAllToplevs, - opt_AutoSccsOnExportedToplevs, - opt_AutoSccsOnIndividualCafs, - opt_AutoSccsOnDicts, - opt_CompilingPrelude, + -- debugging opts opt_D_dump_absC, opt_D_dump_asm, + opt_D_dump_cpranal, opt_D_dump_deriv, opt_D_dump_ds, opt_D_dump_flatC, - opt_D_dump_inlinings, opt_D_dump_foreign, + opt_D_dump_inlinings, opt_D_dump_occur_anal, opt_D_dump_rdr, opt_D_dump_realC, @@ -38,84 +32,104 @@ module CmdLineOpts ( opt_D_dump_spec, opt_D_dump_stg, opt_D_dump_stranal, - opt_D_dump_cpranal, - opt_D_dump_worker_wrapper, opt_D_dump_tc, opt_D_dump_usagesp, + opt_D_dump_worker_wrapper, opt_D_show_passes, - opt_D_show_rn_trace, opt_D_show_rn_imports, + opt_D_show_rn_stats, + opt_D_show_rn_trace, opt_D_simplifier_stats, opt_D_source_stats, opt_D_verbose_core2core, opt_D_verbose_stg2stg, - opt_DictsStrict, opt_DoCoreLinting, - opt_DoUSPLinting, opt_DoStgLinting, - opt_DoSemiTagging, - opt_DoEtaReduction, + opt_DoUSPLinting, + opt_PprStyle_Debug, + opt_PprStyle_NoPrags, + opt_PprUserLength, + + -- warning opts + opt_WarnDuplicateExports, + opt_WarnHiShadows, + opt_WarnIncompletePatterns, + opt_WarnMissingMethods, + opt_WarnMissingSigs, + opt_WarnNameShadowing, + opt_WarnOverlappingPatterns, + opt_WarnSimplePatterns, + opt_WarnTypeDefaults, + opt_WarnUnusedBinds, + opt_WarnUnusedImports, + opt_WarnUnusedMatches, + + -- profiling opts + opt_AutoSccsOnAllToplevs, + opt_AutoSccsOnExportedToplevs, + opt_AutoSccsOnIndividualCafs, + opt_AutoSccsOnDicts, + opt_SccGroup, + opt_SccProfilingOn, opt_DoTickyProfiling, - opt_EmitCExternDecls, - opt_EnsureSplittableC, + + -- language opts + opt_AllStrict, + opt_DictsStrict, + opt_MaxContextReductionDepth, + opt_AllowOverlappingInstances, + opt_AllowUndecidableInstances, + opt_GlasgowExts, + opt_IrrefutableTuples, + opt_NumbersStrict, + opt_Parallel, + + -- optimisation opts + opt_DoEtaReduction, + opt_DoSemiTagging, opt_FoldrBuildOn, - opt_UnboxStrictFields, + opt_InterfaceUnfoldThreshold, + opt_LiberateCaseThreshold, + opt_NoPreInlining, + opt_StgDoLetNoEscapes, + opt_UnfoldCasms, + opt_UnfoldingConDiscount, + opt_UnfoldingCreationThreshold, + opt_UnfoldingKeenessFactor, + opt_UnfoldingUseThreshold, opt_UsageSPOn, - opt_GlasgowExts, + opt_UnboxStrictFields, + + -- misc opts + opt_CompilingPrelude, + opt_EmitCExternDecls, + opt_EnsureSplittableC, opt_GranMacros, opt_HiMap, opt_HiVersion, - opt_IgnoreIfacePragmas, opt_IgnoreAsserts, - opt_IrrefutableTuples, - opt_LiberateCaseThreshold, - opt_MaxContextReductionDepth, - opt_MultiParamClasses, + opt_IgnoreIfacePragmas, opt_NoHiCheck, opt_NoImplicitPrelude, - opt_NoPreInlining, - opt_NumbersStrict, opt_OmitBlackHoling, opt_OmitInterfacePragmas, - opt_PprStyle_NoPrags, - opt_PprStyle_Debug, - opt_PprUserLength, opt_ProduceC, - opt_ProduceHi, - opt_ProduceS, opt_ProduceExportCStubs, opt_ProduceExportHStubs, + opt_ProduceHi, + opt_ProduceS, + opt_PruneInstDecls, + opt_PruneTyDecls, opt_ReportCompile, - opt_SccGroup, - opt_SccProfilingOn, opt_SourceUnchanged, opt_Static, - opt_StgDoLetNoEscapes, - opt_Parallel, - - opt_InterfaceUnfoldThreshold, - opt_UnfoldCasms, - opt_UnfoldingCreationThreshold, - opt_UnfoldingConDiscount, - opt_UnfoldingUseThreshold, - opt_UnfoldingKeenessFactor, - + opt_Unregisterised, opt_Verbose, - opt_WarnNameShadowing, - opt_WarnUnusedMatches, - opt_WarnUnusedBinds, - opt_WarnUnusedImports, - opt_WarnIncompletePatterns, - opt_WarnOverlappingPatterns, - opt_WarnSimplePatterns, - opt_WarnTypeDefaults, - opt_WarnMissingMethods, - opt_WarnDuplicateExports, - opt_WarnHiShadows, - opt_WarnMissingSigs, - opt_PruneTyDecls, opt_PruneInstDecls, - opt_D_show_rn_stats + opt_UseVanillaRegs, + opt_UseFloatRegs, + opt_UseDoubleRegs, + opt_UseLongRegs ) where #include "HsVersions.h" @@ -285,28 +299,15 @@ unpacked_opts = \end{code} \begin{code} -opt_AllStrict = lookUp SLIT("-fall-strict") -opt_AllowOverlappingInstances = lookUp SLIT("-fallow-overlapping-instances") -opt_AllowUndecidableInstances = lookUp SLIT("-fallow-undecidable-instances") -opt_AutoSccsOnAllToplevs = lookUp SLIT("-fauto-sccs-on-all-toplevs") -opt_AutoSccsOnExportedToplevs = lookUp SLIT("-fauto-sccs-on-exported-toplevs") -opt_AutoSccsOnIndividualCafs = lookUp SLIT("-fauto-sccs-on-individual-cafs") -opt_AutoSccsOnDicts = lookUp SLIT("-fauto-sccs-on-dicts") - {- - It's a bit unfortunate to have to re-introduce this chap, but on Win32 - platforms we do need a way of distinguishing between the case when we're - compiling a static version of the Prelude and one that's going to be - put into a DLL. Why? Because the compiler's wired in modules need to - be attributed as either coming from a DLL or not. - -} -opt_CompilingPrelude = lookUp SLIT("-fcompiling-prelude") +-- debugging opts opt_D_dump_absC = lookUp SLIT("-ddump-absC") opt_D_dump_asm = lookUp SLIT("-ddump-asm") +opt_D_dump_cpranal = lookUp SLIT("-ddump-cpranalyse") opt_D_dump_deriv = lookUp SLIT("-ddump-deriv") opt_D_dump_ds = lookUp SLIT("-ddump-ds") opt_D_dump_flatC = lookUp SLIT("-ddump-flatC") -opt_D_dump_inlinings = lookUp SLIT("-ddump-inlinings") opt_D_dump_foreign = lookUp SLIT("-ddump-foreign-stubs") +opt_D_dump_inlinings = lookUp SLIT("-ddump-inlinings") opt_D_dump_occur_anal = lookUp SLIT("-ddump-occur-anal") opt_D_dump_rdr = lookUp SLIT("-ddump-rdr") opt_D_dump_realC = lookUp SLIT("-ddump-realC") @@ -316,84 +317,114 @@ opt_D_dump_simpl_iterations = lookUp SLIT("-ddump-simpl-iterations") opt_D_dump_spec = lookUp SLIT("-ddump-spec") opt_D_dump_stg = lookUp SLIT("-ddump-stg") opt_D_dump_stranal = lookUp SLIT("-ddump-stranal") -opt_D_dump_worker_wrapper = lookUp SLIT("-ddump-workwrap") -opt_D_dump_cpranal = lookUp SLIT("-ddump-cpranalyse") opt_D_dump_tc = lookUp SLIT("-ddump-tc") opt_D_dump_usagesp = lookUp SLIT("-ddump-usagesp") +opt_D_dump_worker_wrapper = lookUp SLIT("-ddump-workwrap") opt_D_show_passes = lookUp SLIT("-dshow-passes") -opt_D_show_rn_trace = lookUp SLIT("-dshow-rn-trace") opt_D_show_rn_imports = lookUp SLIT("-dshow-rn-imports") +opt_D_show_rn_trace = lookUp SLIT("-dshow-rn-trace") +opt_D_show_rn_stats = lookUp SLIT("-dshow-rn-stats") opt_D_simplifier_stats = lookUp SLIT("-dsimplifier-stats") opt_D_source_stats = lookUp SLIT("-dsource-stats") opt_D_verbose_core2core = lookUp SLIT("-dverbose-simpl") opt_D_verbose_stg2stg = lookUp SLIT("-dverbose-stg") -opt_DictsStrict = lookUp SLIT("-fdicts-strict") opt_DoCoreLinting = lookUp SLIT("-dcore-lint") opt_DoStgLinting = lookUp SLIT("-dstg-lint") +opt_DoUSPLinting = lookUp SLIT("-dusagesp-lint") +opt_PprStyle_NoPrags = lookUp SLIT("-dppr-noprags") +opt_PprStyle_Debug = lookUp SLIT("-dppr-debug") +opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name + +-- warning opts +opt_WarnDuplicateExports = lookUp SLIT("-fwarn-duplicate-exports") +opt_WarnHiShadows = lookUp SLIT("-fwarn-hi-shadowing") +opt_WarnIncompletePatterns = lookUp SLIT("-fwarn-incomplete-patterns") +opt_WarnMissingMethods = lookUp SLIT("-fwarn-missing-methods") +opt_WarnMissingSigs = lookUp SLIT("-fwarn-missing-signatures") +opt_WarnNameShadowing = lookUp SLIT("-fwarn-name-shadowing") +opt_WarnOverlappingPatterns = lookUp SLIT("-fwarn-overlapping-patterns") +opt_WarnSimplePatterns = lookUp SLIT("-fwarn-simple-patterns") +opt_WarnTypeDefaults = lookUp SLIT("-fwarn-type-defaults") +opt_WarnUnusedBinds = lookUp SLIT("-fwarn-unused-binds") +opt_WarnUnusedImports = lookUp SLIT("-fwarn-unused-imports") +opt_WarnUnusedMatches = lookUp SLIT("-fwarn-unused-matches") + +-- profiling opts +opt_AutoSccsOnAllToplevs = lookUp SLIT("-fauto-sccs-on-all-toplevs") +opt_AutoSccsOnExportedToplevs = lookUp SLIT("-fauto-sccs-on-exported-toplevs") +opt_AutoSccsOnIndividualCafs = lookUp SLIT("-fauto-sccs-on-individual-cafs") +opt_AutoSccsOnDicts = lookUp SLIT("-fauto-sccs-on-dicts") +opt_SccGroup = lookup_str "-G=" +opt_SccProfilingOn = lookUp SLIT("-fscc-profiling") +opt_DoTickyProfiling = lookUp SLIT("-fticky-ticky") + +-- language opts +opt_AllStrict = lookUp SLIT("-fall-strict") +opt_DictsStrict = lookUp SLIT("-fdicts-strict") +opt_AllowOverlappingInstances = lookUp SLIT("-fallow-overlapping-instances") +opt_AllowUndecidableInstances = lookUp SLIT("-fallow-undecidable-instances") +opt_GlasgowExts = lookUp SLIT("-fglasgow-exts") +opt_IrrefutableTuples = lookUp SLIT("-firrefutable-tuples") +opt_MaxContextReductionDepth = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH +opt_NumbersStrict = lookUp SLIT("-fnumbers-strict") +opt_Parallel = lookUp SLIT("-fparallel") + +-- optimisation opts opt_DoEtaReduction = lookUp SLIT("-fdo-eta-reduction") -opt_UsageSPOn = lookUp SLIT("-fusagesp-on") opt_DoSemiTagging = lookUp SLIT("-fsemi-tagging") -opt_DoTickyProfiling = lookUp SLIT("-fticky-ticky") -opt_DoUSPLinting = lookUp SLIT("-dusagesp-lint") -opt_EmitCExternDecls = lookUp SLIT("-femit-extern-decls") -opt_EnsureSplittableC = lookUp SLIT("-fglobalise-toplev-names") opt_FoldrBuildOn = lookUp SLIT("-ffoldr-build-on") +opt_InterfaceUnfoldThreshold = lookup_def_int "-funfolding-interface-threshold" iNTERFACE_UNFOLD_THRESHOLD +opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" lIBERATE_CASE_THRESHOLD +opt_NoPreInlining = lookUp SLIT("-fno-pre-inlining") +opt_StgDoLetNoEscapes = lookUp SLIT("-flet-no-escape") +opt_UnfoldCasms = lookUp SLIT("-funfold-casms-in-hi-file") +opt_UnfoldingConDiscount = lookup_def_int "-funfolding-con-discount" uNFOLDING_CON_DISCOUNT_WEIGHT +opt_UnfoldingCreationThreshold = lookup_def_int "-funfolding-creation-threshold" uNFOLDING_CREATION_THRESHOLD +opt_UnfoldingKeenessFactor = lookup_def_float "-funfolding-keeness-factor" uNFOLDING_KEENESS_FACTOR +opt_UnfoldingUseThreshold = lookup_def_int "-funfolding-use-threshold" uNFOLDING_USE_THRESHOLD +opt_UsageSPOn = lookUp SLIT("-fusagesp-on") opt_UnboxStrictFields = lookUp SLIT("-funbox-strict-fields") + + {- + It's a bit unfortunate to have to re-introduce this chap, but on Win32 + platforms we do need a way of distinguishing between the case when we're + compiling a static version of the Prelude and one that's going to be + put into a DLL. Why? Because the compiler's wired in modules need to + be attributed as either coming from a DLL or not. + -} +opt_CompilingPrelude = lookUp SLIT("-fcompiling-prelude") +opt_EmitCExternDecls = lookUp SLIT("-femit-extern-decls") +opt_EnsureSplittableC = lookUp SLIT("-fglobalise-toplev-names") opt_GranMacros = lookUp SLIT("-fgransim") -opt_GlasgowExts = lookUp SLIT("-fglasgow-exts") opt_HiMap = lookup_str "-himap=" -- file saying where to look for .hi files opt_HiVersion = lookup_def_int "-fhi-version=" 0 -- what version we're compiling. -opt_IgnoreIfacePragmas = lookUp SLIT("-fignore-interface-pragmas") opt_IgnoreAsserts = lookUp SLIT("-fignore-asserts") -opt_IrrefutableTuples = lookUp SLIT("-firrefutable-tuples") -opt_MaxContextReductionDepth = lookup_def_int "-fcontext-stack" mAX_CONTEXT_REDUCTION_DEPTH -opt_MultiParamClasses = opt_GlasgowExts +opt_IgnoreIfacePragmas = lookUp SLIT("-fignore-interface-pragmas") opt_NoHiCheck = lookUp SLIT("-fno-hi-version-check") opt_NoImplicitPrelude = lookUp SLIT("-fno-implicit-prelude") -opt_NoPreInlining = lookUp SLIT("-fno-pre-inlining") -opt_NumbersStrict = lookUp SLIT("-fnumbers-strict") opt_OmitBlackHoling = lookUp SLIT("-dno-black-holing") opt_OmitInterfacePragmas = lookUp SLIT("-fomit-interface-pragmas") -opt_PprStyle_NoPrags = lookUp SLIT("-dppr-noprags") -opt_PprStyle_Debug = lookUp SLIT("-dppr-debug") -opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name opt_ProduceC = lookup_str "-C=" -opt_ProduceS = lookup_str "-S=" opt_ProduceExportCStubs = lookup_str "-F=" opt_ProduceExportHStubs = lookup_str "-FH=" opt_ProduceHi = lookup_str "-hifile=" -- the one to produce this time +opt_ProduceS = lookup_str "-S=" opt_ReportCompile = lookUp SLIT("-freport-compile") -opt_SccProfilingOn = lookUp SLIT("-fscc-profiling") +opt_PruneTyDecls = not (lookUp SLIT("-fno-prune-tydecls")) +opt_PruneInstDecls = not (lookUp SLIT("-fno-prune-instdecls")) opt_SourceUnchanged = lookUp SLIT("-fsource-unchanged") -opt_StgDoLetNoEscapes = lookUp SLIT("-flet-no-escape") -opt_Parallel = lookUp SLIT("-fparallel") opt_Static = lookUp SLIT("-static") -opt_SccGroup = lookup_str "-G=" +opt_Unregisterised = lookUp SLIT("-funregisterised") opt_Verbose = lookUp SLIT("-v") -opt_UnfoldCasms = lookUp SLIT("-funfold-casms-in-hi-file") -opt_InterfaceUnfoldThreshold = lookup_def_int "-funfolding-interface-threshold" iNTERFACE_UNFOLD_THRESHOLD -opt_UnfoldingCreationThreshold = lookup_def_int "-funfolding-creation-threshold" uNFOLDING_CREATION_THRESHOLD -opt_UnfoldingUseThreshold = lookup_def_int "-funfolding-use-threshold" uNFOLDING_USE_THRESHOLD -opt_UnfoldingConDiscount = lookup_def_int "-funfolding-con-discount" uNFOLDING_CON_DISCOUNT_WEIGHT - -opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" lIBERATE_CASE_THRESHOLD -opt_UnfoldingKeenessFactor = lookup_def_float "-funfolding-keeness-factor" uNFOLDING_KEENESS_FACTOR -opt_WarnNameShadowing = lookUp SLIT("-fwarn-name-shadowing") -opt_WarnHiShadows = lookUp SLIT("-fwarn-hi-shadowing") -opt_WarnIncompletePatterns = lookUp SLIT("-fwarn-incomplete-patterns") -opt_WarnOverlappingPatterns = lookUp SLIT("-fwarn-overlapping-patterns") -opt_WarnSimplePatterns = lookUp SLIT("-fwarn-simple-patterns") -opt_WarnTypeDefaults = lookUp SLIT("-fwarn-type-defaults") -opt_WarnUnusedMatches = lookUp SLIT("-fwarn-unused-matches") -opt_WarnUnusedBinds = lookUp SLIT("-fwarn-unused-binds") -opt_WarnUnusedImports = lookUp SLIT("-fwarn-unused-imports") -opt_WarnMissingMethods = lookUp SLIT("-fwarn-missing-methods") -opt_WarnDuplicateExports = lookUp SLIT("-fwarn-duplicate-exports") -opt_WarnMissingSigs = lookUp SLIT("-fwarn-missing-signatures") -opt_PruneTyDecls = not (lookUp SLIT("-fno-prune-tydecls")) -opt_PruneInstDecls = not (lookUp SLIT("-fno-prune-instdecls")) -opt_D_show_rn_stats = lookUp SLIT("-dshow-rn-stats") +opt_UseVanillaRegs | opt_Unregisterised = 0 + | otherwise = mAX_Real_Vanilla_REG +opt_UseFloatRegs | opt_Unregisterised = 0 + | otherwise = mAX_Real_Float_REG +opt_UseDoubleRegs | opt_Unregisterised = 0 + | otherwise = mAX_Real_Double_REG +opt_UseLongRegs | opt_Unregisterised = 0 + | otherwise = mAX_Real_Long_REG -- opt_UnfoldingOverrideThreshold = lookup_int "-funfolding-override-threshold" \end{code} |