Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and correct the "is pure" and "can raise" (port upstream PR#10354 and PR#10387) #555

Merged
merged 9 commits into from
Apr 15, 2022
Prev Previous commit
Next Next commit
Iprobe_is_enabled is pure
  • Loading branch information
gretay-js committed Apr 15, 2022
commit f17ee86563e7dc745a293d21a3ab4c952d544c72
2 changes: 1 addition & 1 deletion backend/cfg/cfg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ let can_raise_operation : operation -> bool = function
| Floatofint -> false
| Intoffloat -> false
| Probe _ -> true
| Probe_is_enabled _ -> false (* CR xclerc for xclerc: double check *)
| Probe_is_enabled _ -> true
| Specific op -> Arch.operation_can_raise op
| Opaque -> false
| Name_for_debugger _ -> false
Expand Down
3 changes: 2 additions & 1 deletion backend/mach.ml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ let operation_is_pure = function
| Iextcall _ | Istackoffset _ | Istore _ | Ialloc _
| Iintop(Icheckbound) | Iintop_imm(Icheckbound, _) | Iopaque -> false
| Ibeginregion | Iendregion -> false
| Iprobe _ | Iprobe_is_enabled _-> false
| Iprobe _ -> false
| Iprobe_is_enabled _-> true
| Ispecific sop -> Arch.operation_is_pure sop
| _ -> true

Expand Down
3 changes: 2 additions & 1 deletion ocaml/asmcomp/mach.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ let operation_is_pure = function
| Iextcall _ | Istackoffset _ | Istore _ | Ialloc _
| Iintop(Icheckbound) | Iintop_imm(Icheckbound, _) | Iopaque -> false
| Ibeginregion | Iendregion -> false
| Iprobe _ | Iprobe_is_enabled _-> false
| Iprobe _ -> false
| Iprobe_is_enabled _-> true
| Ispecific sop -> Arch.operation_is_pure sop
| _ -> true

Expand Down