WD[#      !" Safe-Inferred #$%&'()*+ #$%&'()*+ #$%&'()*+None *+-./02345689:;=?BCDGHJKM,-./,-./,-./None *+-./02345689:;=?BCDGHJKM012340123401234None567856785678None *+-./02345689:;=?BCDGHJKM 9:;<=>?@ABC 9:;<=>?@ABC 9:;<=>?@ABC Safe-InferredDEDEDE Safe-InferredFGFGFG  Safe-InferredHHH None *+-./02345689:;=?BCDGHJKMIJKLMNOPQRSTUVWXYZ[\]^IJKLMNOPQRSTUVWXYZ[\]^IJKLMNOPQSRTUVWXYZ[\]^ None *+-./02345689:;=?BCDGHJKM___  Safe-Inferred`abc`abc`abc None *+-./02345689:;=?BCDGHJKMdefghijklmnopqrstuvwxyz{|}~defghijklmnopqrstuvwxyz{|}~defghijklmnopqrstuvwxyz{|}~None  NoneNone *+-./02345689:;=?BCDGHJKMNone *+-./02345689:;=?BCDGHJKMNone *+-./02345689:;=?BCDGHJKMNone *+-./02345689:;=?BCDGHJKM   Safe-InferredNone *+-./02345689:;=?BCDGHJKM       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsNone*3pFrom the point of view of this library, a basic block is nothing more than an ordered sequence of operations.Every operation may reference multiple variables and/or specific physical registers. If a physical register is referenced, then that register is considered unavailable for allocation over the range of such references.Certain operations have special significance as to how basic blocks are organized, and the lifetime of allocations. Thus, if an operation begins or ends a loop, or represents a method call, it should be indicated using the  field. Indication of calls is necessary in order to save and restore all registers around a call, but indication of loops is optional, as it's merely avoids reloading of spilled variables inside loop bodies.Each variable has associated allocation details, and a flag to indicate whether it must be loaded into a register at its point of use. Variables are also distinguished by their kind, which allows for restricting the scope of their lifetime. For example, output variables are not needed in a basic block until the first point of use, while the lifetime of input variables extends until their final use."Transform a list of basic blocks containing variable references, into an equivalent list where each reference is associated with a register allocation. Artificial save and restore instructions may also be inserted into blocks to indicate spilling and reloading of variables.zIn order to call this function, the caller must transform their own basic block representation into a linear series of  structures. Each of these structures may be associated with a unique identifier, to assist with processing allocation info afterward.hIf allocation is found to be impossible -- for example if there are simply not enough registers -- a t: value is returned, with a string describing the error.uv wx!yz"#  !"#"!    uv wx!yz"{ !"#$$%&''()*+,--./0123456789:;<=>?@ABCD@AEFGAHI@AJKLMNOPQRSTU V W X Y Z [ \ ] ^ _ ` a @ A b c d e f g h i j @ k l m n o p q r s t u v @ A w x y z { | } ~  AA@@A@A@<8=$'-@A     ./01()*+,%& !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklinearscan-0.1.0.0 LinearScanLinearScan.UtilsLinearScan.IEndoLinearScan.IApplicativeLinearScan.IMonadLinearScan.IStateLinearScan.LogicLinearScan.SpecifLinearScan.NonEmpty0LinearScan.SsrboolLinearScan.Vector0LinearScan.SsrfunLinearScan.EqtypeLinearScan.LibLinearScan.RangeLinearScan.SsrnatLinearScan.IntervalLinearScan.FintypeLinearScan.SeqLinearScan.DatatypesLinearScan.MainOpKindCallLoopEnd LoopBeginNormal AllocationSpillRegister UnallocatedVarKindOutputTempInputPhysReg BlockInfoblockIdblockOpsOpInfoopIdopMetaopKindvarRefsregRefsVarInfovarIdvarKindvarAlloc regRequireddefaultVarInfo defaultOpInfodefaultBlockInfoallocateboundedTransport'snocset_nthvmapvfoldl'vfoldl'_with_indexnth list_rectunconsIFunctor unsafeCoerce__imap IApplicativeBuild_IApplicativeipureIMonad Build_IMonadijoinIState runIStatecoq_IState_IFunctorierrigetiputimodifycoq_IState_IApplicativecoq_IState_IMonadcoq_False_rect coq_False_recCoq_sig2Coq_sigcoq_NE_mapAccumL Coq_pred_sort Coq_predTypePredType Coq_mem_predMem Coq_simpl_relCoq_relCoq_pred Coq_reflectReflectFReflectTisSomeiffPidPandPrel_of_simpl_rel mkPredType pred_of_memmemin_mem_Option__apply_Option__coq_default _Option__bind _Option__map Coq_sub_sort Coq_subTypeSubTypeEquality__Coq_sortEquality__Coq_typeEquality__Coq_mixin_ofEquality__MixinEquality__Coq_axiom_Equality__mixin_of_rect_Equality__mixin_of_rec _Equality__op_Equality__type_rect_Equality__type_rec_Equality__coq_class_Equality__pack_Equality__cloneeq_opeqPval inj_eqAxiomval_eqPpair_eqpair_eqP prod_eqMixin prod_eqTypeopt_eqopt_eqPoption_eqMixin option_eqTypeex_falso_quodlibet fromMaybe option_map option_choosefoldl_with_index mapAccumL dep_foldl_invdep_foldl_invE RangeDescBuild_RangeDescUsePosSublistsOfUsePos Build_UsePosulocregReq usePosSpanrbegrendupsrangesIntersectrangeIntersectionPointfindRangeUsePosmakeDividedRange rangeSpaneqnP nat_eqMixin nat_eqTypeiter double_recdouble IntervalDescBuild_IntervalDescivaribegiendrdsgetIntervalDesc packInterval intervalStart intervalEndintervalCoversPosintervalExtentcoq_Interval_is_singletonintervalsIntersectintervalIntersectionPointfindIntervalUsePos nextUseAfter firstUsePosfirstUseReqReg lastUsePos splitPosition intervalSpan splitIntervalordinal_subTypeordinal_eqMixinordinal_eqTypeCoq_eqseq_classnconsnseqcatrevrevmem_seqpred_of_eq_seq seq_predTyperemCoq_intermediate_resultCoq_int_reg_seqSStateSSInfo Build_SSInfo IsSplittableBuild_IsSplittableHasWork Build_HasWorkHasBase Build_HasBase BlockState BuildStateBuild_BuildState BoundedRange BlockListBuild_BlockInfo Build_OpInfo Build_VarInfo IntervalId ScanStateDescBuild_ScanStateDescCoq_fixedIntervalsTypeSSErrorERegisterAssignmentsOverlapERegisterAlreadyAssignedENoIntervalsToSplitECannotSplitAssignedSingletonECannotSplitSingletonMyMachine__PhysReg_MyMachine__maxRegmaxRegcoq_SSError_rectcoq_SSError_recstbinderror_return_coq_ScanStateDesc_rectcoq_ScanStateDesc_rec nextInterval intervalsfixedIntervals unhandledactiveinactivehandled unhandledIds activeIds inactiveIds handledIdsall_state_lists totalExtentunhandledExtentregisterWithHighestPosgetScanStateDesc packScanStatecoq_ScanStateCursor_rectcoq_ScanStateCursor_reccurId curIntDetails curPositioncoq_VarKind_rectcoq_VarKind_reccoq_Allocation_rectcoq_Allocation_reccoq_VarInfo_rectcoq_VarInfo_reccoq_OpKind_rectcoq_OpKind_reccoq_OpInfo_rectcoq_OpInfo_reccoq_BlockInfo_rectcoq_BlockInfo_rectransportBoundedRangecoq_BuildState_rectcoq_BuildState_recbsPosbsVarsbsRegsfoldOps foldOpsRev mapAccumLOpsprocessOperationscomputeBlockOrdernumberOperationscomputeLocalLiveSetscomputeGlobalLiveSetsbuildIntervalsresolveDataFlowmapOps assignRegNumcoq_SSMorph_rectcoq_SSMorph_reccoq_SSMorphSt_rectcoq_SSMorphSt_reccoq_SSMorphLen_rectcoq_SSMorphLen_rectransportationcoq_HasBase_rectcoq_HasBase_reccoq_SSMorphStLen_rectcoq_SSMorphStLen_reccoq_SSMorphHasLen_rectcoq_SSMorphHasLen_reccoq_HasWork_rectcoq_HasWork_reccoq_SSMorphStHasLen_rectcoq_SSMorphStHasLen_reccoq_SSMorphSplit_rectcoq_SSMorphSplit_reccoq_IsSplittable_rectcoq_IsSplittable_reccoq_SSMorphStSplit_rectcoq_SSMorphStSplit_reccoq_SSInfo_rectcoq_SSInfo_recthisDesc thisHolds withScanStatewithScanStatePOliftLenweakenStHasLenToSt withCursormoveUnhandledToActivemoveActiveToHandledmoveActiveToInactivemoveInactiveToActivemoveInactiveToHandleddistancesplitCurrentInterval create_ssinfosplitAssignedIntervalForRegsplitActiveIntervalForRegsplitAnyInactiveIntervalForRegintersectsWithFixedIntervaltryAllocateFreeRegallocateBlockedRegmorphlen_transportmt_fstgoActivecheckActiveIntervalsmoveInactiveToActive' goInactivecheckInactiveIntervalshandleIntervalwalkIntervals_func walkIntervals mainAlgorithm linearScanbase Data.EitherLeft toVarInfo fromVarInfotoOpInfo fromOpInfo toBlockInfo fromBlockInfo