\      $None !"#$%&'()* !"#$%&'()* !"#$%&'()*None+,-./+,-./+,-./None010101None *+-./02345689:;=?BCDGHJKM23456789:;<=>?@ABCDEFGHIJK23456789:;<=>?@ABCDEFGHIJK23456789:;=<>?@ABCDEFGHIJKNoneLMNOPQRSTUVWXYZ[\]LMNOPQRSTUVWXYZ[\]LMNOPQRSTUVWXYZ[\]None^_^_^_None`a`a`a Nonebcdbcdbcd Noneefghijkefghijkefghijk None *+-./02345689:;=?BCDGHJKM(lmnopqrstuvwxyz{|}~(lmnopqrstuvwxyz{|}~&lmnopqrstuvwxyz{|}~ None None *+-./02345689:;=?BCDGHJKM  None *+-./02345689:;=?BCDGHJKMNone *+-./02345689:;=?BCDGHJKM None *+-./02345689:;=?BCDGHJKM8     8     5     None *+-./02345689:;=?BCDGHJKM) !"#$%&'()*+,-./0123456789:) !"#$%&'()*+,-./0123456789:' !"#$%&'()*+,-./0123456789:NoneNoneNone *+-./02345689:;=?BCDGHJKM;;;None *+-./02345689:;=?BCDGHJKM<=>?@ABCDEFG<=>?@ABCDEFG <=>?@ABCDEFGNone *+-./02345689:;=?BCDGHJKMHIJKLMNOPQRSTUVWXYZ[\]^HIJKLMNOPQRSTUVWXYZ[\]^HIJKLMNOPQRSTUVWXYZ[\]^None_`abcdefghijklmnopqrstuvwxyz_`abcdefghijklmnopqrstuvwxyz_`abcdefghijklmnopqrstuvwxyzNone{|}~{|}~{|~}None *+-./02345689:;=?BCDGHJKM NoneNone *+-./02345689:;=?BCDGHJKM   None *+-./02345689:;=?BCDGHJKMNone *+-./02345689:;=?BCDGHJKM###None!      !            None *+-./02345689:;=?BCDGHJKM None *+-./02345689:;=?BCDGHJKM !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456789!None *+-./02345689:;=?BCDGHJKM:;<=>?@ABCDEFGHIJKLMN:;<=>?@ABCDEFGHIJKLMN:;@?>=<ABCDEFGHIJKLMN"None *+-./02345689:;=?BCDGHJKMOPQRSTUVWXYZ[\]^_`aOPQRSTUVWXYZ[\]^_`aOPQRSTUVWXYZ[\]^_`a#None *+-./02345689:;=?BCDGHJKMbcdefghijklmnopqrstuvwxyz{bcdefghijklmnopqrstuvwxyz{bcdefghijklmnopqrstuvwxyz{$None|}~|}~|}~None *3HM pFrom 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.In order to call this function, the caller must provide records that allow viewing and mutating of the original program graph.hIf allocation is found to be impossible -- for example if there are simply not enough registers -- a : value is returned, with a string describing the error.J "Maximum number of registers to use           %&'()*+,-.//01234456789:;<==>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~J         ` a  a  ` a `a``a      !"#$%&'()*+,-`a./0123456789:;<=>?@ABCDEFGHIJKLMN`OP`QRSTUVWXYZ[\]^`a_`abcdefghijklmnopqarstuvwxyz{|}~..`aa.`a.`a`a/4=>?@56789:;0123`a        `                 ! " # $ % & '!(!)!*!+!,!-!.!/!0!1!.!`!2!3!4!5!6!7!8!9!:";"<"="."`">"?"@"A"B"C"D"E"F"G"H"I"J"K#L#M#`#a#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\#]#^#_#`#a#b#c$d$e$f$g$h$ijklddmnopqrstuvwxyz{|}~linearscan-0.4.0.0 LinearScanLinearScan.UtilsLinearScan.IStateLinearScan.SpecifLinearScan.SsrboolLinearScan.StateLinearScan.DatatypesLinearScan.LogicLinearScan.NonEmpty0LinearScan.SsrfunLinearScan.EqtypeLinearScan.LibLinearScan.SsrnatLinearScan.SeqLinearScan.GraphLinearScan.ChoiceLinearScan.FintypeLinearScan.List0LinearScan.SsreflectLinearScan.Vector0LinearScan.UsePosLinearScan.RangeLinearScan.IntervalLinearScan.ScanStateLinearScan.MorphLinearScan.CursorLinearScan.SplitLinearScan.AllocateLinearScan.IntMapLinearScan.BlocksLinearScan.LiveSetsLinearScan.LoopsLinearScan.ResolveLinearScan.AssignLinearScan.BuildLinearScan.MainVarKindOutputTempInputOpKindIsBranchIsCallIsNormalVarIdPhysReg BlockInfoblockIdblockSuccessorsblockOps setBlockOpsOpInfoopKindopRefsmoveOpswapOpsaveOp restoreOp applyAllocsshowOp1VarInfovarIdvarKind regRequiredallocatetraceboundedTransport'snocset_nthvmapvfoldl'vfoldl'_with_indexnth list_rectunconsintMap_mergeWithKey'IStateiputimapipureijoinCoq_sig2Coq_sig Coq_pred_sort Coq_predTypePredType Coq_mem_predMem Coq_simpl_relCoq_simpl_predCoq_relCoq_pred Coq_reflectReflectFReflectT unsafeCoerce__isSomeiffPidPandP coq_SimplPred pred_of_simplrel_of_simpl_rel mkPredType pred_of_memmemin_mempred_of_mem_predStategetgetsputmodifyjoinfmapbindpureapliftA2mapMmapM_forM_foldrM forFoldrMconcat concatMapMlist_reccoq_False_rect coq_False_reccoq_NonEmpty_rectcoq_NonEmpty_reccoq_NE_from_list_Option__apply_Option__coq_default _Option__bind _Option__mappcomps2val sig_of_sig2 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_opeqPvalcoq_Subinsub inj_eqAxiomcoq_InjEqMixincoq_PcanEqMixinval_eqPpair_eqpair_eqP prod_eqMixin prod_eqTypeopt_eqopt_eqPoption_eqMixin option_eqTypesum_eqsum_eqP sum_eqMixin sum_eqType Coq_oddnum option_chooseolast maybeLookuplebfodd1forFoldforFoldr catMaybesspan partitioninsertsortBy dep_foldl_invdep_foldl_invECoq_ex_minn_speceqnP nat_eqMixin nat_eqType find_ex_minnex_minnP nat_of_boolodd double_recdoubleCoq_eqseq_class Coq_last_spec LastRconsLastNilnilpheadrconslastbelastlastPlast_indfindcountcatrevreveqseqeqseqP seq_eqMixin seq_eqTypemem_seqpred_of_eq_seq seq_predTypeunduprempmapiotaGraph Build_Graphverticesedges emptyGraph addVertexaddEdge removeEdge connectionsoutboundinboundtsort'topsortCountable__Coq_sortCountable__Coq_typeCountable__Coq_class_ofCountable__ClassCountable__Coq_mixin_ofCountable__MixinChoice__Coq_sortChoice__Coq_typeChoice__Coq_class_of Choice__ClassChoice__Coq_mixin_of_Choice__mixin_of_rect_Choice__mixin_of_rec _Choice__find_Choice__class_of_rect_Choice__class_of_rec _Choice__base_Choice__mixin_Choice__type_rect_Choice__type_rec_Choice__coq_class_Choice__clone _Choice__pack_Choice__eqType_Choice__InternalTheory__find)_Choice__InternalTheory__xchoose_subproofcoq_PcanChoiceMixinsub_choiceMixinnat_choiceMixinnat_choiceType_Countable__mixin_of_rect_Countable__mixin_of_rec_Countable__pickle_Countable__unpickle_Countable__coq_EqMixin_Countable__coq_ChoiceMixin_Countable__class_of_rect_Countable__class_of_rec_Countable__base_Countable__mixin_Countable__type_rect_Countable__type_rec_Countable__coq_class_Countable__clone_Countable__pack_Countable__eqType_Countable__choiceTypeunpicklepickle pickle_invcoq_PcanCountMixinsub_countMixinnat_countMixin nat_countTypeFinite__Coq_sortFinite__Coq_typeFinite__Coq_class_of Finite__ClassFinite__Coq_mixin_of Finite__Mixin_Finite__mixin_of_rect_Finite__mixin_of_rec_Finite__mixin_base_Finite__mixin_enum_Finite__coq_EnumMixin_Finite__coq_UniqMixin_Finite__count_enum_Finite__coq_CountMixin_Finite__class_of_rect_Finite__class_of_rec _Finite__base_Finite__mixin_Finite__base2_Finite__type_rect_Finite__type_rec_Finite__coq_class_Finite__clone _Finite__pack_Finite__eqType_Finite__choiceType_Finite__countType_Finite__EnumDef__enumenum_mem image_memordinal_subTypeordinal_eqMixinordinal_eqTypeordinal_choiceMixinordinal_choiceTypeordinal_countMixinord_enumordinal_finMixinordinal_finTypeUsePos Build_UsePos eqVarKind eqVarKindPcoq_VarKind_eqMixincoq_VarKind_eqTypeulocregRequvarupos_lehead_or BoundedRange SubRangesOf SortedRanges RangeDescBuild_RangeDescrbegrendups head_or_end getRangeDesc packRangecoq_Range_shiftcoq_Range_cons range_ltncoq_SortedRanges_cattransportSortedRangesrangesIntersectrangeIntersectionPointfindRangeUsePos rangeSpanemptyBoundedRangeSubIntervalsOf IntervalDescBuild_IntervalDescivaribegiendrdsgetIntervalDesc packInterval intervalStart intervalEndposWithinIntervalintervalsIntersectintervalIntersectionPoint searchInRangefindIntervalUsePos lookupUsePos nextUseAfterrangeFirstUsePos firstUsePos lastUsePosafterLifetimeHolefirstUseReqRegfirstUseReqRegOrEnddivideIntervalRangessplitIntervalRanges splitInterval ScanStateSigScanStateStatusInUsePending IntervalId ScanStateDescBuild_ScanStateDescFixedIntervalsType nextInterval intervalsfixedIntervals unhandledactiveinactivehandledregisterWithHighestPos packScanStateSStateSSInfo Build_SSInfoSSErrorEUnexpectedNoMoreUnhandledEFuelExhaustedERegisterAssignmentsOverlapERegisterAlreadyAssignedENoIntervalsToSplitECannotSplitSingleton3ECannotSplitSingleton2ECannotSplitSingleton1ENoValidSplitPositionENoValidSplitPositionUnhERegistersExhaustedstbinderror_return_thisDescwithScanStatePOliftLenstrengthenHasLenmoveUnhandledToHandledmoveUnhandledToActivemoveActiveToHandledmoveActiveToInactivemoveInactiveToActivemoveInactiveToHandledcurId curIntDetails curPosition withCursor SplitPositionEndOfLifetimeHole BeforePos splitPositionsplitUnhandledIntervalsplitCurrentIntervalsplitActiveOrInactiveIntervalsplitAssignedIntervalForRegsplitActiveIntervalForRegsplitAnyInactiveIntervalForRegCoq_intermediate_resultCoq_int_reg_seqintersectsWithFixedIntervalupdateRegisterPostryAllocateFreeRegallocateBlockedRegmorphlen_transportmt_fstgoActivecheckActiveIntervalsmoveInactiveToActive' goInactivecheckInactiveIntervalshandleIntervalfinalizeScanState walkIntervalsIntSetIntMap emptyIntMapcoq_IntMap_fromListcoq_IntMap_sizecoq_IntMap_lookupcoq_IntMap_altercoq_IntMap_insertcoq_IntMap_mapcoq_IntMap_mergeWithKeycoq_IntMap_foldlcoq_IntMap_foldlWithKeycoq_IntMap_toListeqIntMap eqIntMapPcoq_IntMap_eqMixincoq_IntMap_eqType emptyIntSetcoq_IntSet_singletoncoq_IntSet_membercoq_IntSet_sizecoq_IntSet_insertcoq_IntSet_deletecoq_IntSet_unioncoq_IntSet_differencecoq_IntSet_foldlcoq_IntSet_forFoldcoq_IntSet_toListeqIntSet eqIntSetPcoq_IntSet_eqMixincoq_IntSet_eqTypecoq_IntMap_groupOnBuild_BlockInfoBlockId Build_OpInfoOpId Build_VarInfo nat_of_varId allBlockOps blockSizefoldOpscountOps BlockLiveSetsBuild_BlockLiveSets blockLiveGen blockLiveKill blockLiveIn blockLiveOutblockFirstOpId blockLastOpIdeqBlockLiveSetseqBlockLiveSetsPcoq_BlockLiveSets_eqMixincoq_BlockLiveSets_eqTypecomputeLocalLiveSetscomputeGlobalLiveSets computeGlobalLiveSetsRecursively LoopStateBuild_LoopState activeBlocks visitedBlocksloopHeaderBlocks loopEndBlocksforwardBranchesbackwardBranches loopIndices loopDepthsemptyLoopStatemodifyActiveBlocksmodifyVisitedBlocksmodifyLoopHeaderBlocksmodifyLoopEndBlocksmodifyForwardBranchesmodifyBackwardBranchessetLoopIndices setLoopDepths addReferencepathToLoopHeadercomputeLoopDepthscomputeVarReferences findLoopEndscomputeBlockOrder BlockMoves ResolvingMoveNopRestoreSpillSwapMoveRawResolvingMove AllocationBuild_AllocationintValintRegdetermineAllocationsprepareForGraph moveFromGraphdetermineMovesresolvingMovescheckBlockBoundaryresolveDataFlow AssnState AssnStateInfoBuild_AssnStateInfoassnOpId assnBlockBeg assnBlockEndassnAccswapOpMmoveOpMsaveOpM restoreOpM varAllocs generateMoves doAllocationsresolveMappings considerOps assignRegNum PendingRanges BuildState newBuildStateemptyPendingRangescoq_BoundedRange_leqcompilePendingRangesrangesToBoundedRangescompressPendingRangesmergeIntoSortedRangesupos_before_rend makeNewRange makeUsePoshandleOutputVar handleVarhandleVars_combinehandleVars_onlyRangeshandleVars_onlyVarsextractVarInfo handleVarsreduceOp reduceBlock reduceBlockscompileIntervalsbuildIntervalsDetails Build_Details FinalStageAllocatingRegistersFailedBuildingIntervalsFailed linearScanbase Data.EitherLeftreasonliveSets inputBlocksallocatedBlocks accumulator scanStatePre scanStatePost blockInfoopInfo loopState _nextInterval allocations fromVarInfo toVarInfoshowOp1' fromOpInfotoOpInfoshowIntervalDesc showRangesshowUsePositionstoScanStateDesc toLoopState showBlock1showOps1 showBlocks1 fromBlockInfo toBlockInfo toDetails $fShowDetails$fShowLoopState$fShowScanStateDesc