Nanopass Framework on F#

Artifact [50a62fdb9d]
Login

Artifact [50a62fdb9d]

Artifact 50a62fdb9d4baee929e113747d2a8a9c3ff997883aecb4ca03e100160bd489db:


module XAllocation
    open XLang
    open XBuildInterferences
    open GraphColoring
    
    let XVarsAllocate registers aGraph prg =
        //let aGraph = buildInterferences prg
        let cg = makeColoredGraph aGraph
        // - try color the interference graph with defined amount of reisters
        // - if it is possible then use it
        // - else use allocation on stack, amount of 'stack' vars should be calculated  
        match prg with
        | XProgramAbs (_) 
        | XProgramImp (_) -> prg