diff options
| author | Brian Campbell | 2018-02-14 10:18:27 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-02-14 10:18:35 +0000 |
| commit | becb04545659eefcb250b6138daaf3eb5ddf3ff1 (patch) | |
| tree | be2181c65b27c24a4e804779ffa146a981ef00ed /src | |
| parent | f10a3973ec9e4f26fa78eb479fbeacc6caa0dcbf (diff) | |
Handle simple returns in constant propagation
Useful for feature functions, e.g. HaveFP16Ext
Diffstat (limited to 'src')
| -rw-r--r-- | src/monomorphise.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml index 80046b20..17057097 100644 --- a/src/monomorphise.ml +++ b/src/monomorphise.ml @@ -1354,6 +1354,10 @@ let split_defs all_errors splits defs = | Some (exp,bindings,kbindings) -> let substs = bindings_from_list bindings in let result,_ = const_prop_exp substs Bindings.empty exp in + let result = match result with + | E_aux (E_return e,_) -> e + | _ -> result + in if is_value result then Some result else None | None -> None |
