Skip to content

Commit

Permalink
Update pruner to naga 23
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBrownK authored and abrown committed Jan 9, 2025
1 parent ebe2a85 commit 15b6d7a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/prune/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl FunctionReq {
pointer: expr_map[pointer],
fun: *fun,
value: expr_map[value],
result: expr_map[result],
result: result.as_ref().map(|it| expr_map[it]),
})
}
(
Expand Down Expand Up @@ -1568,12 +1568,15 @@ impl<'a> Pruner<'a> {
let required_store = self.store_required(context, &var_ref);
debug!("atomic store required: {:?}", required_store);

let required_load = func_req.exprs_required.get(result).cloned();
let required_load = match result {
Some(result) => func_req.exprs_required.get(result).cloned(),
None => None,
};
debug!("atomic load required: {:?}", required_load);

if required_load.is_some() || required_store.is_some() {
// just pass it all through i guess ..?
if let Some(required_load) = required_load {
if let (Some(required_load), Some(result)) = (required_load, result) {
self.add_expression(function, func_req, context, *result, &required_load);
}
if let Some(required_store) = required_store {
Expand Down

0 comments on commit 15b6d7a

Please sign in to comment.