Skip to content

Commit

Permalink
Merge pull request #4 from athas/futhark-fixes
Browse files Browse the repository at this point in the history
Now works with Futhark HEAD.
  • Loading branch information
Snektron authored Mar 20, 2024
2 parents fc0213d + 5cd835b commit c0105fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/compiler/codegen/register.fut
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ let lifetime_analyze_valid [n] (instrs: [n]Instr) (symbol_registers: []SymbolDat

let new_lifetime_mask = lifetime_mask & PRESERVED_REGISTER_MASK
let spilled_register_mask = lifetime_mask & !PRESERVED_REGISTER_MASK
let spilled_registers = iota 64i64 |> map (\i ->
let spilled_registers = tabulate 64 (\i ->
if spilled_register_mask & (1 << u64.i64 i) != 0 then
i
else
-1
)
let new_register_state = iota 64i64 |> map (\i ->
let new_register_state = tabulate 64 (\i ->
if new_lifetime_mask & (1 << u64.i64 i) != 0 then
register_state[i]
else
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/passes/check_return_paths.fut
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local type bool_expr_node = (i32, i32, bool_expr_node_type)
local let iter [n] (expr: [n]bool_expr_node): [n]bool_expr_node =
let is_value_known ptr = expr[ptr].2 == #true || expr[ptr].2 == #false
let value ptr = expr[ptr].2 == #true
let f (left, right, nty) =
let f (left, right, nty : bool_expr_node_type) =
-- If this node already has a concrete value, then do nothing, as we are done with this node.
if nty == #true || nty == #false then
(left, right, nty)
Expand Down Expand Up @@ -90,4 +90,4 @@ let check_return_paths [n] (node_types: [n]production.t) (parents: [n]i32) (prev
-- holds whether the program is correct.
|> (.[0])
|> (.2)
|> (== #true)
|> (== (#true : bool_expr_node_type))

0 comments on commit c0105fd

Please sign in to comment.